{
  "name": "Multi-Source Lead Routing",
  "tags": [],
  "nodes": [
    {
      "id": "cd8e0aa7-1991-4ecd-966f-15249c8b7244",
      "name": "📋 Typeform Submission Trigger",
      "type": "n8n-nodes-base.typeformTrigger",
      "position": [
        -1200,
        130
      ],
      "parameters": {
        "formId": "{{YOUR_TYPEFORM_ID}}"
      },
      "credentials": {
        "typeformApi": {
          "id": "REPLACE_WITH_YOUR_CREDENTIAL_ID",
          "name": "Configure typeformApi in n8n"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "ec35de3e-7722-4445-80ed-c6cc2a3941dc",
      "name": "💰 Check High-Budget Lead",
      "type": "n8n-nodes-base.if",
      "position": [
        -980,
        130
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "high-priority-budget",
              "operator": {
                "type": "number",
                "operation": "gt"
              },
              "leftValue": "={{ $json['What is your Budget'] }}",
              "rightValue": 5000
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "e1271e83-fa1a-4ba1-9c8c-bf7f1f38261c",
      "name": "📘 Check if Facebook Lead",
      "type": "n8n-nodes-base.if",
      "position": [
        -320,
        130
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "facebook-source",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $json.lead_source || $json.source }}",
              "rightValue": "Facebook"
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "bc9727ca-0cf7-4d89-b771-ca354537df5c",
      "name": "📊 Check if SurveyMonkey Lead",
      "type": "n8n-nodes-base.if",
      "position": [
        -100,
        205
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "surveymonkey-source",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $json.lead_source || $json.source }}",
              "rightValue": "SurveyMonkey"
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "22344a6e-e585-44f9-a896-a48720d9da6b",
      "name": "👤 HubSpot — Create/Update Contact",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        -760,
        130
      ],
      "parameters": {
        "email": "={{ $json.Email }}",
        "options": {},
        "authentication": "appToken",
        "additionalFields": {
          "firstName": "={{ $json.Name }}",
          "phoneNumber": "={{ $json['Phone Number'] }}",
          "customPropertiesUi": {
            "customPropertiesValues": [
              {
                "value": "={{ $json['What is your Budget'] }}",
                "property": "Budget"
              }
            ]
          }
        }
      },
      "credentials": {
        "hubspotAppToken": {
          "id": "REPLACE_WITH_YOUR_CREDENTIAL_ID",
          "name": "Configure hubspotAppToken in n8n"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "fb3aba79-a82b-4a75-8174-46bcd8b77957",
      "name": "📝 HubSpot — Add Priority Task",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        -540,
        130
      ],
      "parameters": {
        "type": "task",
        "metadata": {
          "body": "=Priority - High (Budget - {{ $json['What is your Budget'] }})"
        },
        "resource": "engagement",
        "authentication": "appToken",
        "additionalFields": {}
      },
      "credentials": {
        "hubspotAppToken": {
          "id": "REPLACE_WITH_YOUR_CREDENTIAL_ID",
          "name": "Configure hubspotAppToken in n8n"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "bc870ccf-8759-40ad-b7f6-5dc9e310fa9e",
      "name": "📄 Log Facebook Lead to Google Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        120,
        40
      ],
      "parameters": {
        "columns": {
          "value": {},
          "schema": [],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "id",
          "value": "YOUR_GOOGLE_SHEET_TAB_ID"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "YOUR_GOOGLE_SHEET_ID"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "REPLACE_WITH_YOUR_CREDENTIAL_ID",
          "name": "Configure googleSheetsOAuth2Api in n8n"
        }
      },
      "typeVersion": 4
    },
    {
      "id": "9690a043-4ad1-4d69-aa34-1429983f864a",
      "name": "📦 Store SurveyMonkey Lead in Airtable",
      "type": "n8n-nodes-base.airtable",
      "position": [
        120,
        280
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "id",
          "value": "YOUR_AIRTABLE_BASE_ID"
        },
        "table": {
          "__rl": true,
          "mode": "id",
          "value": "YOUR_AIRTABLE_TABLE_ID"
        },
        "columns": {
          "value": {},
          "schema": [
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Phone Number",
              "type": "number",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Phone Number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Message",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Message",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "create",
        "authentication": "airtableOAuth2Api"
      },
      "credentials": {
        "airtableOAuth2Api": {
          "id": "REPLACE_WITH_YOUR_CREDENTIAL_ID",
          "name": "Configure airtableOAuth2Api in n8n"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "6e6d35a3-1c45-43b6-86ee-f99397dfe924",
      "name": "📧 Send Gmail Auto-Response",
      "type": "n8n-nodes-base.gmail",
      "position": [
        340,
        130
      ],
      "parameters": {
        "sendTo": "={{ $json.email }}",
        "message": "Hi {{ $json.name || $json.first_name }},\n\nThank you for your interest. Our sales team will reach out within 24 hours.\n\nBest regards,\nSales Team",
        "options": {
          "ccList": "",
          "bccList": ""
        },
        "subject": "Thanks for reaching out — We'll get back soon"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "REPLACE_WITH_YOUR_CREDENTIAL_ID",
          "name": "Configure gmailOAuth2 in n8n"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "6eea1967-e1ee-4f57-aa68-f0fca9304c00",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1260,
        -200
      ],
      "parameters": {
        "color": 5,
        "width": 440,
        "height": 660,
        "content": "## 📋 Form Intake & Lead Qualification\n\n**📋 Typeform Submission Trigger → 💰 Check High-Budget Lead**\n\n*This section captures new lead data from the Typeform submission. It immediately evaluates the budget field to determine whether the lead is high priority (budget > $5,000), allowing the workflow to route premium leads for faster follow-up.*"
      },
      "typeVersion": 1
    },
    {
      "id": "59c9b01f-a262-42d4-aa0c-a92f5a874f67",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -800,
        -200
      ],
      "parameters": {
        "width": 400,
        "height": 660,
        "content": "## 👤 CRM Integration & Priority Handling\n\n**👤 HubSpot — Create/Update Contact → 📝 HubSpot — Add Priority Task**\n\n*For high-priority leads, the workflow automatically creates or updates the corresponding contact in HubSpot, adding their budget and other details. It then logs a priority follow-up task in HubSpot to ensure the sales team responds promptly.*"
      },
      "typeVersion": 1
    },
    {
      "id": "df5fcd72-2882-40f4-a398-4d49b0eb55f8",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -380,
        -200
      ],
      "parameters": {
        "color": 4,
        "width": 420,
        "height": 660,
        "content": "## 📘/📊 Lead Source Routing & Storage\n\n**📘 Check if Facebook Lead → 📄 Log Facebook Lead to Google Sheet\n📊 Check if SurveyMonkey Lead → 📦 Store SurveyMonkey Lead in Airtable**\n\n*This section routes leads based on their source. Facebook leads are logged in Google Sheets for marketing analysis, while SurveyMonkey leads are stored in Airtable for structured data management and campaign tracking.*"
      },
      "typeVersion": 1
    },
    {
      "id": "4e93476a-9dd5-49c5-865f-a8d95d6d2415",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        60,
        -260
      ],
      "parameters": {
        "color": 3,
        "width": 420,
        "height": 720,
        "content": "## 📧 Automated Lead Acknowledgment\n\n**📄 Log Facebook Lead to Google Sheet → 📧 Send Gmail Auto-Response\n📦 Store SurveyMonkey Lead in Airtable → 📧 Send Gmail Auto-Response**\n\n*After the lead's data is stored in the appropriate system, the workflow sends an automated acknowledgment email via Gmail, confirming receipt of their inquiry and setting the expectation for a 24-hour follow-up.*"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "connections": {
    "💰 Check High-Budget Lead": {
      "main": [
        [
          {
            "node": "👤 HubSpot — Create/Update Contact",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "📘 Check if Facebook Lead": {
      "main": [
        [
          {
            "node": "📄 Log Facebook Lead to Google Sheet",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "📊 Check if SurveyMonkey Lead",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📊 Check if SurveyMonkey Lead": {
      "main": [
        [
          {
            "node": "📦 Store SurveyMonkey Lead in Airtable",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "📧 Send Gmail Auto-Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📋 Typeform Submission Trigger": {
      "main": [
        [
          {
            "node": "💰 Check High-Budget Lead",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📝 HubSpot — Add Priority Task": {
      "main": [
        [
          {
            "node": "📘 Check if Facebook Lead",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "👤 HubSpot — Create/Update Contact": {
      "main": [
        [
          {
            "node": "📝 HubSpot — Add Priority Task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📄 Log Facebook Lead to Google Sheet": {
      "main": [
        [
          {
            "node": "📧 Send Gmail Auto-Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📦 Store SurveyMonkey Lead in Airtable": {
      "main": [
        [
          {
            "node": "📧 Send Gmail Auto-Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
