This workflow follows the Execute Workflow Trigger → Postgres recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"id": "sub002-dead-letter-queue-0000000",
"name": "SUB-002-dead-letter-queue",
"nodes": [
{
"parameters": {
"inputSource": "passthrough"
},
"id": "c1000000-0002-0002-0002-000000000001",
"name": "Trigger",
"type": "n8n-nodes-base.executeWorkflowTrigger",
"typeVersion": 1.1,
"position": [
240,
500
]
},
{
"parameters": {
"operation": "executeQuery",
"query": "={{ `INSERT INTO errors (workflow_name, execution_id, node_name, error_type, error_message, payload, resolved, created_at) VALUES ('${($json.workflow_name||'').replace(/'/g,\"''\")}', '${($json.execution_id||'').replace(/'/g,\"''\")}', '${($json.node_name||'').replace(/'/g,\"''\")}', '${($json.error_type||'').replace(/'/g,\"''\")}', '${($json.error_message||'').replace(/'/g,\"''\")}', '${JSON.stringify($json.payload||{}).replace(/'/g,\"''\")}', false, NOW()) RETURNING id` }}",
"options": {}
},
"id": "c1000000-0002-0002-0002-000000000002",
"name": "Insert Error",
"type": "n8n-nodes-base.postgres",
"typeVersion": 2.5,
"position": [
460,
500
],
"credentials": {
"postgres": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "c1000000-0002-0002-0002-000000000010",
"name": "error_id",
"value": "={{ $json.id }}",
"type": "number"
},
{
"id": "c1000000-0002-0002-0002-000000000011",
"name": "message",
"value": "={{ (() => { const esc = s => String(s == null ? '' : s).replace(/_/g, ' ').replace(/[*`\\[]/g, ''); return `\ud83d\udea8 *WORKFLOW ERROR*\\nWorkflow: ${esc($('Trigger').item.json.workflow_name)}\\nNode: ${esc($('Trigger').item.json.node_name)}\\nError: ${esc($('Trigger').item.json.error_message)}\\nTime: ${new Date().toISOString()}`; })() }}",
"type": "string"
},
{
"id": "c1000000-0002-0002-0002-000000000012",
"name": "parse_mode",
"value": "Markdown",
"type": "string"
},
{
"id": "c1000000-0002-0002-0002-000000000013",
"name": "inline_keyboard",
"value": "=[]",
"type": "array"
}
]
},
"options": {}
},
"id": "c1000000-0002-0002-0002-000000000003",
"name": "Prepare Alert",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
680,
500
]
},
{
"parameters": {
"workflowId": {
"__rl": true,
"value": "sub003-telegram-notification-000000",
"mode": "id"
},
"options": {}
},
"id": "c1000000-0002-0002-0002-000000000004",
"name": "Notify via SUB-003",
"type": "n8n-nodes-base.executeWorkflow",
"typeVersion": 1.1,
"position": [
900,
500
]
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "c1000000-0002-0002-0002-000000000020",
"name": "error_id",
"value": "={{ $('Prepare Alert').item.json.error_id }}",
"type": "number"
}
]
},
"options": {}
},
"id": "c1000000-0002-0002-0002-000000000005",
"name": "Return",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
1120,
500
]
}
],
"connections": {
"Trigger": {
"main": [
[
{
"node": "Insert Error",
"type": "main",
"index": 0
}
]
]
},
"Insert Error": {
"main": [
[
{
"node": "Prepare Alert",
"type": "main",
"index": 0
}
]
]
},
"Prepare Alert": {
"main": [
[
{
"node": "Notify via SUB-003",
"type": "main",
"index": 0
}
]
]
},
"Notify via SUB-003": {
"main": [
[
{
"node": "Return",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
postgres
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
SUB-002-dead-letter-queue. Uses executeWorkflowTrigger, postgres. Event-driven trigger; 5 nodes.
Source: https://github.com/navin-labs/content-factory-os/blob/main/n8n/workflows/subworkflows/SUB-002-dead-letter-queue.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Reagendamiento_v2. Uses executeWorkflowTrigger, redis, httpRequest, n8n-nodes-evolution-api. Event-driven trigger; 89 nodes.
Agendamiento_v2. Uses n8n-nodes-evolution-api, redis, httpRequest, executeWorkflowTrigger. Event-driven trigger; 59 nodes.
Cancelacion_v2. Uses executeWorkflowTrigger, redis, httpRequest, n8n-nodes-evolution-api. Event-driven trigger; 46 nodes.
Save_Extraction. Uses executeWorkflowTrigger, postgres, httpRequest. Event-driven trigger; 22 nodes.
Youtube Searcher. Uses splitInBatches, httpRequest, manualTrigger, executeWorkflowTrigger. Event-driven trigger; 21 nodes.