Overview
This node provides a generic interface to interact with REST APIs by performing common CRUD operations on any specified resource. It is useful when you want to integrate with an API that does not have a dedicated n8n node or when you need flexible, custom API calls without writing code.
Typical use cases include:
- Creating new records in an external system by sending JSON data.
- Retrieving single or multiple records from an API.
- Updating existing records by ID.
- Deleting records by ID.
- Adding custom HTTP headers or query parameters for advanced API requirements.
For example, you could use this node to create a new user in a CRM system by specifying the "users" resource and providing the user data as JSON.
Properties
| Name | Meaning |
|---|---|
| Dados | JSON data representing the record to create. |
| Opções Adicionais | Additional options for the request: |
| - Headers Customizados | Custom HTTP headers to send with the request (JSON object). |
| - Query Parameters | Query parameters to add to the URL (JSON object). |
| - Timeout | Request timeout in milliseconds (number). |
| - Continuar Em Erro | Whether to continue workflow execution if an error occurs (boolean). |
Output
The node outputs the response from the API call in the json field of each item. The structure depends on the API's response but generally contains the created record's details when using the "create" operation.
If the API returns multiple items (e.g., in "getAll"), each item is output separately with its JSON data.
No binary data output is produced by this node.
Dependencies
- Requires an API key credential configured in n8n to authenticate requests.
- Uses a helper class internally to make HTTP requests.
- No additional external dependencies beyond standard HTTP connectivity.
Troubleshooting
Common issues:
- Invalid JSON in the "Dados" property can cause parsing errors.
- Incorrect resource names or IDs will result in API errors.
- Network timeouts if the API is slow or unreachable.
- Missing or invalid API credentials will cause authentication failures.
Error handling:
- If "Continuar Em Erro" is enabled, errors are returned as JSON objects with
erroranddetailsfields instead of stopping the workflow. - Without this option, errors throw exceptions that stop execution.
- Check the error message and details to diagnose issues such as invalid input, unauthorized access, or server errors.
- If "Continuar Em Erro" is enabled, errors are returned as JSON objects with
Links and References
- n8n Documentation on Creating Nodes
- General REST API concepts: https://restfulapi.net/