Guide: Webhook Automation

Build a workflow that receives a GitHub push event, extracts commit information, and sends an email notification to your team.

What you will build:

Webhook Trigger (GitHub) → Transform → Send Email (Resend)

Time: ~15 minutes

Prerequisites:

  • Tensorify account with a workspace
  • Resend account with a verified domain (resend.com)
  • A GitHub repository where you can add webhooks
  • CLI installed (only for local testing): curl -fsSL https://cli.tensorify.io/install | sh — or skip and deploy with Managed mode

Step 1: Create the Workflow

  1. Go to app.tensorify.io → dashboard
  2. Click New Workflow and name it github-push-notifications
  3. Click Create

Step 2: Add a Webhook Trigger

Drag a Webhook node onto the canvas. In its settings panel:

  • Path: /github/push
  • Method: POST
  • Verification Type: hmac-signature
  • Signature Header Name: X-Hub-Signature-256
  • Signature Algorithm: sha256
  • Response Mode: ack-immediately

Leave the Secret field empty for now — you will fill it after GitHub generates the webhook.

Step 3: Add a Transform Node

Drag a Transform node onto the canvas and connect the Webhook's payload output to Transform's input.

In the Transform settings, set the template to:

{
  "pusherName": "{{ webhook.body.pusher.name }}",
  "repoName": "{{ webhook.body.repository.full_name }}",
  "branch": "{{ webhook.body.ref }}",
  "commitCount": "{{ webhook.body.commits.length }}",
  "latestMessage": "{{ webhook.body.head_commit.message }}",
  "compareUrl": "{{ webhook.body.compare }}"
}

Step 4: Add Send Email

First, add your RESEND_API_KEY to your workspace:

  1. Go to SettingsEnv Vars (or directly to the Env Vars page)
  2. Add a variable named RESEND_API_KEY with your Resend API key

Now drag a Send Email node onto the canvas and connect Transform's result to Send Email's text input.

The text input expects a plain text string, but Transform produces an object. To build the email body as a string, insert a Code node between Transform and Send Email instead. See Step 4b below.

Step 4b: Add a Code Node for the Body

Drag a Code node between Transform and Send Email. Connect Transform's result to Code's input.

repo = input.get("repoName", "unknown")
branch = input.get("branch", "").replace("refs/heads/", "")
pusher = input.get("pusherName", "someone")
count = input.get("commitCount", 0)
message = input.get("latestMessage", "")
url = input.get("compareUrl", "")

return f"""{pusher} pushed {count} commit(s) to {repo} ({branch})

Latest: {message}

Compare: {url}"""

Connect Code's result to Send Email's text input.

In the Send Email settings:

Step 5: Test Locally

Using Managed mode? Skip this step — deploy directly from Step 6 with Managed execution and trigger via the webhook URL.

Install the CLI, authenticate, and start a runner:

tensorify init
tensorify login              # opens browser — or use --api-key on init
tensorify runner start

In the canvas editor, open the Webhook node settings and add a mock payload:

{
  "pusher": { "name": "octocat" },
  "repository": { "full_name": "octocat/my-repo" },
  "ref": "refs/heads/main",
  "commits": [{}],
  "head_commit": { "message": "Fix typo in README" },
  "compare": "https://github.com/octocat/my-repo/compare/abc...def"
}

Click Test → select the Send Email node → click Run to Selected. Check your inbox.

Step 6: Deploy

  1. Click Deploy in the toolbar
  2. Set Execution Mode to CLI (self-hosted runner) or Managed for cloud execution
  3. Copy the Webhook URL

In GitHub:

  1. Go to your repository → SettingsWebhooksAdd webhook
  2. Set Payload URL to your Tensorify webhook URL
  3. Set Content type to application/json
  4. Set Secret to a random string (e.g., from openssl rand -hex 32)
  5. Copy that secret back into the Webhook node's Secret field in Tensorify

If using self-hosted execution, ensure your runner is connected (tensorify runner start or tensorify runner install on a server), then deploy from the Deploy dialog with execution mode CLI or Auto.

Step 7: Verify

Make a commit and push to your repository. Within seconds you should receive an email and see a completed job on the Jobs page.


What You Learned

  • How to configure HMAC-signature verification for GitHub webhooks
  • How to use Transform to extract specific fields from a complex payload
  • How to use a Code node to build a formatted string
  • How to deploy and verify a production webhook workflow

Next Steps


Common Webhook Automation Use Cases

The pattern in this guide — receive event, transform data, take action — applies to any webhook source:

  • Stripe — Send a receipt email on checkout.session.completed, update your database on invoice.paid, alert on charge.failed
  • GitHub — Notify a Slack channel on pull request, deploy on tag push, run CI status checks
  • Shopify — Sync new orders to a CRM, trigger fulfillment workflows on orders/create
  • Twilio — Process incoming SMS, forward voicemail transcriptions, build conversational flows
  • Custom apps — Any service that sends HTTP POST events can trigger a Tensorify workflow

Stripe Webhook Example

The same workflow structure works for Stripe. Replace the GitHub webhook with a Stripe webhook endpoint, set the signing secret for HMAC verification, and extract fields like event.data.object.customer_email in the Transform node. Tensorify's HMAC verification supports Stripe's v1 signature scheme out of the box.

On this page