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:
npm install -g @tensorify.io/cli
- Go to app.tensorify.io → dashboard
- Click New Workflow and name it
github-push-notifications - Click Create
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.
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 }}"
}
First, add your RESEND_API_KEY to your workspace:
- Go to Settings → Env Vars (or directly to the Env Vars page)
- Add a variable named
RESEND_API_KEYwith 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.
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:
- From:
[email protected] - From Name:
GitHub Notifier - To:
[email protected] - Subject:
New push to {{ transform.repoName }} ({{ transform.branch }})
Install the CLI and set your API key:
export TENSORIFY_API_KEY="your_key_here"
tensorify watch github-push-notifications-workflow-id
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.
- Click Deploy in the toolbar
- Set Execution Mode to CLI (or Managed if you don't want to run the CLI)
- Copy the Webhook URL
In GitHub:
- Go to your repository → Settings → Webhooks → Add webhook
- Set Payload URL to your Tensorify webhook URL
- Set Content type to
application/json - Set Secret to a random string (e.g., from
openssl rand -hex 32) - Copy that secret back into the Webhook node's Secret field in Tensorify
If using CLI mode, start your runner:
tensorify run github-push-notifications-workflow-id
Make a commit and push to your repository. Within seconds you should receive an email and see a completed job on the Jobs page.
- 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
- Build a REST API endpoint — return a synchronous response
- Webhook Trigger reference — full settings documentation
- Send Email reference — HTML emails, dynamic recipients
