AutomationFlowsMarketing & Ads › Messenger Lead Flow

Messenger Lead Flow

Messenger Lead Flow. Uses httpRequest. Webhook trigger; 3 nodes.

Webhook trigger★★★★☆ complexity3 nodesHTTP Request
Marketing & Ads Trigger: Webhook Nodes: 3 Complexity: ★★★★☆ Added:

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": "Messenger Lead Flow",
  "description": "\u0e23\u0e31\u0e1a Messenger webhook \u2192 AI \u0e15\u0e2d\u0e1a\u0e2d\u0e31\u0e15\u0e42\u0e19\u0e21\u0e31\u0e15\u0e34 + \u0e2a\u0e01\u0e31\u0e14\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e25\u0e39\u0e01\u0e04\u0e49\u0e32 \u2192 \u0e1a\u0e31\u0e19\u0e17\u0e36\u0e01\u0e25\u0e07 database",
  "notes": "Flow \u0e19\u0e35\u0e49\u0e40\u0e1b\u0e47\u0e19 backup/reference \u0e40\u0e17\u0e48\u0e32\u0e19\u0e31\u0e49\u0e19 \u2014 \u0e15\u0e2d\u0e19\u0e19\u0e35\u0e49 backend \u0e08\u0e31\u0e14\u0e01\u0e32\u0e23 AI reply + save \u0e42\u0e14\u0e22\u0e15\u0e23\u0e07\u0e41\u0e25\u0e49\u0e27 \u0e44\u0e21\u0e48\u0e15\u0e49\u0e2d\u0e07 import \u0e40\u0e02\u0e49\u0e32 n8n \u0e01\u0e47\u0e44\u0e14\u0e49",
  "architecture": {
    "primary_flow": "Facebook Messenger \u2192 Backend (POST /api/webhooks/messenger) \u2192 OpenAI \u2192 Reply + Save Customer/Lead",
    "n8n_role": "\u0e43\u0e0a\u0e49\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a order status notification (\u0e41\u0e08\u0e49\u0e07\u0e25\u0e39\u0e01\u0e04\u0e49\u0e32\u0e40\u0e21\u0e37\u0e48\u0e2d\u0e2a\u0e16\u0e32\u0e19\u0e30\u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19) \u0e41\u0e25\u0e30 automation \u0e2d\u0e37\u0e48\u0e19\u0e46 \u0e43\u0e19\u0e2d\u0e19\u0e32\u0e04\u0e15"
  },
  "nodes": [
    {
      "id": "webhook",
      "type": "n8n-nodes-base.webhook",
      "name": "Receive Messenger Event",
      "parameters": {
        "path": "messenger",
        "method": "POST"
      }
    },
    {
      "id": "extract_event",
      "type": "n8n-nodes-base.code",
      "name": "Extract Event Data",
      "parameters": {
        "code": "const body = $input.item.json;\nconst messaging = body?.entry?.[0]?.messaging?.[0];\nconst psid = messaging?.sender?.id;\nconst text = messaging?.message?.text || '';\nconst ref = messaging?.referral?.ref || '';\n\nreturn [{ json: { psid, text, ref, raw: messaging } }];"
      }
    },
    {
      "id": "forward_to_backend",
      "type": "n8n-nodes-base.httpRequest",
      "name": "Forward to Backend API",
      "description": "\u0e2a\u0e48\u0e07\u0e43\u0e2b\u0e49 backend \u0e08\u0e31\u0e14\u0e01\u0e32\u0e23 AI reply + save \u0e17\u0e31\u0e49\u0e07\u0e2b\u0e21\u0e14",
      "parameters": {
        "url": "={{ $env.HATFIXCLEAN_API_URL }}/api/webhooks/messenger",
        "method": "POST",
        "body": "={{ $input.item.json.raw }}"
      }
    }
  ],
  "connections": {
    "webhook": {
      "main": [
        [
          "extract_event"
        ]
      ]
    },
    "extract_event": {
      "main": [
        [
          "forward_to_backend"
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Messenger Lead Flow. Uses httpRequest. Webhook trigger; 3 nodes.

Source: https://github.com/chananpr/hatcleanfix/blob/d0860a45343ccb63c8f74afa93cbc982fc13c9ab/automation/workflows/messenger-lead-flow.json — original creator credit. Request a take-down →

More Marketing & Ads workflows → · Browse all categories →

Related workflows

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

Marketing & Ads

This workflow automates bulk email campaigns with built-in validation, deliverability protection, and smart send-time optimization.

HTTP Request, Postgres, Gmail
Marketing & Ads

This workflow is designed to manage the assignment and validation of unique QR code coupons within a lead generation system with SuiteCRM.

HTTP Request, Form Trigger, Google Sheets +1
Marketing & Ads

This workflow acts as an instant SDR that replies to new inbound leads across multiple channels in real time. It first captures and normalizes all incoming lead data into a unified structure. The work

Google Sheets, HTTP Request, Gmail +1
Marketing & Ads

AI Lead Qualification & Roting System. Uses httpRequest, twilio, airtable. Webhook trigger; 26 nodes.

HTTP Request, Twilio, Airtable
Marketing & Ads

A comprehensive n8n workflow template for streamlining influencer application processing with real-time social media data validation, intelligent scoring algorithms, and automated onboarding workflows

N8N Nodes Verifiemail, Stop And Error, HTTP Request +2