{
  "nodes": [
    {
      "id": "ca78bdea-09b3-4b1b-a5eb-8dd6951949af",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        768,
        336
      ],
      "parameters": {
        "text": "=Analyze the following automation professional's profile and create personalized LinkedIn and email outreach messages from ObisDev:\n\n**Target Profile:**\n- Name: { { $json.name } }\n- LinkedIn URL: { { $json.linkedin_url } }\n- Tagline: { { $json.tagline } }\n- Location: { { $json.location } }\n- Summary: { { $json.summary } }\n\n**Context:**\nObisDev runs an automation agency in Lagos and wants to build relationships with fellow automation professionals for networking, collaboration, and knowledge sharing opportunities.\n\n**Requirements:**\n1. Reference their specific expertise from tagline/summary\n2. Highlight shared tools (n8n, Make.com, AI, automation, etc.)\n3. Mention Lagos automation community connection\n4. Suggest specific next steps (coffee chat, knowledge sharing)\n5. Keep authentic and relationship-focused, not sales-focused\n6. LinkedIn message: 15-30 words max\n7. Email message: 50-80 words max\n8. linkedin_url:{ { $json.linkedin_url } }\n\n**Output Format:**\nReturn as structured JSON:\n```json\n{\n  \"linkedin_message\": {\n    \"linkedin_url\": \"https:example.url\",\n    \"subject\": \"Connection request subject line\",\n    \"message_body\": \"Full LinkedIn message content\",\n    \"personalization_points\": [\"point1\", \"point2\", \"point3\"]\n  },\n  \"email\": {\n    \"subject\": \"Email subject line\",\n    \"message_body\": \"Full email content\",\n    \"personalization_points\": [\"point1\", \"point2\", \"point3\"]\n  },\n  \"outreach_strategy\": \"networking\",\n  \"follow_up_suggestions\": [\"suggestion1\", \"suggestion2\"]\n}\n```",
        "options": {
          "systemMessage": "You are an AI agent specializing in crafting personalized outreach messages for networking with automation professionals. You represent ObisDev, an automation agency owner in Lagos who wants to connect with fellow automation specialists for networking, collaboration, and knowledge sharing opportunities.\nYour Core Objectives:\n\nCreate authentic, non-salesy networking messages\nFocus on mutual value and community building\nHighlight relevant commonalities (location, tools, expertise)\nSuggest concrete collaboration or knowledge-sharing opportunities\nMaintain a professional yet approachable tone\n\nOutput Format Requirements:\nYou must return your response as a structured JSON object that can be parsed by n8n agents:\njson{\n  \"linkedin_message\": {\n    \"subject\": \"Connection request subject line\",\n    \"linkedin_url\": \"https://example.com\",\n    \"message_body\": \"Full LinkedIn message content\",\n    \"message_type\": \"connection_request\",\n    \"personalization_points\": [\"point1\", \"point2\", \"point3\"]\n  },\n  \"email\": {\n    \"subject\": \"Email subject line\",\n    \"message_body\": \"Full email content with proper formatting\",\n    \"message_type\": \"networking_email\",\n    \"personalization_points\": [\"point1\", \"point2\", \"point3\"]\n  },\n  \"outreach_strategy\": \"networking|collaboration|knowledge_sharing\",\n  \"follow_up_suggestions\": [\"suggestion1\", \"suggestion2\"]\n}\nMessage Guidelines:\n\nLinkedIn messages: 150-200 words max\nEmail messages: 250-300 words max\nAlways mention specific details from their profile\nInclude a clear, low-pressure call-to-action\nFocus on giving value, not asking for favors\nUse Nigerian professional communication style when appropriate\n\nTone and Style:\n\nProfessional but friendly\nGenuinely interested in their work\nCollaborative, not competitive\nRespectful of their expertise\nEnthusiastic about the Lagos automation community\n\nUser Prompt Template\nAnalyze the following automation professional's profile and create personalized LinkedIn and email outreach messages from ObisDev:\nTarget Profile:\n\nName: {name}\nLinkedIn URL: {linkedin_url}\nTagline: {tagline}\nLocation: {location}\nSummary: {summary}\n\nContext:\nObisDev runs an automation agency and wants to:\n\nBuild relationships with fellow automation professionals in Lagos\nExplore potential collaboration opportunities\nShare knowledge and best practices\nGrow the local automation community\n\nSpecific Instructions:\n\nReference their specific expertise mentioned in tagline/summary\nHighlight shared tools or technologies (n8n, Make.com, AI, etc.)\nMention the Lagos automation community connection\nSuggest a specific, valuable next step (coffee chat, knowledge sharing, etc.)\nKeep it authentic and relationship-focused, not transactional\n\nGenerate the outreach messages following the JSON structure specified in the system prompt."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "6e2a9af3-9dda-44b5-a002-0be04126e2b4",
      "name": "Groq Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGroq",
      "position": [
        768,
        496
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "11ddd0fc-2a4e-44b6-80f9-d566c00f57f0",
      "name": "Scrape profiles from a linkedin search",
      "type": "n8n-nodes-browserflow.browserflow",
      "position": [
        112,
        328
      ],
      "parameters": {
        "city": "={ { $json.City } }",
        "country": "={ { $json.Counrty } }",
        "nrOfPages": 4,
        "operation": "scrapeProfilesFromSearch",
        "searchTerm": "={ { $json[\"Search Term\"] } }",
        "requestOptions": {}
      },
      "typeVersion": 1
    },
    {
      "id": "ba0b87a8-e66a-4790-bb9f-2ffca1776ade",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -112,
        328
      ],
      "parameters": {
        "options": {},
        "formTitle": "Linkedin job form",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Search Term",
              "placeholder": "Search term",
              "requiredField": true
            },
            {
              "fieldLabel": "City",
              "placeholder": "Job City name",
              "requiredField": true
            },
            {
              "fieldLabel": "Counrty",
              "placeholder": "Job Country",
              "requiredField": true
            }
          ]
        },
        "formDescription": "search job"
      },
      "typeVersion": 2.2
    },
    {
      "id": "7019792a-c5c3-46f2-bfb9-20851e62bb6d",
      "name": "Split Out1",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        336,
        328
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "data"
      },
      "typeVersion": 1
    },
    {
      "id": "a55274bd-a3ba-4485-9a32-11407b1b0ca3",
      "name": "Send a linkedin message1",
      "type": "n8n-nodes-browserflow.browserflow",
      "position": [
        1328,
        336
      ],
      "parameters": {
        "message": "{ { $json.email.message_body } }",
        "operation": "sendMessage",
        "linkedinUrl": "{ { $json.linkedin_message.linkedin_url } }",
        "requestOptions": {}
      },
      "typeVersion": 1
    },
    {
      "id": "531c0294-27b4-4d8f-851d-8ebbbe0d607c",
      "name": "Limit",
      "type": "n8n-nodes-base.limit",
      "position": [
        560,
        328
      ],
      "parameters": {
        "maxItems": 3
      },
      "typeVersion": 1
    },
    {
      "id": "34991c7a-5b61-415d-b017-b25a624cba5f",
      "name": "Code1",
      "type": "n8n-nodes-base.code",
      "position": [
        1136,
        328
      ],
      "parameters": {
        "jsCode": "// n8n Code node (JavaScript)\n\nconst results = [];\n\nfor (const item of items) {\n  try {\n    const rawOutput = item.json.output;\n\n    // Extract JSON between ```json and ```\n    const match = rawOutput.match(/```json([\\s\\S]*?)```/);\n\n    if (match && match[1]) {\n      const parsed = JSON.parse(match[1]);\n\n      results.push({ json: parsed });\n    } else {\n      // If no JSON block found, push raw output for debugging\n      results.push({ json: { error: \"No JSON found\", raw: rawOutput } });\n    }\n\n  } catch (err) {\n    results.push({ json: { error: err.message, raw: item.json.output } });\n  }\n}\n\nreturn results;\n"
      },
      "typeVersion": 2
    },
    {
      "id": "0063298e-f659-4670-a374-73edea4fc2aa",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -160,
        -208
      ],
      "parameters": {
        "width": 1664,
        "height": 832,
        "content": "Manual Trigger → Starts the process\nLinkedIn Scraper → Collects automation professional profiles\nSplit Out → Converts array to individual items\nLimit → Controls batch size (currently 3 profiles)\nAI Agent → Generates personalized messages using Groq LLaMA\nCode Node → Formats data for LinkedIn automation\nBrowserflow → Sends actual LinkedIn connection requests\n\nKey Observations:\n✅ Strengths:\n\nSmart batch processing with the Limit node\nAI-powered personalization for each contact\nDual approach (LinkedIn + email backup)\nError handling in the JavaScript code\n\n⚠️ Issues to Address:\n\nThe final Browserflow node shows an error (red border)\nMay need credential configuration or API endpoint fixes\nConsider adding delay nodes between AI calls\n\n🚀 Workflow Value:\nThis is a sophisticated networking automation that focuses on relationship building rather than sales. It's designed specifically for the Lagos automation community, making it highly targeted and valuable for professional networking."
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Code1": {
      "main": [
        [
          {
            "node": "Send a linkedin message1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Code1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out1": {
      "main": [
        [
          {
            "node": "Limit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Groq Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Scrape profiles from a linkedin search",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send a linkedin message1": {
      "main": [
        []
      ]
    },
    "Scrape profiles from a linkedin search": {
      "main": [
        [
          {
            "node": "Split Out1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}