Call URL
Makes HTTP requests to external APIs and services.
Overview
The Call URL node sends HTTP requests and returns the response. Use it to:
- Integrate with REST APIs
- Fetch external data
- Send data to webhooks
- Trigger external services
Parameters
| Parameter | Description | Required |
|---|---|---|
| Method | HTTP method | Yes |
| URL | Request endpoint | Yes |
| Headers | Custom request headers | No |
| Body Type | Format of request body | Yes |
| Body | Request body content | Conditional |
Method Options
| Method | Use Case |
|---|---|
| GET | Retrieve data |
| POST | Create resources, send data |
| PUT | Update/replace resources |
| PATCH | Partial updates |
| DELETE | Remove resources |
URL
The endpoint to call. Supports expressions:
https://api.example.com/users
https://api.example.com/users/{{$item.data.userId}}
https://api.example.com/search?q={{$item.data.query}}
Headers
Add custom headers as name-value pairs:
| Name | Value |
|---|---|
| Authorization | Bearer {{\$item.data.token}} |
| Content-Type | application/json |
| X-API-Key | {{\$item.data.apiKey}} |
Body Type
| Type | Description |
|---|---|
| JSON | Send JSON data (auto sets Content-Type) |
| Raw | Send raw text/data |
| None | No body (for GET/DELETE) |
Body
The request body. For JSON type, provide an object:
{{$item}}
Or construct specific data:
{{
{
name: $item.data.customerName,
email: $item.data.email,
amount: $item.data.total
}
}}
Output
The response is added to the item:
{
"statusCode": 200,
"headers": {
"content-type": "application/json"
},
"data": {
"id": 123,
"result": "success"
}
}
| Field | Description |
|---|---|
statusCode | HTTP response status code |
headers | Response headers |
data | Response body (parsed if JSON) |
Examples
GET Request
Fetch user data:
- Method:
GET - URL:
https://api.example.com/users/{{\$item.data.userId}} - Body Type:
None
POST with JSON Body
Create a record:
- Method:
POST - URL:
https://api.example.com/orders - Headers:
Authorization: Bearer {{\$item.data.apiKey}} - Body Type:
JSON - Body:
{{\$item}}
Webhook Notification
Send data to a webhook:
- Method:
POST - URL:
https://hooks.example.com/notify - Body Type:
JSON - Body:
{{
{
event: "order_created",
orderId: $item.data.id,
timestamp: new Date().toISOString()
}
}}
API with Query Parameters
Include query params in the URL:
- Method:
GET - URL:
https://api.example.com/search?q={{\$item.data.query}}&limit=10
Custom Headers
Include authentication and custom headers:
- Headers:
Authorization:Bearer {{\$item.data.token}}X-Custom-Header:{{\$item.data.customValue}}Accept:application/json
Error Handling
HTTP errors (4xx, 5xx) create error items. Connect the error output or use Error Catcher to handle failures.
Common errors:
- 401 Unauthorized - Check credentials
- 404 Not Found - Verify URL
- 429 Too Many Requests - Reduce batch size
- 500 Server Error - External service issue
Tips
- Use expressions to build dynamic URLs
- Set appropriate Content-Type headers
- Handle rate limits with smaller batch sizes
- Check response status in downstream nodes
- Use error output to handle API failures
- Test with a single item before processing many