This workflow follows the HTTP Request → 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 →
{
"name": "B2B Marketing Orchestrator - Main",
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "marketing-api",
"responseMode": "responseNode",
"options": {}
},
"id": "webhook-trigger",
"name": "Webhook Trigger",
"type": "n8n-nodes-base.webhook",
"typeVersion": 1,
"position": [
250,
300
]
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$json[\"body\"][\"action\"]}}",
"operation": "equals",
"value2": "onboard_user"
}
]
}
},
"id": "switch-router",
"name": "Route Request",
"type": "n8n-nodes-base.switch",
"typeVersion": 1,
"position": [
450,
300
]
},
{
"parameters": {
"url": "http://localhost:5678/webhook/user-onboarding",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "user_data",
"value": "={{$json[\"body\"]}}"
}
]
},
"options": {
"timeout": 30000
}
},
"id": "call-onboarding",
"name": "Call User Onboarding",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 3,
"position": [
650,
200
]
},
{
"parameters": {
"url": "http://localhost:5678/webhook/content-generation",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "content_request",
"value": "={{$json[\"body\"]}}"
}
]
},
"options": {
"timeout": 60000
}
},
"id": "call-content-gen",
"name": "Call Content Generation",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 3,
"position": [
650,
300
]
},
{
"parameters": {
"url": "http://localhost:5678/webhook/analytics",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "analytics_request",
"value": "={{$json[\"body\"]}}"
}
]
},
"options": {
"timeout": 20000
}
},
"id": "call-analytics",
"name": "Call Analytics",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 3,
"position": [
650,
400
]
},
{
"parameters": {
"operation": "executeQuery",
"query": "INSERT INTO user_activity (user_id, action, timestamp, data) VALUES ($1, $2, NOW(), $3)",
"additionalFields": {
"queryParams": "={{$json[\"body\"][\"user_id\"]}},={{$json[\"body\"][\"action\"]}},={{JSON.stringify($json[\"body\"])}}"
}
},
"id": "log-activity",
"name": "Log Activity to PostgreSQL",
"type": "n8n-nodes-base.postgres",
"typeVersion": 2,
"position": [
850,
300
],
"credentials": {
"postgres": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"respondWith": "json",
"responseBody": "={{JSON.stringify({\"status\": \"success\", \"data\": $json})}}",
"options": {
"responseCode": 200
}
},
"id": "respond-success",
"name": "Respond to Webhook",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1,
"position": [
1050,
300
]
},
{
"parameters": {
"respondWith": "json",
"responseBody": "={{JSON.stringify({\"status\": \"error\", \"message\": $json[\"error\"][\"message\"]})}}",
"options": {
"responseCode": 500
}
},
"id": "respond-error",
"name": "Error Response",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1,
"position": [
1050,
500
]
}
],
"connections": {
"Webhook Trigger": {
"main": [
[
{
"node": "Route Request",
"type": "main",
"index": 0
}
]
]
},
"Route Request": {
"main": [
[
{
"node": "Call User Onboarding",
"type": "main",
"index": 0
}
],
[
{
"node": "Call Content Generation",
"type": "main",
"index": 0
}
],
[
{
"node": "Call Analytics",
"type": "main",
"index": 0
}
]
]
},
"Call User Onboarding": {
"main": [
[
{
"node": "Log Activity to PostgreSQL",
"type": "main",
"index": 0
}
]
]
},
"Call Content Generation": {
"main": [
[
{
"node": "Log Activity to PostgreSQL",
"type": "main",
"index": 0
}
]
]
},
"Call Analytics": {
"main": [
[
{
"node": "Log Activity to PostgreSQL",
"type": "main",
"index": 0
}
]
]
},
"Log Activity to PostgreSQL": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
}
},
"active": true,
"settings": {
"executionOrder": "v1"
},
"versionId": "1",
"id": "1",
"tags": []
}
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
B2B Marketing Orchestrator - Main. Uses httpRequest, postgres. Webhook trigger; 8 nodes.
Source: https://github.com/Yaakovyitzchak1231/CLAUDE-CODE_Marketing-Agent/blob/a9f11690dfb44a4e0f520ab2cd1436f06b18c442/n8n-workflows/main-orchestrator.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.
Jigsaw API key for image processing, I use this as a gatekeeper/second pair of eyes. LINK to their website https://jigsawstack.com/ SECOND A postgress DATABASE (I use Supabase) LlamaCloud for the pars
Content Review Loop Workflow. Uses postgres, httpRequest. Webhook trigger; 20 nodes.
Creates an AI-powered sales and support agent connected to live store data from Shopify/WooCommerce. MCP ensures controlled access to inventory and order systems. Automatically handles customer querie
Content Generation Workflow. Uses postgres, httpRequest. Webhook trigger; 13 nodes.
Crystal Clear Voices - Social Media Agent. Uses postgres, httpRequest. Webhook trigger; 11 nodes.