AutomationFlowsAI & RAG › B2b Marketing Orchestrator - Main

B2b Marketing Orchestrator - Main

B2B Marketing Orchestrator - Main. Uses httpRequest, postgres. Webhook trigger; 8 nodes.

Webhook trigger★★★★☆ complexity8 nodesHTTP RequestPostgres
AI & RAG Trigger: Webhook Nodes: 8 Complexity: ★★★★☆ Added:

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 →

Download .json
{
  "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.

Pro

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 →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

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

HTTP Request, Postgres, Stop And Error +2
AI & RAG

Content Review Loop Workflow. Uses postgres, httpRequest. Webhook trigger; 20 nodes.

Postgres, HTTP Request
AI & RAG

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

HTTP Request, Postgres, Email Send
AI & RAG

Content Generation Workflow. Uses postgres, httpRequest. Webhook trigger; 13 nodes.

Postgres, HTTP Request
AI & RAG

Crystal Clear Voices - Social Media Agent. Uses postgres, httpRequest. Webhook trigger; 11 nodes.

Postgres, HTTP Request