Building the Webhook-to-Telegram Flow
This is a member-only chapter. Log in with your Signal Over Noise membership email to continue.
Log in to readModule 2 · Section 4 of 6
Building the Webhook-to-Telegram Flow
We’ll build a workflow that: receives a webhook request, extracts data from the request body, and sends a formatted message to a Telegram chat.
This is the pattern behind my contact form pipeline. The form sends a webhook to n8n, n8n processes it and fires a Telegram notification. What we’re building here is the skeleton.
Step 1: Create a new workflow
Open n8n at http://localhost:5678. Click “New Workflow” in the top right.
Step 2: Add a Webhook trigger
Click the ”+” button to add a node. Search for “Webhook”. Add it.
The webhook node generates a URL. You’ll see a “Test URL” and a “Production URL”. Use Test URL while building — it activates temporarily when you click “Test workflow”. The Production URL stays active when the workflow is deployed.
Leave the HTTP method as POST. Leave everything else at defaults for now.
Step 3: Add a Set node
Add another node. Search for “Set”. This node lets you create or transform fields on the data passing through.
Add a field called message. Set its value to an expression:
Hello from webhook. Received: {{ $json.body.message }}
The {{ }} syntax is n8n’s expression language. $json refers to the data from the previous node. body.message assumes the incoming webhook has a JSON body with a message field. Adjust this to match whatever your trigger will actually send.
Step 4: Add a Telegram node
Add another node. Search for “Telegram”.
You’ll need a Telegram bot. If you don’t have one:
- Open Telegram and message
@BotFather - Send
/newbotand follow the prompts - Copy the API token it gives you
Back in n8n, create a new credential for Telegram. Paste your bot token.
Set the Chat ID to your Telegram user ID or a group chat ID. (You can get your user ID by messaging @userinfobot in Telegram.)
Set the text field to {{ $json.message }} — this pulls the message field we set in the previous node.
Step 5: Test it
Click “Test Workflow” in the top right. n8n activates the test webhook URL and waits.
Open a terminal and send a test request:
curl -X POST http://localhost:5678/webhook-test/[your-webhook-id] \
-H "Content-Type: application/json" \
-d '{"message": "test message"}'
You should see data flowing through each node in the n8n canvas, highlighted in green. And a Telegram message should arrive.
Step 6: Save and activate
Save the workflow. Toggle the “Active” switch in the top right. The workflow is now live — any POST to the production webhook URL will trigger it.