AutomationFlowsAI & RAG › Ghl Agent AI - Client Onboarding

Ghl Agent AI - Client Onboarding

GHL Agent AI - Client Onboarding. Uses postgres, httpRequest. Webhook trigger; 5 nodes.

Webhook trigger★★★★☆ complexity5 nodesPostgresHTTP Request
AI & RAG Trigger: Webhook Nodes: 5 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": "GHL Agent AI - Client Onboarding",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "onboard-client",
        "responseMode": "responseNode",
        "options": {}
      },
      "id": "webhook-onboard",
      "name": "Webhook - New Client",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "operation": "executeQuery",
        "query": "INSERT INTO clients (client_id, company_name, email, ghl_location_id, plan_tier, status, created_at) VALUES ('{{ $json.body.clientId }}', '{{ $json.body.companyName }}', '{{ $json.body.email }}', '{{ $json.body.ghlLocationId }}', '{{ $json.body.planTier }}', 'active', NOW()) RETURNING *",
        "options": {}
      },
      "id": "create-client-db",
      "name": "Create Client in Database",
      "type": "n8n-nodes-base.postgres",
      "typeVersion": 2.5,
      "position": [
        470,
        300
      ],
      "credentials": {
        "postgres": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "url": "={{ $env.ONEPASSWORD_CONNECT_URL }}/v1/vaults/{{ $env.ONEPASSWORD_VAULT_ID }}/items",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "contentType": "json",
        "body": "={{ JSON.stringify({title: 'GHL-' + $json.client_id, vault: {id: $env.ONEPASSWORD_VAULT_ID}, category: 'LOGIN', fields: [{label: 'email', value: $('Webhook - New Client').item.json.body.ghlEmail}, {label: 'password', value: $('Webhook - New Client').item.json.body.ghlPassword}, {label: 'locationId', value: $json.ghl_location_id}]}) }}",
        "options": {}
      },
      "id": "store-credentials",
      "name": "Store Credentials in 1Password",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        690,
        300
      ],
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "url": "={{ $env.BROWSERBASE_API_URL }}/contexts",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "contentType": "json",
        "body": "={{ JSON.stringify({projectId: $env.BROWSERBASE_PROJECT_ID, id: 'ctx_' + $('Create Client in Database').item.json.client_id}) }}",
        "options": {}
      },
      "id": "create-browser-context",
      "name": "Create Browserbase Context",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        910,
        300
      ],
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ {success: true, clientId: $('Create Client in Database').item.json.client_id, message: 'Client onboarded successfully'} }}",
        "options": {}
      },
      "id": "respond-success",
      "name": "Respond Success",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [
        1130,
        300
      ]
    }
  ],
  "connections": {
    "Webhook - New Client": {
      "main": [
        [
          {
            "node": "Create Client in Database",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Client in Database": {
      "main": [
        [
          {
            "node": "Store Credentials in 1Password",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store Credentials in 1Password": {
      "main": [
        [
          {
            "node": "Create Browserbase Context",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Browserbase Context": {
      "main": [
        [
          {
            "node": "Respond Success",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "1",
  "id": "3",
  "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

GHL Agent AI - Client Onboarding. Uses postgres, httpRequest. Webhook trigger; 5 nodes.

Source: https://github.com/Julianb233/bottleneck-bots/blob/f38ee35d4dd510f951c36cfce8c03aad9c59cce0/n8n-workflows/3-client-onboarding.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

Image Generation Workflow. Uses postgres, httpRequest, editImage. Webhook trigger; 15 nodes.

Postgres, HTTP Request, Edit Image
AI & RAG

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

Postgres, HTTP Request