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": "sub007-knowledge-record-creator-00",
"name": "SUB-007-knowledge-record-creator",
"nodes": [
{
"parameters": {
"inputSource": "passthrough"
},
"id": "s7000000-0007-0007-0007-000000000001",
"name": "Execute Workflow Trigger",
"type": "n8n-nodes-base.executeWorkflowTrigger",
"typeVersion": 1.1,
"position": [
240,
300
]
},
{
"parameters": {
"operation": "executeQuery",
"query": "={{ `INSERT INTO knowledge_records (topic_id, record_type, content, source_url, source_name, confidence_score, created_at) VALUES (${$json.topic_id}, '${($json.record_type || 'fact').replace(/'/g, \"''\")}', '${($json.content || '').replace(/'/g, \"''\")}', ${$json.source_url ? `'${$json.source_url.replace(/'/g, \"''\")}'` : 'NULL'}, ${$json.source_name ? `'${$json.source_name.replace(/'/g, \"''\")}'` : 'NULL'}, ${parseFloat($json.confidence_score) || 0.8}, NOW()) RETURNING id` }}",
"options": {}
},
"id": "s7000000-0007-0007-0007-000000000002",
"name": "Insert Knowledge Record",
"type": "n8n-nodes-base.postgres",
"typeVersion": 2.5,
"position": [
460,
300
],
"credentials": {
"postgres": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"jsCode": "return [{ json: { knowledge_record_id: $input.item.json.id, ok: true } }];"
},
"id": "s7000000-0007-0007-0007-000000000003",
"name": "Return",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
680,
300
]
}
],
"connections": {
"Execute Workflow Trigger": {
"main": [
[
{
"node": "Insert Knowledge Record",
"type": "main",
"index": 0
}
]
]
},
"Insert Knowledge Record": {
"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-007-knowledge-record-creator. Uses executeWorkflowTrigger, postgres. Event-driven trigger; 3 nodes.
Source: https://github.com/navin-labs/content-factory-os/blob/main/n8n/workflows/subworkflows/SUB-007-knowledge-record-creator.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.