Skip to main content

Webhooks & HTTP

Make HTTP requests to external APIs and receive incoming webhooks.

Available Nodes

NodeTypePurpose
HTTP RequestActionMake outgoing HTTP calls
Webhook TriggerTriggerReceive incoming HTTP requests
Webhook ResponseActionSend custom response to webhook caller

HTTP Request

Make HTTP requests to external APIs and services.

Parameters

url
string
required
The URL to request. Supports template variables.
method
select
default:"GET"
HTTP method: GET, POST, PUT, DELETE, PATCH
headers
json
Request headers as JSON object
body
string
Request body (for POST, PUT, PATCH)
timeout
number
default:"30"
Request timeout in seconds

Output

{
  "status": 200,
  "statusText": "OK",
  "headers": {
    "content-type": "application/json"
  },
  "data": {
    "result": "response data"
  }
}

Examples

GET Request:
URL: https://api.example.com/users/{{input.user_id}}
Method: GET
Headers: {"Authorization": "Bearer {{input.token}}"}
POST Request:
URL: https://api.example.com/orders
Method: POST
Headers: {"Content-Type": "application/json"}
Body: {"product": "{{input.product}}", "quantity": {{input.qty}}}
External API Integration:
URL: https://api.openweathermap.org/data/2.5/weather?q={{input.city}}&appid=YOUR_KEY
Method: GET

Webhook Trigger

Receive incoming HTTP requests at a dynamic endpoint.

Parameters

path
string
required
The webhook path (e.g., “orders” creates /webhook/orders)
method
select
default:"POST"
HTTP method filter: GET, POST, PUT, DELETE, PATCH, or ANY
authentication
select
default:"none"
Auth method: none, basic, bearer, api_key

Webhook URL

Your webhook will be available at:
http://localhost:3010/webhook/{path}
For production:
https://your-domain.com/webhook/{path}

Output

{
  "method": "POST",
  "path": "/webhook/orders",
  "headers": {
    "content-type": "application/json",
    "user-agent": "curl/7.68.0"
  },
  "query": {
    "source": "website"
  },
  "body": {
    "order_id": "12345",
    "items": ["item1", "item2"]
  },
  "timestamp": "2024-01-15T10:30:00Z"
}

Authentication Options

TypeDescriptionHeader
NoneNo authentication-
BasicUsername:password base64Authorization: Basic ...
BearerToken authenticationAuthorization: Bearer ...
API KeyCustom API keyX-API-Key: ...

Webhook Response

Send a custom response back to the webhook caller.

Parameters

statusCode
number
default:"200"
HTTP status code to return
body
string
Response body. Supports template variables.
contentType
select
default:"application/json"
Content-Type header: application/json, text/plain, text/html

Example Responses

Success Response:
Status Code: 200
Body: {"success": true, "message": "Order received", "id": "{{generated.id}}"}
Content Type: application/json
Error Response:
Status Code: 400
Body: {"error": "Invalid request", "details": "{{validation.error}}"}
Content Type: application/json
HTML Response:
Status Code: 200
Body: <html><body><h1>Thank you!</h1></body></html>
Content Type: text/html

Common Workflows

API Endpoint

Create a simple API endpoint:
[Webhook Trigger] --> [Python Executor] --> [Webhook Response]
     (path: api)        (process data)       (return result)
Test:
curl -X POST http://localhost:3010/webhook/api \
  -H "Content-Type: application/json" \
  -d '{"action": "calculate", "value": 100}'

Third-Party Integration

Receive events from external services:
[Webhook Trigger] --> [HTTP Request] --> [WhatsApp Send]
   (stripe/github)     (fetch details)     (notify admin)

Data Pipeline

Forward data to multiple destinations:
[Webhook Trigger] --> [HTTP Request #1] (Database API)
                  |
                  --> [HTTP Request #2] (Analytics)
                  |
                  --> [WhatsApp Send] (Notification)

AI-Powered API

Create an AI endpoint:
[Webhook Trigger] --> [OpenAI Chat] --> [Webhook Response]
Prompt: {{webhookTrigger.body.prompt}} Response: {{openaiChatModel.response}}

Testing Webhooks

Using curl

# GET request
curl http://localhost:3010/webhook/test

# POST with JSON
curl -X POST http://localhost:3010/webhook/orders \
  -H "Content-Type: application/json" \
  -d '{"item": "Widget", "quantity": 5}'

# With authentication
curl -X POST http://localhost:3010/webhook/secure \
  -H "Authorization: Bearer your-token" \
  -d '{"data": "value"}'

Using HTTPie

http POST localhost:3010/webhook/test item=Widget quantity:=5

External Testing

Use services like:

Tips

Use meaningful paths that describe the purpose: /webhook/orders, /webhook/stripe-events
Always validate incoming data before processing with Python Executor or similar.
Return appropriate status codes: 200 (success), 400 (bad request), 500 (server error)
In production, always enable authentication on webhooks that modify data.

Troubleshooting

  • Verify workflow is deployed (not just saved)
  • Check the path is correct (no leading slash)
  • Ensure backend is running on correct port
  • Check firewall/network settings
  • Verify URL is correct and accessible
  • Check headers (especially Content-Type)
  • Look for CORS issues if calling from browser
  • Check timeout setting for slow APIs
  • Ensure Webhook Response is connected to workflow
  • Verify template variables resolve correctly
  • Check status code is valid (100-599)