KEEP LEARNING
Build the bigger picture.
The Workflow Engineer connects individual n8n concepts to testing, deployment and running a complete workflow.
Tips > Data, APIs & Webhooks
You can build a complete REST API inside n8n by using multiple Webhook nodes with different HTTP methods and paths.
You can build a full REST API inside n8n by using several Webhook nodes, each bound to one HTTP method and path (GET, POST, PUT, DELETE). Every webhook handles a single operation and can share validation or authentication through sub-workflows called with the Execute Workflow node, giving your frontend or mobile app a complete CRUD backend with no external framework.
You can build a complete REST API inside n8n by using multiple Webhook nodes with different HTTP methods and paths. Each webhook handles one operation (GET, POST, PUT, DELETE), and they can share downstream logic through sub-workflows or common Code nodes.
Real-world example: Build a simple task management API that a mobile app or frontend can call.
Create four separate workflows (or use one workflow with four Webhook trigger nodes if your n8n version supports it):
GET /webhook/api/tasks --> List all tasks
POST /webhook/api/tasks --> Create a task
PUT /webhook/api/tasks/:taskId --> Update a task
DELETE /webhook/api/tasks/:taskId --> Delete a task
Workflow 1 -- List Tasks (GET):
// Webhook node config
{
"httpMethod": "GET",
"path": "api/tasks",
"responseMode": "responseNode"
}
-- Postgres node: Fetch tasks (parameterized)
SELECT id, title, status, created_at
FROM tasks
WHERE deleted_at IS NULL
ORDER BY created_at DESC
LIMIT $1
OFFSET $2;
-- Query Parameter 1: {{ $json.query.limit || 50 }}
-- Query Parameter 2: {{ $json.query.offset || 0 }}
// Respond to Webhook node
{
"respondWith": "json",
"responseCode": 200,
"responseBody": "={{ { \"tasks\": $json, \"count\": $json.length } }}"
}
Workflow 2 -- Create Task (POST):
// Webhook node config
{
"httpMethod": "POST",
"path": "api/tasks",
"responseMode": "responseNode"
}
-- Postgres node: Insert task (parameterized)
INSERT INTO tasks (title, status, created_at)
VALUES ($1, 'pending', NOW())
RETURNING id, title, status, created_at;
-- Query Parameter 1: {{ $json.body.title }}
// Respond to Webhook node
{
"respondWith": "json",
"responseCode": 201,
"responseBody": "={{ { \"task\": $json } }}"
}
This pattern gives you a full CRUD API without an external framework. Your frontend or mobile app hits n8n directly.
Tip: Use sub-workflows for shared logic
If multiple endpoints share validation or authentication logic, extract it into a sub-workflow called via the Execute Workflow node. This keeps each webhook workflow focused on its HTTP operation.
Related: Set a Unique Encryption Key and Back It Up · Use the HTTP Request Node as a Universal Connector
KEEP LEARNING
The Workflow Engineer connects individual n8n concepts to testing, deployment and running a complete workflow.
APPLY IT TO YOUR SYSTEM
Bring the process, the tools involved and an example of where the current workflow gets stuck.