{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "b88f81dc-b4c9-424a-9735-8868d1ed7e9f",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4032,
        224
      ],
      "parameters": {
        "color": 2,
        "width": 352,
        "height": 624,
        "content": "\nhis workflow begins with a JotForm submission trigger.  \nIt captures the following fields submitted through the form:\n\n- **Name**\n- **First Name**\n- **Last Name**\n- **Email**\n- **LinkedIn Profile**\n- **Company Name**\n- **Marketing Budget (in USD)**\n- **Domain**\n- **Any Specific Query**\n"
      },
      "typeVersion": 1
    },
    {
      "id": "12f14a9f-ce34-4893-b4c7-24a5eae13955",
      "name": "JotForm Trigger1",
      "type": "n8n-nodes-base.jotFormTrigger",
      "position": [
        4320,
        320
      ],
      "parameters": {
        "form": "252808415357461"
      },
      "credentials": {
        "jotFormApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "edbbc4e4-559d-4dbc-b9f5-2b8b590dd461",
      "name": "Wait1",
      "type": "n8n-nodes-base.wait",
      "position": [
        5024,
        48
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "47662e2f-2f16-4bfa-9e73-014af76d933c",
      "name": "Add leads to campaign",
      "type": "n8n-nodes-heyreach.heyReach",
      "position": [
        5600,
        32
      ],
      "parameters": {
        "operation": "addLeads",
        "requestOptions": {},
        "accountLeadPairs": {
          "pair": [
            {
              "lead": {
                "details": {
                  "lastName": "={{ $jotform.name }}",
                  "firstName": "={{ $jotform.name }}",
                  "customUserFields": {
                    "field": [
                      {
                        "name": "marketing budget"
                      },
                      {
                        "name": "Company domain"
                      },
                      {
                        "name": "any specific question"
                      },
                      {
                        "name": "Linkedin Message",
                        "value": "={{ $json.linkedinMessage }}"
                      }
                    ]
                  }
                }
              },
              "linkedInAccountId": 11111111
            }
          ]
        }
      },
      "credentials": {
        "heyReachApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "be63e334-f6eb-4022-8279-ae662eb54f65",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        5104,
        256
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "18d29315-2d16-4a0e-8f03-83afbc3bc554",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        5408,
        256
      ],
      "parameters": {
        "jsonSchemaExample": "{\n\t\"linkedinMessage\": \"CHey [First Name], noticed your team is scaling fast \u2014 congrats! \ud83d\udc4f\nAt [Your Company], we help growing businesses use AI-driven automations to eliminate repetitive ops work and boost team productivity by 30\u201350%.\nWould it make sense to explore if this could free up your ops bandwidth too?\"\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "cc7b314a-5f83-46c9-b59c-9ce6b7bbcdd9",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4032,
        0
      ],
      "parameters": {
        "color": 2,
        "width": 2128,
        "height": 224,
        "content": "![Image](https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRhV5Um1zsxtj7zIdFUcSpTi36sDqc4d9WWDQ&s)"
      },
      "typeVersion": 1
    },
    {
      "id": "7df71579-dbd3-493f-8e67-a250600639c9",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4384,
        224
      ],
      "parameters": {
        "color": 2,
        "width": 1776,
        "height": 624,
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "6764d3b0-57f1-4c2a-97ac-a93d02c5ee01",
      "name": "Linkedin Message Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        5232,
        48
      ],
      "parameters": {
        "text": "=- **Name:** {{Name}}\n- **Email:** {{Email}}\n- **Company Name:** {{Company Name}}\n- **Marketing Budget (in USD):** {{Marketing Budget}}\n- **Specific Query or Interest:** {{Any Specific Query}}",
        "options": {
          "systemMessage": "You are an expert LinkedIn outreach message creator specialized in B2B SaaS and AI automation services.\n\nBased on the following information, create a personalized, concise, and persuasive LinkedIn message that I can send to key decision-makers (KDMs) such as Operations Heads, CXOs, or Founders.\n\nThe message should:\n\nClearly communicate the value of AI automation as a service (improving efficiency, reducing manual work, cutting costs, etc.)\n\nAvoid sounding like a generic sales pitch \u2014 keep it conversational and human\n\nBe short enough to be read in under 30 seconds (max 3\u20135 sentences)\n\nEnd with a soft CTA (like \u201copen to a quick chat?\u201d or \u201cworth exploring?\u201d)\n\nInformation to base the message on:\n[Insert company name, target industry, and key value proposition here]\n\nExample Output Style\n\nHey [First Name], noticed your team is scaling fast \u2014 congrats! \ud83d\udc4f\nAt [Your Company], we help growing businesses use AI-driven automations to eliminate repetitive ops work and boost team productivity by 30\u201350%.\nWould it make sense to explore if this could free up your ops bandwidth too?"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "b3d7451e-183b-426e-820c-8da10d373b77",
      "name": "Insert row",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        4752,
        320
      ],
      "parameters": {
        "columns": {
          "value": {},
          "schema": [],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        }
      },
      "typeVersion": 1
    },
    {
      "id": "3edead70-f2ea-46af-b37a-7811e0b80ed0",
      "name": "Wait2",
      "type": "n8n-nodes-base.wait",
      "position": [
        5040,
        496
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "4efe9036-ce65-47d0-9293-35a6f85e0349",
      "name": "Google Gemini Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        5120,
        704
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "aecee4d7-3619-4fe7-8fac-2355e626f0c9",
      "name": "Structured Output Parser1",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        5424,
        704
      ],
      "parameters": {
        "jsonSchemaExample": "{\n\t\"EmailMessage\": \"CHey [First Name], noticed your team is scaling fast \u2014 congrats! \ud83d\udc4f\nAt [Your Company], we help growing businesses use AI-driven automations to eliminate repetitive ops work and boost team productivity by 30\u201350%.\nWould it make sense to explore if this could free up your ops bandwidth too?\"\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "75287985-2fd3-47bf-9cd7-e7c25d9043c7",
      "name": "Insert row1",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        5984,
        496
      ],
      "parameters": {
        "columns": {
          "value": {},
          "schema": [],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        }
      },
      "typeVersion": 1
    },
    {
      "id": "2b0f4d0f-1030-49dd-8f4e-9667efc79d4f",
      "name": "Updated Linkedin Status",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        5936,
        32
      ],
      "parameters": {
        "columns": {
          "value": {},
          "schema": [],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        }
      },
      "typeVersion": 1
    },
    {
      "id": "1d44e56d-1119-4a4c-adc5-376be2e7d2d6",
      "name": "If1",
      "type": "n8n-nodes-base.if",
      "position": [
        4912,
        320
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "f06ed365-5493-48eb-aae4-4e09fc7252c7",
              "operator": {
                "type": "string",
                "operation": "empty",
                "singleValue": true
              },
              "leftValue": "journey",
              "rightValue": ""
            },
            {
              "id": "efe93d4c-912d-4d84-b8b6-da022387e99c",
              "operator": {
                "type": "string",
                "operation": "notEquals"
              },
              "leftValue": "journey",
              "rightValue": "linkedin"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "e884557a-c637-4a18-a1a0-a0c71adb3bd0",
      "name": "Send a message",
      "type": "n8n-nodes-base.gmail",
      "position": [
        5664,
        496
      ],
      "parameters": {
        "sendTo": "={{ $json.email }}",
        "options": {},
        "subject": "hi"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "a1defcdb-a5d1-47dd-9ca0-d1e04afc8fe7",
      "name": "Transactional Email",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        5248,
        496
      ],
      "parameters": {
        "text": "=- **Name:** {{Name}}\n- **Email:** {{Email}}\n- **Company Name:** {{Company Name}}\n- **Marketing Budget (in USD):** {{Marketing Budget}}\n- **Specific Query or Interest:** {{Any Specific Query}}",
        "options": {
          "systemMessage": "You are an expert LinkedIn outreach message creator specialized in B2B SaaS and AI automation services.\n\nBased on the following information, create a personalized, concise, and persuasive LinkedIn message that I can send to key decision-makers (KDMs) such as Operations Heads, CXOs, or Founders.\n\nThe message should:\n\nClearly communicate the value of AI automation as a service (improving efficiency, reducing manual work, cutting costs, etc.)\n\nAvoid sounding like a generic sales pitch \u2014 keep it conversational and human\n\nBe short enough to be read in under 30 seconds (max 3\u20135 sentences)\n\nEnd with a soft CTA (like \u201copen to a quick chat?\u201d or \u201cworth exploring?\u201d)\n\nInformation to base the message on:\n[Insert company name, target industry, and key value proposition here]\n\nExample Output Style\n\nHey [First Name], noticed your team is scaling fast \u2014 congrats! \ud83d\udc4f\nAt [Your Company], we help growing businesses use AI-driven automations to eliminate repetitive ops work and boost team productivity by 30\u201350%.\nWould it make sense to explore if this could free up your ops bandwidth too?"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "08848c71-f473-4754-9339-5a518ef58cf8",
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4544,
        320
      ],
      "parameters": {
        "url": "=https://person.clearbit.com/v2/combined/find?email={{$json.email}}",
        "options": {},
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization: ",
              "value": "=Bearer {{CLEARBIT_API_KEY}}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    }
  ],
  "connections": {
    "If1": {
      "main": [
        [
          {
            "node": "Wait1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait1": {
      "main": [
        [
          {
            "node": "Linkedin Message Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait2": {
      "main": [
        [
          {
            "node": "Transactional Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Insert row": {
      "main": [
        [
          {
            "node": "If1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "Insert row",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send a message": {
      "main": [
        [
          {
            "node": "Insert row1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "JotForm Trigger1": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Transactional Email": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add leads to campaign": {
      "main": [
        [
          {
            "node": "Updated Linkedin Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Linkedin Message Agent": {
      "main": [
        [
          {
            "node": "Add leads to campaign",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Linkedin Message Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Linkedin Message Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Transactional Email",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser1": {
      "ai_outputParser": [
        [
          {
            "node": "Transactional Email",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    }
  }
}