A webhook is a web address that other apps send events to: a form submission, a new order, a payment. In this guide you create one, connect it to an Email Action node, send it a test event and watch the email go out. You don't need any API keys or other accounts.
The example is a website contact form: every time someone sends the form, your team gets an email with their name, address and message.
Add a Webhook node
In the left sidebar, click Flows. Open the node palette in the top-left corner of the canvas and click Webhook under Sources. The node appears on the canvas.
- Marker 1: Open Flows.
- Marker 2: The node palette. Click + Nodes if it's collapsed.
- Marker 3: Click Webhook to add it to the canvas.
Name it and copy its URL
Click the new node, then click Full config in the panel that opens. The webhook gets its own page.
- Marker 1: Click the name to rename it. Here it's Contact form.
- Marker 2: Webhook URL: the address you give to the app that sends the events. Click Copy full URL.
- Marker 3: Click Next step to describe the events you'll receive (step 03).
- Marker 4: The webhook isn't protected yet. You'll fix that in step 08.
Treat the URL like a password.
Anyone who has the URL can send events to your flow. Only paste it into apps you trust. If it leaks, click Rotate to get a new one; the old URL stops working right away.
Describe the events
Under Select example payload, pick the service that will send the events, or type your own fields, one key: value per line. HostWebhook saves it as the webhook's output right away, so the next node knows which fields exist.
- Marker 1: Pick a service such as Stripe, GitHub or Shopify to start from its real field names.
- Marker 2: Or type your own. For the contact form:
name,emailandmessage. - Marker 3: The OUTPUT panel shows the example as JSON, marked Example data.
name: Jane Doe email: jane@example.com message: Hi! Do you offer a plan for teams?
Add an Email Action node
Click ← Flows to go back to the canvas. In the palette, open Actions and click Email Action. Then drag from the dot on the right side of the Webhook node to the dot on the left side of the Email Action node.
- Marker 1: Click Email Action under Actions.
- Marker 2: Drag from the Webhook node to the Email Action node to connect them.
- Marker 3: The Email Action node, renamed Email the team. Click it, then Full config.
Email Action sends from HostWebhook's own mail service, so it needs no account and is free. To send from your own address, use the Gmail or Outlook node instead.
Write the email
On the Email Action page, keep Single operation selected and fill in the email. Wrap a field in double curly braces to insert it from the event: {{payload.name}} becomes "Jane Doe".
- Marker 1: Single operation: you write the email yourself. No AI is involved.
- Marker 2: To: type your team's address and press Enter.
- Marker 3: Subject and Body: fields from the event show up as purple tags such as Name.
- Marker 4: INPUT shows the fields you can use, taken from the example in step 03.
New message from {{payload.name}}{{payload.name}} ({{payload.email}}) wrote:
{{payload.message}}The page saves on its own: look for Saved at the top.
Send a test event
Send a request to your webhook URL, the same way your website will. In a terminal, run the command below with your own URL from step 02.
curl -X POST "https://api.hostwebhook.com/api/in/YOUR_WEBHOOK_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"Jane Doe","email":"jane@example.com","message":"Hi! Do you offer a plan for teams?"}'HostWebhook answers 202 Accepted with an eventId, and the email arrives a few seconds later.
- Marker 1: No terminal? Run sends the example payload to the webhook from the dashboard.
- Marker 2: The result of Run: the status and the body the webhook received.
- Marker 3: Events lists every event received. Events from Run are marked Manual; real requests are marked Prod.
Run only tests the webhook.
In our tests, Run checked that the webhook accepts the payload but didn't run the nodes after it, so no email was sent. To test the whole flow, send a real request like the one above.
Check the run
Every event that goes through the flow creates a run. Click Monitoring, then Workflows, and click your webhook's name.
- Marker 1: Open Monitoring and choose Workflows.
- Marker 2: One row per run: the status, how many steps finished, and how long it took. Click it for details.
- Marker 1: Success: both steps finished.
- Marker 2: Each node the event went through, with its time. A failed step shows in red here.
- Marker 3: The flow as it was when this run happened, even if you've changed it since.
Then check the inbox you used in step 05. The email comes from HostWebhook with the subject "New message from Jane Doe".
Protect your webhook
OptionalRight now anyone with the URL can send events. On the webhook page, click Configure in the orange No protection box and choose one or more protections.
- Marker 1: Require API Key: requests must include a HostWebhook API key with the
ingress:writescope. - Marker 2: Rate Limit and IP Allowlist: cap requests per minute, or only accept requests from the sender's IP addresses.
- Marker 3: Incoming signature verification: check the signature that services like Stripe, GitHub or Shopify add to each event.
Which protection should I use?
- The sender is Stripe, GitHub or Shopify: choose it under Verification type and enter the signing secret from that service's dashboard. Events without a valid signature are rejected.
- The sender signs with a shared secret: choose Static Secret or HostWebhook (HMAC-SHA256).
- The sender is your own code or server: turn on Require API Key and send the key with every request.
- A website form posts directly from the visitor's browser: a key or secret would be visible in the page, so use a Rate Limit instead, or send the form to your own server first.
Click Done to save.
Troubleshooting
| What you see | Cause | Fix |
|---|---|---|
The request returns an error instead of 202 | The URL is incomplete, or the token was rotated. | Click Copy full URL again. The masked URL on the page isn't the full address. |
| The event is listed but no email arrives | The nodes aren't connected, or the event came from Run. | Check the line between the two nodes on the canvas, then send a real request. |
The email shows {{payload.name}} as text | The field name doesn't match the event. | Compare the name with the INPUT panel on the Email Action page. Names are case-sensitive. |
| The run is red in Monitoring | A node failed. | Open the run to see which step failed, then check that node's settings. |
| Events are rejected after you turn on a protection | The sender doesn't include the key or signature yet. | Add it on the sender's side, or turn the protection off while you test. |
Forward events to your own server instead
A webhook can also pass every event straight to another address, with no nodes. Click Configure and fill in Target URL. HostWebhook delivers each event there and retries if your server is down (3 retries, 60 seconds apart by default). For a server on your own computer, use the hostwh listen command shown under the field.
All the delivery options are explained in Webhook delivery settings (Target URL).