How to build a webhook trigger on n8n
Quick Answer
Prerequisites
- Running n8n instance (self-hosted or cloud with public URL)
- Basic knowledge of HTTP methods (POST/GET) and JSON
- Testing tools: curl, Postman, or browser
- Workflow editor access
Access n8n Dashboard and Create a New Workflow
Log into your n8n instance and navigate to the Workflows section in the left sidebar. Click the + New button to create a blank workflow canvas where you'll build your webhook trigger.
Add the Webhook Trigger Node
On the empty canvas, click the + button to open the node selector. Search for Webhook and select the Webhook node (marked with an orange lightning bolt as a trigger node under Core Nodes). Drag it to the canvas. This node receives HTTP requests to start your workflow.
Configure Webhook Node Settings
Double-click the Webhook node to open its settings panel and configure these key options:
- HTTP Method: Select POST (default for data payloads; change to GET/PUT/PATCH/DELETE as needed)
- Path: Enter a unique path like
webhook-trigger(creates URL likehttps://your-n8n-instance/webhook/webhook-trigger) - Response Mode: Choose Immediately (responds instantly) or Using Respond to Webhook node (for custom responses later)
- Authentication: Leave as None for basic setup; enable Header Auth or Basic Auth if securing the endpoint
- Ignore Bots: Toggle On to ignore crawlers like link previewers
- IP Whitelist: Leave blank to allow all IPs, or add comma-separated IPs like
192.168.1.1,10.0.0.1for restriction
Copy the Webhook URLs
In the Webhook node panel, you'll see two URLs:
- Test URL: For development; starts with
https://your-n8n-instance/webhook-test/...and changes each time you open the workflow - Production URL: For live use; only active when the workflow is activated and remains stable
Copy both URLs for the next steps. The Production URL is essential for real-world integrations.
Test the Webhook with Listen for Test Event
Click Listen for Test Event in the node panel (the button turns green). Use a testing tool like curl or Postman to send a request:
curl -X POST "TEST_URL?brand=workflows&action=subscribe" -H "Content-Type: application/json" -d '{"data": "test payload"}'Data appears in the node's output panel, showing query parameters and body data. Click the pin icon to save this test data for reference in building subsequent nodes.
Add Data Processing Nodes (Optional)
After the Webhook node, add processing nodes to handle the incoming data. Common options include:
- Code Node: Write JavaScript to validate or transform JSON data
- IF Node: Create conditional logic based on webhook payload
- HTTP Request Node: Forward data to external APIs or services
Connect these nodes to the Webhook output to build your automation logic.
Save the Workflow
Click Save in the top toolbar. A dialog appears prompting you to name the workflow (e.g., "Webhook Trigger Workflow"). Enter a descriptive name and confirm. Saving preserves your configuration and node setup.
Activate the Workflow for Production
Toggle the Active switch in the top-right corner of the canvas (turns green when enabled). Activating the workflow enables the stable Production URL and makes your webhook live for real requests. Deactivate the workflow when you need to edit it.
Handle Custom Responses (Optional)
If you set Response Mode to Using Respond to Webhook node, add a Respond to Webhook node after your processing logic. Search for it in the node selector and connect it to the end of your workflow. Configure:
- Respond With: No Data (default) or JSON (custom response body)
- Response Code:
200for success, or other HTTP status codes as needed
This node controls what the webhook returns to the caller after processing completes.
Test with Production URL and Monitor Executions
Once activated, send requests to the Production URL using curl, Postman, or your integration source. Monitor workflow executions by clicking the Executions tab in the workflow editor. Each execution shows the incoming data, node outputs, and any errors. Use this to verify your webhook is receiving and processing data correctly.
Troubleshooting
No data received or webhook not triggered
404 Not Found or invalid path errors
Workflow executes but returns no response
Authentication errors or unauthorized access
Workflow inactive after saving
Ready to get started with n8n?
Put this tutorial into practice. Visit n8n and follow the steps above.
Visit n8n →