๐Ÿ‡ฌ๐Ÿ‡ง EN
๐Ÿ‡ฎ๐Ÿ‡น IT

๐Ÿ™ GitHub Trigger

The GitHub Trigger fires a workflow when GitHub sends a webhook event โ€” such as a push to a branch, a new pull request, or an issue being opened. It automatically validates GitHub's HMAC-SHA256 signature so only genuine GitHub events can start your workflow.

Category: Triggers  ยท  Type identifier: github_trigger

Overview

GitHub can send webhook notifications for a wide range of repository and organisation events: every time someone pushes a commit, opens or closes a pull request, comments on an issue, creates a release, or dozens of other actions. The GitHub Trigger lets you respond to any of these events directly in a Flusso workflow.

GitHub signs its webhook payloads using HMAC-SHA256 with a secret you define. The signature is included in the X-Hub-Signature-256 header of every request. The GitHub Trigger verifies this signature automatically, rejecting any request that does not have a valid signature. This ensures that only real events from GitHub โ€” not spoofed requests from other sources โ€” can trigger your workflow.

You can optionally filter the trigger to fire only for a specific GitHub event type using the Event Filter field. For example, setting it to push means the workflow will only run when someone pushes to the repository, ignoring pull requests, issues, and all other events even if GitHub sends them to the same endpoint.

Configuration

Field Required Description
Webhook Secret Required A secret string you choose and enter both here and in GitHub's webhook configuration. Flusso uses this to verify that incoming requests genuinely came from GitHub by validating the HMAC-SHA256 signature.
Event Filter Optional A single GitHub event type to filter on (for example, push, pull_request, issues, release). If left blank, the trigger fires for all event types that GitHub sends. See the GitHub webhook events reference for the full list of available event types.

Setting up the webhook in GitHub

  1. Copy your workflow's webhook URL from the GitHub Trigger's configuration drawer in Flusso.
  2. Go to your GitHub repository (or organisation), then navigate to Settings โ†’ Webhooks โ†’ Add webhook.
  3. Paste the webhook URL into the Payload URL field. Set Content type to application/json.
  4. Enter a secret in the Secret field. Use a long, random string. Copy this exact same value and paste it into the Webhook Secret field in Flusso.
  5. Choose which events to send โ€” you can send "Just the push event", "Send me everything", or select individual events. Click Add webhook to save.

Output Data

VariableTypeDescription
trigger.output.payload Object The full GitHub event payload. The structure varies by event type โ€” refer to the GitHub docs for details.
trigger.output.event String The value of the X-GitHub-Event header โ€” the event type, e.g. push, pull_request, issues.
trigger.output.headers Object All HTTP request headers, including x-github-event and x-hub-signature-256.
// Access the event type {{ trigger.output.event }} // Push event: the branch that was pushed to {{ trigger.output.payload.ref }} // Push event: the pusher's name {{ trigger.output.payload.pusher.name }} // Pull request event: the PR title {{ trigger.output.payload.pull_request.title }} // Issue event: the issue body {{ trigger.output.payload.issue.body }} // Repository name (available in all events) {{ trigger.output.payload.repository.full_name }}

Example Usage

Post a Slack message when code is pushed to main

  1. Add a GitHub Trigger. Set a webhook secret and set Event Filter to push.
  2. Add a Logic Gate node to check that the push is to the main branch: {{ trigger.output.payload.ref }} equals refs/heads/main.
  3. On the true branch, add a Slack Message node:
    New push to main by {{ trigger.output.payload.pusher.name }} Repository: {{ trigger.output.payload.repository.full_name }}

Tips & Notes

Use a Switch node for multiple event types. If you configure GitHub to send all events to the same webhook endpoint, add a Switch node immediately after the GitHub Trigger, switching on {{ trigger.output.event }}. This lets you handle push, pull_request, and issues events with different logic in the same workflow.

Related Nodes