By default, an n8n webhook answers every call with {"message":"Workflow was started"}. To send a custom response from an n8n webhook instead, such as a greeting, a result or a saved ID, you add a Respond to Webhook node and tell the Webhook node to wait for it.
This post shows it with a tiny example of its own, a Greeting workflow: call /hello?name=Asha and it answers {"greeting":"Hello, Asha!"}, with the name taken from the call.
Cost: free. Everything here runs on your own n8n Community Edition.
Every command, screen and output on this page is real, run with n8n 2 in Docker on macOS.
Step 1: Make the Webhook Wait for Your Response
Create a new workflow named Greeting, click Add first step and choose On webhook call. In the Webhook node, keep HTTP Method at GET, set Path to hello, and set Respond to Using ‘Respond to Webhook’ Node:

Now n8n doesn’t answer the caller straight away: it waits for a Respond to Webhook node, as the note under the field says.
Step 2: Add a Respond to Webhook Node
Close the node, click + on the right of the Webhook node, search for Respond to Webhook and choose it. Open its Respond With list and choose JSON:

Hover over Response Body, click Expression, and replace the sample with:
{
"greeting": "Hello, {{ $json.query.name }}!"
}
{{ $json.query.name }} is an n8n expression: it reads name from the call’s query string, the part of the address after ?. In Expression mode, n8n fills it in for every call:

Step 3: Test the Custom Response
Close the node and click Execute workflow, so the Test URL waits for one call (Test URL vs Production URL explains the two addresses). Then call it from Terminal (press ⌘ Space, type Terminal and press Return):
curl "http://localhost:5678/webhook-test/hello?name=Asha"
The quotes stop zsh, the shell in macOS Terminal, from reading ? as a wildcard. n8n answers with your JSON:
{"greeting":"Hello, Asha!"}
Both nodes turn green on the canvas:

When the reply is right, publish the workflow and give callers its Production URL instead.
Clean Up
If you published the Greeting workflow, unpublish it first. Then archive and delete it from its ⋯ menu. Deleting it can’t be undone.
Common Mistakes
| Mistake | What happens | Do this instead |
|---|---|---|
| Leaving the Webhook’s Respond at Immediately | The call fails with Unused Respond to Webhook node found in the workflow | Set Respond to Using ‘Respond to Webhook’ Node |
Calling without ?name= | The greeting comes back as Hello, ! | Add ?name= and a name to the address |
| Leaving the address unquoted in Terminal | zsh stops with no matches found | Put the address in double quotes |
Troubleshooting
| Problem | Cause | Fix |
|---|---|---|
{"code":0,"message":"Unused Respond to Webhook node found in the workflow"}, and in the editor Problem in node ‘Webhook‘ | The Webhook node’s Respond isn’t set to use the Respond to Webhook node | Set Respond to Using ‘Respond to Webhook’ Node |
zsh says no matches found and curl doesn’t run | The address isn’t in quotes, so zsh reads ? as a wildcard | Put the address in double quotes |
FAQ
What else can Respond to Webhook send?
Its Respond With list also has All Incoming Items, Binary File, First Incoming Item, JWT Token, No Data, Redirect and Text. n8n’s Respond to Webhook docs (opens in a new tab) explain each one.
Can I set the HTTP status code?
Yes. n8n’s docs list a Response Code option under Add option in the Respond to Webhook node, next to Response Headers.
Conclusion
Set the Webhook’s Respond to Using ‘Respond to Webhook’ Node, add a Respond to Webhook node, and build the reply with an expression. Every caller then gets your own answer instead of “Workflow was started”.
Additional Resources
- Respond to Webhook (opens in a new tab) (n8n docs)
- Webhook node (opens in a new tab) (n8n docs)
- Filename generation (opens in a new tab) (zsh docs)
Related
- n8n Tutorial — Part 4: Webhooks: Start a Workflow from Any App
- n8n Webhook Test URL vs Production URL: What’s the Difference?
- How to Secure an n8n Webhook with Header Auth
- How to Publish a Workflow in n8n
n8n and other names mentioned are trademarks of their respective owners. JD Bots isn’t affiliated with or endorsed by n8n GmbH.
0 comments