{
  "id": "86AlA0p2E5X4GcgN",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Zoho CRM - Buyer Persona Matcher",
  "tags": [],
  "nodes": [
    {
      "id": "2f8a925b-780c-4d01-a347-e7621d177b1f",
      "name": "Workflow Configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        -1632,
        80
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "id-1",
              "name": "phantombusterAgentId",
              "type": "string",
              "value": "6534253830618372"
            },
            {
              "id": "id-2",
              "name": "personaMatchThreshold",
              "type": "number",
              "value": 0.7
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "890390aa-2a2f-45af-bf25-83eb3b2478a0",
      "name": "Extract Contact Data",
      "type": "n8n-nodes-base.set",
      "position": [
        -864,
        80
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "id-1",
              "name": "contactName",
              "type": "string",
              "value": "={{ $json.Contact_Name.name }}"
            },
            {
              "id": "id-2",
              "name": "contactEmail",
              "type": "string",
              "value": "={{ $json.Contact_Name.email || $('Workflow Configuration').first().json.body.contact_email }}"
            },
            {
              "id": "id-3",
              "name": "linkedInUrl",
              "type": "string",
              "value": "={{ $json.Next_Step }}"
            },
            {
              "id": "id-4",
              "name": "dealId",
              "type": "string",
              "value": "={{ $json.id }}"
            },
            {
              "id": "id-5",
              "name": "dealName",
              "type": "string",
              "value": "={{ $json.Deal_Name }}"
            },
            {
              "id": "id-6",
              "name": "dealAmount",
              "type": "number",
              "value": "={{ $json.Amount }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "f6424b8f-d47f-40f5-bc95-8cbbd7b83bb5",
      "name": "Scrape LinkedIn Profile",
      "type": "n8n-nodes-base.phantombuster",
      "position": [
        -240,
        80
      ],
      "parameters": {
        "agentId": "6534253830618372",
        "additionalFields": {}
      },
      "credentials": {
        "phantombusterApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "c97d6918-ae23-488f-b379-65643e62d7a1",
      "name": "Persona Database",
      "type": "n8n-nodes-base.set",
      "position": [
        0,
        80
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "id-1",
              "name": "personas",
              "type": "array",
              "value": "[{\"id\": \"executive_decision_maker\", \"name\": \"Executive Decision Maker\", \"characteristics\": [\"C-level or VP title\", \"10+ years experience\", \"Strategic focus\", \"Budget authority\"], \"communication_style\": \"Direct and results-oriented. Focus on ROI and strategic impact.\", \"talking_points\": [\"Bottom-line impact\", \"Competitive advantage\", \"Long-term strategic value\", \"Risk mitigation\"]}, {\"id\": \"technical_evaluator\", \"name\": \"Technical Evaluator\", \"characteristics\": [\"Engineering or technical role\", \"Hands-on experience\", \"Detail-oriented\", \"Integration concerns\"], \"communication_style\": \"Technical and detailed. Provide specifications and implementation details.\", \"talking_points\": [\"Technical architecture\", \"Integration capabilities\", \"Security features\", \"Scalability and performance\"]}, {\"id\": \"business_analyst\", \"name\": \"Business Analyst\", \"characteristics\": [\"Operations or business role\", \"Process-focused\", \"Data-driven\", \"Efficiency-minded\"], \"communication_style\": \"Process-oriented and analytical. Show workflows and efficiency gains.\", \"talking_points\": [\"Process optimization\", \"Efficiency metrics\", \"Workflow automation\", \"Time savings\"]}]"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "52b6d060-ee88-41a7-a198-b36d67fe7003",
      "name": "Persona Matcher & Outreach Generator",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        624,
        80
      ],
      "parameters": {
        "text": "=LinkedIn Profile Data: {{ JSON.stringify($json) }}\n\nContact Information:\n- Name: {{ $('Extract Contact Data').first().json.contactName }}\n- Email: {{ $('Extract Contact Data').first().json.contactEmail }}\n- Deal: {{ $('Extract Contact Data').first().json.dealName }} (${{ $('Extract Contact Data').first().json.dealAmount }})\n\nAvailable Personas: {{ JSON.stringify($('Persona Database').first().json.personas) }}",
        "options": {
          "systemMessage": "You are an expert sales intelligence analyst specializing in buyer persona matching and personalized outreach strategy.\n\nYour task is to:\n1. Analyze the LinkedIn profile data provided (job title, experience, skills, company, industry)\n2. Match the contact to the most appropriate buyer persona from the available personas\n3. Calculate a confidence score (0-1) for the persona match\n4. Suggest a personalized communication style based on the persona\n5. Recommend 3-5 specific talking points tailored to this contact\n6. Generate a personalized outreach message (2-3 paragraphs)\n\nBe specific and reference actual details from the LinkedIn profile in your recommendations. Focus on what will resonate with this particular individual based on their role, experience and background."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3
    },
    {
      "id": "1bcf9b9b-4cdb-4979-9365-b50282ce4140",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        800,
        272
      ],
      "parameters": {
        "jsonSchemaExample": "{\n\t\"matched_persona_id\": \"executive_decision_maker\",\n\t\"matched_persona_name\": \"Executive Decision Maker\",\n\t\"confidence_score\": 0.85,\n\t\"reasoning\": \"Contact has VP title with 12 years experience and strategic focus\",\n\t\"communication_style\": \"Direct, results-focused, emphasize ROI and strategic impact\",\n\t\"recommended_talking_points\": [\"Revenue growth potential\", \"Competitive market positioning\", \"Strategic partnership value\"],\n\t\"personalized_outreach\": \"Hi [Name], I noticed your impressive track record in driving strategic initiatives at [Company]...\"\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "2aae41f8-3e37-4014-a3bd-99ad77ec7152",
      "name": "Update Zoho CRM Contact",
      "type": "n8n-nodes-base.zohoCrm",
      "position": [
        1072,
        80
      ],
      "parameters": {
        "resource": "contact",
        "contactId": "={{ $('Get Deal Record').first().json.Contact_Name.id }}",
        "operation": "update",
        "updateFields": {
          "Description": "={{ 'Persona: ' + $json.output.matched_persona_name + ' | Confidence: ' + $json.output.confidence_score + ' | Style: ' + $json.output.communication_style + ' | Talking Points: ' + $json.output.recommended_talking_points.join(', ') + ' | Outreach: ' + $json.output.personalized_outreach }}"
        }
      },
      "credentials": {
        "zohoOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "20e65d4b-1098-41d7-b149-cc33f291211f",
      "name": "Zoho CRM Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1872,
        80
      ],
      "parameters": {
        "path": "zoho-crm-contact-deal",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2.1
    },
    {
      "id": "6e0ac3af-52dd-4fd0-a5a6-05e718588f4a",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        608,
        272
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "fee7ace1-4e04-4f3f-a7b1-1c15d4e8b066",
      "name": "Get Deal Record",
      "type": "n8n-nodes-base.zohoCrm",
      "position": [
        -1056,
        80
      ],
      "parameters": {
        "dealId": "={{ $json.body.deal_id }}",
        "resource": "deal",
        "operation": "get"
      },
      "credentials": {
        "zohoOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1,
      "alwaysOutputData": true
    },
    {
      "id": "3deef7f5-3ab4-4715-9810-fc966df66fcd",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2672,
        -256
      ],
      "parameters": {
        "width": 496,
        "height": 688,
        "content": "# How It Works\n### This workflow automates buyer persona identification by enriching Zoho CRM deal data with real-time LinkedIn professional insights to generate tailored sales outreach strategies.\n# Setup Steps\n## Trigger\nConfigure a Zoho CRM Webhook to send data when a new \"Potential\" (Deal) is created or updated with a LinkedIn URL.\n\n## Connections\nLink credentials for Zoho CRM (data), Phantombuster (scraping) and OpenAI (persona analysis).\n\n## Configuration\nDefine your persona match threshold and Phantombuster Agent ID in the configuration node to control automation sensitivity.\n\n## Intelligence Sync\nThe system automatically updates the Contact record in Zoho CRM with the identified persona, confidence score and a draft outreach message."
      },
      "typeVersion": 1
    },
    {
      "id": "035744f1-a817-4c25-98c0-37695960e9ad",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2048,
        -128
      ],
      "parameters": {
        "color": 7,
        "width": 720,
        "height": 496,
        "content": "## Webhook Trigger & Set Configuration\nThe process begins with a Webhook Trigger listening for deal updates in Zoho CRM. This is followed by a Workflow Configuration node that establishes operational parameters, such as the scraping agent ID and the minimum confidence threshold required to validate a buyer persona match.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "38c26d9a-f10c-4198-b18c-f48df05dc6ef",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1280,
        -128
      ],
      "parameters": {
        "color": 7,
        "width": 736,
        "height": 496,
        "content": "## CRM Data Retrieval and Field Mapping\nThis segment retrieves the full record details from Zoho CRM based on the webhook payload. It then maps specific fields\u2014including contact names, emails and LinkedIn URLs\u2014into a structured format for the scraping and AI analysis stages.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "476bf0fb-068b-4ccf-a170-5e8ae6ee5cec",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -480,
        -128
      ],
      "parameters": {
        "color": 7,
        "width": 768,
        "height": 496,
        "content": "## Profile Scraping and Persona Reference\nThis section uses a Phantombuster integration to scrape professional data from LinkedIn, providing the AI with real-time context on job titles and experience. It simultaneously references a Persona Database node that stores standardized buyer profiles (e.g., Executive, Technical) for comparison.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "55f3b588-bea2-40b7-8d5d-722571ed5f8d",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        384,
        -128
      ],
      "parameters": {
        "color": 7,
        "width": 928,
        "height": 560,
        "content": "## AI-Driven Matching and CRM Synchronization\nThe final stage uses an AI Agent to compare LinkedIn data against the persona database. It calculates a match score and generates specific talking points. These insights, along with a personalized outreach draft, are then automatically synced back to the Zoho CRM contact record."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "6be06ec7-a8e7-4b92-b6c7-e5e4edc1e767",
  "connections": {
    "Get Deal Record": {
      "main": [
        [
          {
            "node": "Extract Contact Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Persona Database": {
      "main": [
        [
          {
            "node": "Persona Matcher & Outreach Generator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Zoho CRM Webhook": {
      "main": [
        [
          {
            "node": "Workflow Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Persona Matcher & Outreach Generator",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Extract Contact Data": {
      "main": [
        [
          {
            "node": "Scrape LinkedIn Profile",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Configuration": {
      "main": [
        [
          {
            "node": "Get Deal Record",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scrape LinkedIn Profile": {
      "main": [
        [
          {
            "node": "Persona Database",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Persona Matcher & Outreach Generator",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Persona Matcher & Outreach Generator": {
      "main": [
        [
          {
            "node": "Update Zoho CRM Contact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}