GitHub Integration

Receive GitHub webhook events in WebhookLane. GitHub is a source — it sends events for pushes, pull requests, issues, releases, and more.

Prerequisites

  • Admin access to the GitHub repository (or organization) you want to connect

Setup

  1. Create a source in WebhookLane
    Go to Sources → Create source, name it "GitHub", and copy the ingest URL.
  2. Add the webhook in GitHub
    In your repository, go to Settings → Webhooks → Add webhook:
    • Payload URL: Paste your WebhookLane ingest URL
    • Content type: Select application/json
    • Events: Choose "Let me select individual events" and pick the ones you need

Common Event Types

GitHub sends an X-GitHub-Event header with each webhook. Common events include:

  • push — Code pushed to a branch
  • pull_request — PR opened, closed, merged, review requested
  • issues — Issue opened, closed, labeled, assigned
  • release — Release published, created, edited
  • workflow_run — GitHub Actions workflow completed
  • star — Repository starred/unstarred

Example Transform

Route push events to Slack with a formatted notification:

{
  "blocks": [
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": "*Push to {{slackEscape repository.full_name}}*\n{{slackEscape (truncate head_commit.message 200)}}\nBranch: `{{slackEscape ref}}`"
      }
    },
    {
      "type": "context",
      "elements": [
        {
          "type": "mrkdwn",
          "text": "{{slackEscape pusher.name}} pushed {{commits.length}} commit(s)"
        }
      ]
    },
    {
      "type": "actions",
      "elements": [
        {
          "type": "button",
          "text": { "type": "plain_text", "text": "View on GitHub" },
          "url": "{{compare}}"
        }
      ]
    }
  ]
}

Example Filter

Only process events on the main branch:

  • Field: ref, Operator: equals, Value: refs/heads/main

Tips

  • You must set the content type to application/json. The default application/x-www-form-urlencoded format is not supported.
  • GitHub event headers are available in templates via _headers (e.g., {{_headers.x-github-event}}).
  • For organization-wide events, add the webhook at the organization level in Settings → Webhooks instead of per-repository.
  • Filter operators available: equals, not_equals, contains, exists. Use dot notation for nested fields (e.g., pull_request.merged).