{
  "id": "cT4XLXHZzRQFjmXn",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Business Analysis Pro Workflow Free (20 Oct 2025)",
  "tags": [
    {
      "id": "RYNZPQlvhcOjz7sv",
      "name": "keywordlabs.ai",
      "createdAt": "2025-10-06T14:26:33.623Z",
      "updatedAt": "2025-10-06T14:26:33.623Z"
    },
    {
      "id": "VwSW5e9FfYEDIAYL",
      "name": "Keyword Research",
      "createdAt": "2025-10-02T14:23:40.425Z",
      "updatedAt": "2025-10-02T14:23:40.425Z"
    }
  ],
  "nodes": [
    {
      "id": "8af420dc-ed2e-47b0-8f6e-55fa7d544fed",
      "name": "Get Country & Language Code",
      "type": "n8n-nodes-base.code",
      "position": [
        -256,
        -736
      ],
      "parameters": {
        "jsCode": "// --- Data Mappings ---\n// This object maps the country name from the form to the DataForSEO location_code.\nconst countryToLocationCode = {\n  \"Albania\": 2008, \"Algeria\": 2012, \"Angola\": 2024, \"Argentina\": 2032,\n  \"Armenia\": 2051, \"Australia\": 2036, \"Austria\": 2040, \"Azerbaijan\": 2031,\n  \"Bahrain\": 2048, \"Bangladesh\": 2050, \"Belgium\": 2056, \"Bolivia\": 2068,\n  \"Bosnia and Herzegovina\": 2070, \"Brazil\": 2076, \"Bulgaria\": 2100,\n  \"Burkina Faso\": 2854, \"Cambodia\": 2116, \"Cameroon\": 2120, \"Canada\": 2124,\n  \"Chile\": 2152, \"Colombia\": 2170, \"Costa Rica\": 2188, \"Cote d'Ivoire\": 2384,\n  \"Croatia\": 2191, \"Cyprus\": 2196, \"Czechia\": 2203, \"Denmark\": 2208,\n  \"Ecuador\": 2218, \"Egypt\": 2818, \"El Salvador\": 2222, \"Estonia\": 2233,\n  \"Finland\": 2246, \"France\": 2250, \"Germany\": 2276, \"Ghana\": 2288,\n  \"Greece\": 2300, \"Guatemala\": 2320, \"Hong Kong\": 2344, \"Hungary\": 2348,\n  \"India\": 2356, \"Indonesia\": 2360, \"Ireland\": 2372, \"Israel\": 2376,\n  \"Italy\": 2380, \"Japan\": 2392, \"Jordan\": 2400, \"Kazakhstan\": 2398,\n  \"Kenya\": 2404, \"Latvia\": 2428, \"Lithuania\": 2440, \"Malaysia\": 2458,\n  \"Malta\": 2470, \"Mexico\": 2484, \"Moldova\": 2498, \"Monaco\": 2492,\n  \"Morocco\": 2504, \"Myanmar (Burma)\": 2104, \"Netherlands\": 2528,\n  \"New Zealand\": 2554, \"Nicaragua\": 2558, \"Nigeria\": 2566,\n  \"North Macedonia\": 2807, \"Norway\": 2578, \"Pakistan\": 2586, \"Panama\": 2591,\n  \"Paraguay\": 2600, \"Peru\": 2604, \"Philippines\": 2608, \"Poland\": 2616,\n  \"Portugal\": 2620, \"Romania\": 2642, \"Saudi Arabia\": 2682, \"Senegal\": 2686,\n  \"Serbia\": 2688, \"Singapore\": 2702, \"Slovakia\": 2703, \"Slovenia\": 2705,\n  \"South Africa\": 2710, \"South Korea\": 2410, \"Spain\": 2724, \"Sri Lanka\": 2144,\n  \"Sweden\": 2752, \"Switzerland\": 2756, \"Taiwan\": 2158, \"Thailand\": 2764,\n  \"Tunisia\": 2788, \"Turkiye\": 2792, \"Ukraine\": 2804,\n  \"United Arab Emirates\": 2784, \"United Kingdom\": 2826, \"United States\": 2840,\n  \"Uruguay\": 2858, \"Venezuela\": 2862, \"Vietnam\": 2704\n};\n\n// This object maps the language name from the form to the DataForSEO language_code.\nconst languageToLanguageCode = {\n  \"Albanian\": \"sq\", \"Arabic\": \"ar\", \"Armenian\": \"hy\", \"Azeri\": \"az\",\n  \"Bengali\": \"bn\", \"Bosnian\": \"bs\", \"Bulgarian\": \"bg\",\n  \"Chinese (Simplified)\": \"zh-CN\", \"Chinese (Traditional)\": \"zh-TW\",\n  \"Croatian\": \"hr\", \"Czech\": \"cs\", \"Danish\": \"da\", \"Dutch\": \"nl\",\n  \"English\": \"en\", \"Estonian\": \"et\", \"Finnish\": \"fi\", \"French\": \"fr\",\n  \"German\": \"de\", \"Greek\": \"el\", \"Hebrew\": \"he\", \"Hindi\": \"hi\",\n  \"Hungarian\": \"hu\", \"Indonesian\": \"id\", \"Italian\": \"it\", \"Japanese\": \"ja\",\n  \"Korean\": \"ko\", \"Latvian\": \"lv\", \"Lithuanian\": \"lt\", \"Macedonian\": \"mk\",\n  \"Malay\": \"ms\", \"Norwegian (Bokm\u00e5l)\": \"nb\", \"Polish\": \"pl\",\n  \"Portuguese\": \"pt\", \"Romanian\": \"ro\", \"Russian\": \"ru\", \"Serbian\": \"sr\",\n  \"Slovak\": \"sk\", \"Slovenian\": \"sl\", \"Spanish\": \"es\", \"Swedish\": \"sv\",\n  \"Tagalog\": \"tl\", \"Thai\": \"th\", \"Turkish\": \"tr\", \"Ukrainian\": \"uk\",\n  \"Urdu\": \"ur\", \"Vietnamese\": \"vi\"\n};\n\n// --- Main Logic ---\n// This loop goes through each item (form submission) sent to the node.\nfor (const item of items) {\n  // Get the country and language names from the incoming JSON data.\n  const countryName = item.json.Country;\n  const languageName = item.json.Language;\n\n  // Find the corresponding codes from the mapping objects.\n  // If a match isn't found, it will result in 'null'.\n  const locationCode = countryToLocationCode[countryName] ?? null;\n  const languageCode = languageToLanguageCode[languageName] ?? null;\n\n  // Add the new code fields to the JSON object.\n  item.json.location_code = locationCode;\n  item.json.language_code = languageCode;\n}\n\n// Return the modified items to be used in the next node.\nreturn items;"
      },
      "typeVersion": 2
    },
    {
      "id": "450235a2-4696-4ce0-bff4-231115c20a01",
      "name": "Submit Form",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -448,
        -736
      ],
      "parameters": {
        "options": {},
        "formTitle": "Page SEO/GEO Check",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Page URL",
              "placeholder": "example.com"
            },
            {
              "fieldType": "dropdown",
              "fieldLabel": "Country",
              "fieldOptions": {
                "values": [
                  {
                    "option": "Australia"
                  },
                  {
                    "option": "Austria"
                  },
                  {
                    "option": "Bahrain"
                  },
                  {
                    "option": "Bangladesh"
                  },
                  {
                    "option": "Belgium"
                  },
                  {
                    "option": "Brazil"
                  },
                  {
                    "option": "Bulgaria"
                  },
                  {
                    "option": "Canada"
                  },
                  {
                    "option": "Chile"
                  },
                  {
                    "option": "Colombia"
                  },
                  {
                    "option": "Croatia"
                  },
                  {
                    "option": "Cyprus"
                  },
                  {
                    "option": "Czechia"
                  },
                  {
                    "option": "Denmark"
                  },
                  {
                    "option": "Egypt"
                  },
                  {
                    "option": "Estonia"
                  },
                  {
                    "option": "Finland"
                  },
                  {
                    "option": "France"
                  },
                  {
                    "option": "Germany"
                  },
                  {
                    "option": "Greece"
                  },
                  {
                    "option": "Hong Kong"
                  },
                  {
                    "option": "Hungary"
                  },
                  {
                    "option": "India"
                  },
                  {
                    "option": "Indonesia"
                  },
                  {
                    "option": "Ireland"
                  },
                  {
                    "option": "Israel"
                  },
                  {
                    "option": "Italy"
                  },
                  {
                    "option": "Japan"
                  },
                  {
                    "option": "Jordan"
                  },
                  {
                    "option": "Kazakhstan"
                  },
                  {
                    "option": "Kenya"
                  },
                  {
                    "option": "Malaysia"
                  },
                  {
                    "option": "Mexico"
                  },
                  {
                    "option": "Morocco"
                  },
                  {
                    "option": "Netherlands"
                  },
                  {
                    "option": "New Zealand"
                  },
                  {
                    "option": "Nigeria"
                  },
                  {
                    "option": "Norway"
                  },
                  {
                    "option": "Pakistan"
                  },
                  {
                    "option": "Philippines"
                  },
                  {
                    "option": "Poland"
                  },
                  {
                    "option": "Portugal"
                  },
                  {
                    "option": "Romania"
                  },
                  {
                    "option": "Saudi Arabia"
                  },
                  {
                    "option": "Serbia"
                  },
                  {
                    "option": "Singapore"
                  },
                  {
                    "option": "South Africa"
                  },
                  {
                    "option": "South Korea"
                  },
                  {
                    "option": "Spain"
                  },
                  {
                    "option": "Sri Lanka"
                  },
                  {
                    "option": "Sweden"
                  },
                  {
                    "option": "Switzerland"
                  },
                  {
                    "option": "Taiwan"
                  },
                  {
                    "option": "Thailand"
                  },
                  {
                    "option": "Tunisia"
                  },
                  {
                    "option": "Turkiye"
                  },
                  {
                    "option": "Ukraine"
                  },
                  {
                    "option": "United Arab Emirates"
                  },
                  {
                    "option": "United Kingdom"
                  },
                  {
                    "option": "United States"
                  },
                  {
                    "option": "Vietnam"
                  }
                ]
              }
            },
            {
              "fieldType": "dropdown",
              "fieldLabel": "Language",
              "fieldOptions": {
                "values": [
                  {
                    "option": "Arabic"
                  },
                  {
                    "option": "Bengali"
                  },
                  {
                    "option": "Bulgarian"
                  },
                  {
                    "option": "Chinese (Simplified)"
                  },
                  {
                    "option": "Chinese (Traditional)"
                  },
                  {
                    "option": "Croatian"
                  },
                  {
                    "option": "Czech"
                  },
                  {
                    "option": "Danish"
                  },
                  {
                    "option": "Dutch"
                  },
                  {
                    "option": "English"
                  },
                  {
                    "option": "Estonian"
                  },
                  {
                    "option": "Finnish"
                  },
                  {
                    "option": "French"
                  },
                  {
                    "option": "German"
                  },
                  {
                    "option": "Greek"
                  },
                  {
                    "option": "Hebrew"
                  },
                  {
                    "option": "Hindi"
                  },
                  {
                    "option": "Hungarian"
                  },
                  {
                    "option": "Indonesian"
                  },
                  {
                    "option": "Italian"
                  },
                  {
                    "option": "Japanese"
                  },
                  {
                    "option": "Korean"
                  },
                  {
                    "option": "Macedonian"
                  },
                  {
                    "option": "Malay"
                  },
                  {
                    "option": "Norwegian (Bokm\u00e5l)"
                  },
                  {
                    "option": "Polish"
                  },
                  {
                    "option": "Portuguese"
                  },
                  {
                    "option": "Romanian"
                  },
                  {
                    "option": "Russian"
                  },
                  {
                    "option": "Serbian"
                  },
                  {
                    "option": "Slovak"
                  },
                  {
                    "option": "Spanish"
                  },
                  {
                    "option": "Swedish"
                  },
                  {
                    "option": "Tagalog"
                  },
                  {
                    "option": "Thai"
                  },
                  {
                    "option": "Turkish"
                  },
                  {
                    "option": "Ukrainian"
                  },
                  {
                    "option": "Urdu"
                  },
                  {
                    "option": "Vietnamese"
                  }
                ]
              }
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "7a165840-1ab6-4360-9363-f538dbebcecc",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        496,
        -816
      ],
      "parameters": {
        "color": 2,
        "width": 1024,
        "height": 256,
        "content": "## -> Get all Data and prepare report"
      },
      "typeVersion": 1
    },
    {
      "id": "dae48f45-737a-48ff-92d5-a6109597715a",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -512,
        -816
      ],
      "parameters": {
        "color": 7,
        "width": 576,
        "height": 256,
        "content": "# -> Input"
      },
      "typeVersion": 1
    },
    {
      "id": "c718850e-d68e-4b5f-bd0b-22293d3b6dbf",
      "name": "URL_search",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        480,
        -960
      ],
      "parameters": {
        "url": "https://api.firecrawl.dev/v1/scrape",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"url\": \"{{ $fromAI('url_search') }}\",\n  \"formats\": [\n    \"markdown\"\n  ],\n  \"onlyMainContent\": true,\n  \"parsePDF\": false,\n  \"maxAge\": 14400000\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "toolDescription": "Makes an HTTP request and returns the response data. \nCorrect input example: \"https://example.com\"",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer YOUR_TOKEN_HERE"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "112cec77-0d79-4d87-95a8-55d200a87caa",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        -816
      ],
      "parameters": {
        "color": 6,
        "width": 400,
        "height": 256,
        "content": "## Business Intelligence Analysis"
      },
      "typeVersion": 1
    },
    {
      "id": "08e140ba-2b71-49b0-b11c-11e296802250",
      "name": "Session ID",
      "type": "n8n-nodes-base.code",
      "position": [
        -80,
        -736
      ],
      "parameters": {
        "jsCode": "// n8n Function node\n// Generate a random session ID like cc##### (5 digits)\n\nconst randomNumber = Math.floor(10000 + Math.random() * 90000); // Ensures 5 digits\nconst sessionId = `cc${randomNumber}`;\n\nreturn [\n  {\n    json: {\n      session_id: sessionId\n    }\n  }\n];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "172fa273-fc9e-4412-928c-ea59481d0678",
      "name": "insert_row_in_data_table",
      "type": "n8n-nodes-base.dataTableTool",
      "position": [
        640,
        -960
      ],
      "parameters": {
        "columns": {
          "value": {
            "GEO_tactic": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('GEO_tactic', ``, 'string') }}",
            "people_ask": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('people_ask', ``, 'string') }}",
            "session_id": "={{ $('Session ID').item.json.session_id }}",
            "client_name": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('client_name', ``, 'string') }}",
            "call_to_action": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('call_to_action', ``, 'string') }}",
            "client_country": "={{ $('Submit Form').item.json.Country }}",
            "client_website": "={{ $('Submit Form').item.json['Page URL'] }}",
            "client_language": "={{ $('Submit Form').item.json.Language }}",
            "customer_journey": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('customer_journey', ``, 'string') }}",
            "client_description": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('client_description', ``, 'string') }}",
            "customer_persona_trait": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('customer_persona_trait', ``, 'string') }}",
            "eeat_signal_integration": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('eeat_signal_integration', ``, 'string') }}",
            "brand_personality_matrix": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('brand_personality_matrix', ``, 'string') }}",
            "target_audience_personas": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('target_audience_personas', ``, 'string') }}",
            "unique_value_proposition": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('unique_value_proposition', ``, 'string') }}"
          },
          "schema": [
            {
              "id": "session_id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "session_id",
              "defaultMatch": false
            },
            {
              "id": "client_name",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "client_name",
              "defaultMatch": false
            },
            {
              "id": "client_country",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "client_country",
              "defaultMatch": false
            },
            {
              "id": "client_language",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "client_language",
              "defaultMatch": false
            },
            {
              "id": "client_website",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "client_website",
              "defaultMatch": false
            },
            {
              "id": "client_description",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "client_description",
              "defaultMatch": false
            },
            {
              "id": "target_audience_personas",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "target_audience_personas",
              "defaultMatch": false
            },
            {
              "id": "brand_personality_matrix",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "brand_personality_matrix",
              "defaultMatch": false
            },
            {
              "id": "unique_value_proposition",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "unique_value_proposition",
              "defaultMatch": false
            },
            {
              "id": "people_ask",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "people_ask",
              "defaultMatch": false
            },
            {
              "id": "customer_journey",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "customer_journey",
              "defaultMatch": false
            },
            {
              "id": "customer_persona_trait",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "customer_persona_trait",
              "defaultMatch": false
            },
            {
              "id": "eeat_signal_integration",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "eeat_signal_integration",
              "defaultMatch": false
            },
            {
              "id": "GEO_tactic",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "GEO_tactic",
              "defaultMatch": false
            },
            {
              "id": "call_to_action",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "call_to_action",
              "defaultMatch": false
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "wa0kkSaygUdBVzcF",
          "cachedResultUrl": "/projects/6s3sOILcGEL9TSZr/datatables/wa0kkSaygUdBVzcF",
          "cachedResultName": "Business Data"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "90eaf99e-ff09-49d5-becb-506bb16ef71d",
      "name": "online_Search",
      "type": "n8n-nodes-base.perplexityTool",
      "position": [
        160,
        -960
      ],
      "parameters": {
        "options": {
          "returnRelatedQuestions": true
        },
        "messages": {
          "message": [
            {
              "role": "system",
              "content": "=You are Perplexity, a helpful search assistant trained by Perplexity AI.\n\n## Your Mission\nWrite an accurate, detailed, and comprehensive answer to the user's query using the provided search results. Your answer must be correct, high-quality, and written by an expert using an unbiased and journalistic tone.\n\n## Context Awareness\n**Date:** {{ $now }}  \n**Market Focus:** {{ $('Submit Form').item.json.Country }}  \n**Language:** {{ $('Submit Form').item.json.Language }}\n\n**CRITICAL:** Write your entire answer in {{ $('Submit Form').item.json.Language }}. All content, explanations, and analysis must be in this language.\n\n## Search Results Usage\n- Your answer must be informed by the provided \"Search results\"\n- Use only the information from search results and your existing knowledge\n- Answer must be self-contained and respond fully to the query\n- If search results are empty or unhelpful, answer with existing knowledge\n- If you don't know the answer or the premise is incorrect, explain why\n\n## Citation Requirements\n- Cite search results using [index] at the end of sentences when needed\n- Example: \"Ice is less dense than water[1][2].\"\n- NO SPACE between the last word and the citation\n- Cite the most relevant results that answer the query\n- Avoid citing irrelevant results\n- Do not cite more than three results per sentence\n- Omit bibliographies at the end of answers\n\n## Markdown Formatting\n\n### Headers and Structure\n- Use level 2 headers (##) for main sections\n- Use bolding (****) for subsections\n- Never start your answer with a header\n- Use single new lines for list items and double new lines for paragraphs\n\n### Lists\n- Prefer unordered lists\n- Only use ordered lists (numbered) when presenting ranks or if it makes sense\n- NEVER mix ordered and unordered lists\n- Do NOT nest lists together\n\n### Code and Math\n- Use markdown code blocks for code snippets, including the language for syntax highlighting\n- Wrap all math expressions in LaTeX using \\( \\) for inline and \\[ \\] for block formulas\n- Example: \\(x^4 = x - 3\\)\n- Never use single dollar signs ($) for LaTeX expressions\n- Never use the \\\\label instruction in LaTeX\n\n### Style\n- Bold text sparingly, primarily for emphasis within paragraphs\n- Use italics for terms or phrases that need highlighting without strong emphasis\n- Maintain a clear visual hierarchy:\n  - Level 2 Main headers (##): Large\n  - Bolded Subheaders (****): Slightly smaller, bolded\n  - List items: Regular size, no bold\n  - Paragraph text: Regular size, no bold\n\n### Other Guidelines\n- Use markdown to format paragraphs, tables, and quotes when applicable\n- When comparing things (vs), format the comparison as a markdown table instead of a list\n- Do not include URLs or links in the answer\n- Use tables for comparisons\u2014they are much more readable than lists\n\n## Content Guidelines\n- Skip the preamble and just provide the answer without telling the user what you are doing\n- Be concise and direct\n- Avoid repeating copyrighted content verbatim (e.g., song lyrics, news articles, book passages)\n- Only answer with original text\n- Never directly output song lyrics\n- Write in {{ $('Submit Form').item.json.Language }}\n\n## Market Context\nWhen answering queries related to business, marketing, or competitive analysis:\n- Focus on {{ $('Submit Form').item.json.Country }} market context\n- Use local terminology and examples relevant to {{ $('Submit Form').item.json.Country }}\n- Consider local business practices, regulations, and consumer behavior\n- Provide insights specific to the {{ $('Submit Form').item.json.Country }} market when applicable\n\nNow provide your answer."
            },
            {
              "content": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('message1_Text', ``, 'string') }}"
            }
          ]
        },
        "requestOptions": {}
      },
      "credentials": {
        "perplexityApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "78325ee1-e0ce-4245-93fb-62ea2d56fbef",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        672,
        -544
      ],
      "parameters": {
        "color": 7,
        "width": 272,
        "height": 176,
        "content": "![n8n Creator Profile](https://pub-70c57f6d49284d1da8650039c2add836.r2.dev/ai%20marketing%20hub.png)"
      },
      "typeVersion": 1
    },
    {
      "id": "ee161257-36b1-4d09-a4be-187f7000dc88",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -512,
        -1008
      ],
      "parameters": {
        "color": 6,
        "width": 1296,
        "height": 176,
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "631ea8bc-c63b-4d10-a4a0-9b5b64091f2f",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        672,
        -384
      ],
      "parameters": {
        "color": 7,
        "width": 272,
        "height": 96,
        "content": "**Workflow created by [@AgriciDaniel](https://www.youtube.com/@AgriciDaniel)**\n* [AI Marketing Hub](https://www.skool.com/ai-marketing-hub)\n* [AI Marketing Hub Pro](https://www.skool.com/ai-marketing-hub-pro)"
      },
      "typeVersion": 1
    },
    {
      "id": "95559e77-0a13-4f60-bfa2-7f7d30aba442",
      "name": "serp_Search",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        -160,
        -960
      ],
      "parameters": {
        "workflowId": {
          "__rl": true,
          "mode": "list",
          "value": "VjpOW2V2aNV9HpQJ",
          "cachedResultUrl": "/workflow/VjpOW2V2aNV9HpQJ",
          "cachedResultName": "Laboratory \u2014 Business Analysis Workflow Tools"
        },
        "description": "Call this tool for SERP data.",
        "workflowInputs": {
          "value": {
            "keyword": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('keyword', ``, 'string') }}",
            "function": "serp_search",
            "language_code": "={{ $('Get Country & Language Code').item.json.language_code }}",
            "location_code": "={{ $('Get Country & Language Code').item.json.location_code }}"
          },
          "schema": [
            {
              "id": "function",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "function",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "keyword",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "keyword",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "url",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "location_code",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "location_code",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "language_code",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "language_code",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "7f8e6f17-b0ac-4229-b22b-a6cb40e50c7f",
      "name": "ai_Mode",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        0,
        -960
      ],
      "parameters": {
        "workflowId": {
          "__rl": true,
          "mode": "list",
          "value": "VjpOW2V2aNV9HpQJ",
          "cachedResultUrl": "/workflow/VjpOW2V2aNV9HpQJ",
          "cachedResultName": "Laboratory \u2014 Business Analysis Workflow Tools"
        },
        "description": "Call this tool for AI mode SERP data.",
        "workflowInputs": {
          "value": {
            "keyword": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('keyword', ``, 'string') }}",
            "function": "ai_mode",
            "language_code": "={{ $('Get Country & Language Code').item.json.language_code }}",
            "location_code": "={{ $('Get Country & Language Code').item.json.location_code }}"
          },
          "schema": [
            {
              "id": "function",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "function",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "keyword",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "keyword",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "url",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "location_code",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "location_code",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "language_code",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "language_code",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "a812c74c-143f-491a-86ab-f6f9daf1e40d",
      "name": "Think_tool",
      "type": "@n8n/n8n-nodes-langchain.toolThink",
      "position": [
        -480,
        -960
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "1c71a132-6f09-4c04-aa64-7b1856f0ff84",
      "name": "deep_research",
      "type": "n8n-nodes-base.perplexityTool",
      "position": [
        320,
        -960
      ],
      "parameters": {
        "model": "sonar-pro",
        "options": {
          "returnRelatedQuestions": true
        },
        "messages": {
          "message": [
            {
              "role": "system",
              "content": "=You are Perplexity, an expert research assistant trained by Perplexity AI, specialized in conducting comprehensive, in-depth research.\n\n## Your Mission\nConduct thorough, multi-source research to provide a comprehensive, expert-level analysis of the user's query. Your research should be exhaustive, well-structured, and actionable.\n\n## Context Awareness\n**Date:** {{ $now }}  \n**Market Focus:** {{ $('Submit Form').item.json.Country }}  \n**Language:** {{ $('Submit Form').item.json.Language }}\n\n**CRITICAL:** Write your entire research report in {{ $('Submit Form').item.json.Language }}. All content, analysis, insights, and recommendations must be in this language.\n\n## Research Depth Requirements\n- Explore the topic from multiple angles and perspectives\n- Synthesize information from diverse, credible sources\n- Identify patterns, trends, and insights across sources\n- Provide strategic analysis, not just information summary\n- Include both quantitative data and qualitative insights\n- Address potential counterarguments or alternative viewpoints\n- Offer actionable recommendations based on findings\n\n## Market-Specific Research Focus\nWhen researching business, competitive, or market-related topics:\n- **Prioritize {{ $('Submit Form').item.json.Country }}-specific data and insights**\n- Analyze local market dynamics, regulations, and consumer behavior\n- Compare local practices with international benchmarks when relevant\n- Identify opportunities and challenges specific to {{ $('Submit Form').item.json.Country }}\n- Use local case studies and examples\n- Consider cultural and economic factors unique to the market\n- Provide localized strategic recommendations\n\n## Citation Requirements\n- Cite all sources using [index] at the end of sentences\n- Example: \"Market research indicates strong growth in e-commerce[1][3].\"\n- NO SPACE between the last word and the citation\n- Cite multiple sources for key claims to show consensus\n- Use citations throughout the report, not just at the end\n- Do not cite more than three results per sentence\n- Prioritize citing original, authoritative sources over aggregators\n\n## Report Structure\n\nYour deep research report should follow this structure:\n\n### Executive Summary (Optional)\n- 2-3 sentence overview of key findings\n- Only include for complex topics requiring summary\n\n### Main Analysis\n- Use level 2 headers (##) for major sections\n- Use bolding (****) for subsections within those sections\n- Organize information logically (e.g., by theme, chronology, or priority)\n- Never start with a header\u2014begin with direct analysis\n\n### Key Insights\n- Highlight the most important findings\n- Connect dots between different pieces of information\n- Identify patterns and trends\n\n### Strategic Recommendations (When Applicable)\n- Provide 3-5 actionable recommendations based on research\n- Explain the rationale behind each recommendation\n- Consider feasibility for {{ $('Submit Form').item.json.Country }} market\n\n## Markdown Formatting\n\n### Headers and Structure\n- Use level 2 headers (##) for main sections\n- Use bolding (****) for subsections\n- Use single new lines for list items and double new lines for paragraphs\n- Maintain clear visual hierarchy throughout\n\n### Lists and Tables\n- Prefer unordered lists for most content\n- Use ordered lists only for rankings, steps, or priorities\n- NEVER mix ordered and unordered lists\n- Use markdown tables for comparisons\u2014much more readable than lists\n- Format vs comparisons as tables with clear columns\n\n### Code and Math\n- Use markdown code blocks with language specification for syntax highlighting\n- Wrap math expressions in LaTeX: \\( \\) for inline, \\[ \\] for block\n- Never use single dollar signs ($) for LaTeX\n- Never use the \\\\label instruction\n\n### Style and Emphasis\n- Bold sparingly for key terms and critical insights\n- Use italics for terms needing subtle emphasis\n- Keep visual hierarchy clear: Level 2 headers > Bolded subheaders > Body text\n- Use tables to organize complex comparative data\n\n### Content Guidelines\n- Do not include URLs or links in the report\n- Omit bibliographies at the end\n- Be comprehensive but concise\u2014every sentence should add value\n- Skip preambles\u2014start directly with analysis\n- Avoid repeating copyrighted content verbatim\n- Never directly output song lyrics or extensive quoted material\n\n## Quality Standards\n\n### Depth\n- Go beyond surface-level information\n- Explain the \"why\" and \"how,\" not just the \"what\"\n- Connect research findings to broader implications\n\n### Accuracy\n- Verify information across multiple sources when possible\n- Note when sources conflict and explain why\n- Acknowledge limitations or gaps in available data\n\n### Relevance\n- Stay focused on answering the original query\n- Filter out tangential information\n- Prioritize insights most valuable to {{ $('Submit Form').item.json.Country }} market\n\n### Tone\n- Expert-level analysis with journalistic objectivity\n- Unbiased presentation of findings\n- Clear, professional language in {{ $('Submit Form').item.json.Language }}\n- Accessible to non-experts while maintaining rigor\n\n## Special Instructions for Competitive/Business Research\n\nWhen conducting competitive or business intelligence research:\n\n1. **Market Landscape:** Map out the competitive environment in {{ $('Submit Form').item.json.Country }}\n2. **Key Players:** Identify and analyze major competitors with market-specific focus\n3. **Trends & Dynamics:** Highlight emerging trends affecting the {{ $('Submit Form').item.json.Country }} market\n4. **Opportunities & Threats:** Use local market context to identify strategic opportunities\n5. **Benchmarking:** Compare against both local and international standards when relevant\n6. **Actionability:** Ensure all insights can be translated into business decisions\n\n## Edge Cases\n- If search results are insufficient, supplement with existing knowledge while noting limitations\n- If the premise of the query is incorrect, explain why and provide correct context\n- If there are multiple valid interpretations, address the most relevant one for {{ $('Submit Form').item.json.Country }} market\n\nRemember: This is DEEP research. Your goal is to provide comprehensive, strategic, expert-level analysis that goes significantly beyond what a simple search would reveal. Write entirely in {{ $('Submit Form').item.json.Language }}.\n\nNow conduct your deep research."
            },
            {
              "content": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('message1_Text', ``, 'string') }}"
            }
          ]
        },
        "requestOptions": {}
      },
      "credentials": {
        "perplexityApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "efe0543d-5caf-4d83-960d-5afa121b9b39",
      "name": "Business Analyst",
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "position": [
        160,
        -736
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "models/gemini-2.5-pro",
          "cachedResultName": "models/gemini-2.5-pro"
        },
        "options": {
          "topP": 0.9,
          "temperature": 0.2,
          "codeExecution": false,
          "maxOutputTokens": 7000,
          "maxToolsIterations": 50
        },
        "messages": {
          "values": [
            {
              "content": "=# Business Data Intelligence Agent\n\n**Model Configuration:** Temperature: 0.2 | Top-P: 0.85 | Max Tokens: 4000\n\n---\n\n## Mission\n\nExtract 14 business intelligence fields from the client's website and save to database via `insert_row_in_data_table`.\n\n**Current Context:**\n- **Date:** {{ $now.toFormat(\"dd LLLL yyyy\") }}\n- **Page URL:** {{ $('Submit Form').item.json['Page URL'] }}\n- **Market:** {{ $('Submit Form').item.json.Country }}\n- **Language:** {{ $('Submit Form').item.json.Language }}\n\n**Success = All 14 fields saved to database**\n\n---\n\n## Core Execution Pattern\n\n**MANDATORY SEQUENCE - Execute in exact order:**\n\n```\n1. URL_search (scrape website)\n2. get_internal_links (discover site structure)\n3. think_tool (synthesize core data)\n4. online_Search (brand research in target language)\n5. think_tool (brand analysis)\n6. deep_research (audience + market in target language)\n7. serp_Search OR ai_Mode (competitor keywords)\n8. think_tool (customer intelligence)\n9. think_tool (quality validation - ALL 14 fields)\n10. insert_row_in_data_table (save to database)\n```\n\n---\n\n## Few-Shot Examples: Correct Execution\n\n### Example 1: Core Data Extraction Pattern\n\n**Input Prefix:** WEBSITE_SCRAPE\n\n**Output Prefix:** CORE_DATA_EXTRACTION\n\n```\n\u2705 CORRECT Extraction:\nAfter URL_search returns website content:\n\n\"CORE DATA EXTRACTED:\n\nclient_name: [Found in header/title - exact business name]\nclient_website: [Clean domain only - no https://, no www]\nExample: 'acmecorp.com' NOT 'https://www.acmecorp.com'\n\nclient_description (2-4 sentences):\n'[Business Name] provides [specific services] to [target market] in [geographic area]. Founded in [year if available], the company specializes in [key differentiator]. They serve [customer segment] with [unique approach].'\n\ncall_to_action: '[Exact CTA button text from website]'\nExamples: 'Get Started', 'Request Quote', 'Contact Us', 'Buy Now'\n\nSource: [which page/section - homepage/about/hero]\"\n\n\u274c WRONG Extraction:\n\"Found the business name. Moving to next step.\"\n[No actual extraction, no format validation, no source documentation]\n```\n\n### Example 2: Internal Links Analysis\n\n**Input Prefix:** SITE_STRUCTURE\n\n**Output Prefix:** NAVIGATION_ANALYSIS\n\n```\n\u2705 CORRECT Analysis:\nAfter get_internal_links returns links:\n\n\"INTERNAL STRUCTURE ANALYSIS:\n\nTotal links found: 23\n\nKey pages identified:\n- About: [URL] - '[Title/description if available]'\n- Services: [URL] - '[Title/description]'\n- Team: [URL] - '[Title/description]'\n- Blog: [URL] - '[Title/description]'\n- Contact: [URL] - '[Title/description]'\n\nStrategic value:\n- About page: Will use for client_description, eeat_signal_integration\n- Services page: Will use for unique_value_proposition\n- Blog: Evidence for eeat_signal_integration\n- Team page: Credentials for eeat_signal_integration\n\nPriority scrape targets: [About, Services] for deeper intelligence\n\nNote: [Some links have no title/description - will identify by URL pattern]\"\n\n\u274c WRONG Analysis:\n\"Got the internal links.\"\n[No categorization, no strategic planning for which pages to use]\n```\n\n### Example 3: customer_journey Format (CRITICAL)\n\n**Input Prefix:** JOURNEY_MAPPING\n\n**Output Prefix:** FORMATTED_JOURNEY\n\n```\n\u2705 CORRECT Format (uses \\n):\n\"customer_journey\": \"Awareness: Potential customers discover the business through local search, social media recommendations, and word-of-mouth referrals from satisfied clients.\\nConsideration: They compare services by reviewing the website portfolio, reading customer testimonials, and requesting initial consultations to assess expertise.\\nPurchase: Decision is made based on transparent pricing, professional communication, proven track record, and alignment with their specific project needs.\\nLoyalty: Customers return due to consistent quality, reliable service delivery, ongoing support, and the relationship built during initial projects.\"\n\n\u274c WRONG Formats:\n\"Awareness (discovery), Consideration (evaluation), Purchase (decision), Loyalty (retention)\"\n[Uses parentheses and commas instead of \\n]\n\n\"Awareness: discovery\\n\\nConsideration: evaluation\"\n[Double newlines or missing stages]\n\n\"1. Awareness: discovery 2. Consideration: evaluation\"\n[Numbered list format]\n```\n\n### Example 4: people_ask Format (CRITICAL)\n\n**Input Prefix:** QUESTION_EXTRACTION\n\n**Output Prefix:** FORMATTED_QUESTIONS\n\n```\n\u2705 CORRECT Format (numbered with \\n separator):\n\"people_ask\": \"1. What services does the business offer?\\n2. How long has the company been operating?\\n3. What areas do they serve?\\n4. What makes them different from competitors?\\n5. How can I request a consultation?\"\n\nMust be:\n- Numbered format (1-5)\n- Uses \\n separator between questions\n- Exactly 5 questions (not 3, not 7)\n- Each ends with \"?\"\n- Questions in target language if not English\n\n\u274c WRONG Formats:\n\"people_ask\": \"[\\\"Question 1?\\\", \\\"Question 2?\\\", \\\"Question 3?\\\"]\"\n[JSON format - old format, only 3 questions]\n\n\"people_ask\": \"What services? How long operating? What areas?\"\n[No numbers, no question marks, not 5 questions]\n\n\"people_ask\": \"1. Q1? 2. Q2? 3. Q3? 4. Q4? 5. Q5? 6. Q6?\"\n[6 questions instead of exactly 5, no \\n separator]\n```\n\n### Example 5: Quality Validation Pattern\n\n**Input Prefix:** PRE_SAVE_CHECK\n\n**Output Prefix:** VALIDATION_RESULTS\n\n```\n\u2705 CORRECT Validation:\n\"QUALITY VALIDATION:\n\n1. client_description: \u2713\n   - 2-4 sentences: YES (3 sentences)\n   - Includes services: YES\n   - Includes geographic area: YES\n   - Includes differentiator: YES\n\n2. brand_personality_matrix: \u2713\n   - Exactly 5 traits: YES (Professional, Trustworthy, Local, Experienced, Customer-focused)\n   - Format: Trait1, Trait2, Trait3, Trait4, Trait5\n\n3. people_ask: \u2713\n   - Numbered format (1-5): YES\n   - Uses \\n separator: YES\n   - Exactly 5 questions: YES\n   - All end with '?': YES\n\n4. customer_journey: \u2713\n   - Uses \\n separator: YES\n   - Has 4 stages: YES (Awareness, Consideration, Purchase, Loyalty)\n   - No parentheses/commas: YES\n\n5. customer_persona_trait: \u2713\n   - 4-6 sentences: YES (5 sentences)\n   - Has name, age, occupation, city: YES\n\n6. GEO_tactic: \u2713\n   - 3-5 competitor keywords: YES (4 keywords)\n   - Keywords in [target language]: YES\n\n7. All 14 fields populated: YES\n\nREADY TO SAVE: YES\"\n\n\u274c WRONG Validation:\n\"Everything looks good.\"\n[No field-by-field check, no format verification, no counts]\n```\n\n---\n\n## 14 Required Fields Specification\n\n| Field | Format | Validation Rules |\n|:------|:-------|:-----------------|\n| `client_name` | string | Official business name from website |\n| `client_country` | string | {{ $('Submit Form').item.json.Country }} (fixed) |\n| `client_language` | string | {{ $('Submit Form').item.json.Language }} (fixed) |\n| `client_website` | string | Clean domain: `example.com` (NO https://, NO www) |\n| `client_description` | string | 2-4 sentences: services + geographic area + years/founding + differentiator |\n| `target_audience_personas` | string | Demographics (age, income) + geographic location + psychographics + needs |\n| `brand_personality_matrix` | string | Exactly 5 traits: \"Trait1, Trait2, Trait3, Trait4, Trait5\" |\n| `unique_value_proposition` | string | Key differentiator vs competitors |\n| `people_ask` | string | Numbered with `\\n`: `\"1. Question one?\\n2. Question two?\\n3. Question three?\\n4. Question four?\\n5. Question five?\"` (exactly 5) |\n| `customer_journey` | string | Use `\\n` separator: `\"Awareness: [text]\\nConsideration: [text]\\nPurchase: [text]\\nLoyalty: [text]\"` |\n| `customer_persona_trait` | string | 4-6 sentences: name + age (number) + occupation + city + needs + values |\n| `eeat_signal_integration` | string | Expertise signals: blog, certifications, awards, years, credentials |\n| `GEO_tactic` | string | Scope + positioning + 3-5 competitor keywords (target language) + strategy |\n| `call_to_action` | string | Primary CTA button text from website |\n\n---\n\n## Master Execution Template\n\n**Use think_tool for ALL analysis phases. Fill relevant sections.**\n\n**Phase Identifier:** [1-Core | 2-Brand | 3-Customer | 4-Validation]\n\n```\nTHINK_TOOL_ANALYSIS:\n\n=== PHASE [X]: [Phase Name] ===\n\n[PHASE 1 - Core Data Extraction]\nWEBSITE SCRAPE ANALYSIS:\n\nFrom URL_search:\nclient_name: [extracted from header/title/about]\nclient_website: [domain only - no https/www]\nclient_description draft:\n\"[Sentence 1: services]. [Sentence 2: geographic area and years]. [Sentence 3: key differentiator].\"\ncall_to_action: [exact CTA button text]\n\nFrom get_internal_links:\nTotal links: [count]\nKey pages found:\n- About: [URL] - Use for: [which fields]\n- Services: [URL] - Use for: [which fields]\n- Team/Blog: [URL] - Use for: [eeat signals]\n- [Other relevant pages]\n\nPages to scrape deeper: [prioritized list]\n\n[PHASE 2 - Brand Analysis]\nBRAND INTELLIGENCE:\n\nFrom online_Search (in {{ $('Submit Form').item.json.Language }}):\nQuery used: \"[business name] [industry] {{ $('Submit Form').item.json.Language }}\"\n\nbrand_personality_matrix (must be exactly 5):\n1. [Trait 1 - based on tone/messaging]\n2. [Trait 2]\n3. [Trait 3]\n4. [Trait 4]\n5. [Trait 5]\nFormat: \"Trait1, Trait2, Trait3, Trait4, Trait5\"\n\nunique_value_proposition:\n\"[What makes them unique - materials/process/expertise/niche]\"\n\neeat_signal_integration:\n- Blog: [YES/NO - if yes, what topics]\n- Certifications: [list if found]\n- Awards: [list if found]\n- Years in business: [X years if found]\n- Team credentials: [if found]\nSummary: \"[Consolidated expertise signals]\"\n\n[PHASE 3 - Customer Intelligence]\nAUDIENCE & MARKET ANALYSIS:\n\nFrom deep_research (in {{ $('Submit Form').item.json.Language }}):\nQuery used: \"[business type] target audience {{ $('Submit Form').item.json.Country }} {{ $('Submit Form').item.json.Language }}\"\n\ntarget_audience_personas:\n\"[Age range: X-Y], [income level: $X-Y or economic class], [geographic: city/region/country], [psychographics: values, priorities], [specific needs: what they seek]\"\n\npeople_ask (must be exactly 5, numbered format with \\n):\nQuestion extraction approach: [how derived - from website FAQ, common queries, service pages]\n1. \"[Question 1 in target language]?\"\n2. \"[Question 2]?\"\n3. \"[Question 3]?\"\n4. \"[Question 4]?\"\n5. \"[Question 5]?\"\nFormatted output: \"1. Question one?\\n2. Question two?\\n3. Question three?\\n4. Question four?\\n5. Question five?\"\n\ncustomer_journey (must use \\n):\n- Awareness: [how they discover - channels and triggers]\n- Consideration: [how they evaluate - comparison factors]\n- Purchase: [decision factors - why they choose]\n- Loyalty: [retention factors - why they return]\nFormat: \"Awareness: [text]\\nConsideration: [text]\\nPurchase: [text]\\nLoyalty: [text]\"\n\ncustomer_persona_trait (4-6 sentences):\n\"[Name, age X, occupation] lives in [city]. [Sentence 2: their needs/challenges]. [Sentence 3: their values/priorities]. [Sentence 4: why they chose this business]. [Optional sentence 5-6: additional context].\"\n\nFrom serp_Search OR ai_Mode (in {{ $('Submit Form').item.json.Language }}):\nQuery: \"[main service/product] {{ $('Submit Form').item.json.Country }}\"\n\nGEO_tactic:\n\"Geographic Scope: [Local/Regional/National/International]\nMarket: {{ $('Submit Form').item.json.Country }} ({{ $('Submit Form').item.json.Language }})\nPositioning: [Premium/Mid-Market/Budget]\n\nCompetitor Keywords (in {{ $('Submit Form').item.json.Language }}):\n- [keyword 1]\n- [keyword 2]\n- [keyword 3]\n- [keyword 4]\n- [keyword 5]\n\nStrategy: [How to compete - specific approach based on market analysis]\"\n\n[PHASE 4 - Quality Validation]\nPRE-SAVE VALIDATION:\n\nField-by-field check:\n\n1. client_description:\n   \u25a1 2-4 sentences: [YES/NO - count: X]\n   \u25a1 Services included: [YES/NO]\n   \u25a1 Geographic area: [YES/NO]\n   \u25a1 Differentiator: [YES/NO]\n   Status: [PASS/FAIL]\n\n2. brand_personality_matrix:\n   \u25a1 Exactly 5 traits: [YES/NO - count: X]\n   \u25a1 Format: \"Trait1, Trait2, Trait3, Trait4, Trait5\": [YES/NO]\n   Status: [PASS/FAIL]\n\n3. people_ask:\n   \u25a1 Numbered format (1-5): [YES/NO]\n   \u25a1 Uses \\n separator: [YES/NO]\n   \u25a1 Exactly 5 questions: [YES/NO - count: X]\n   \u25a1 All end with \"?\": [YES/NO]\n   \u25a1 Correct language: [YES/NO]\n   Status: [PASS/FAIL]\n\n4. customer_journey:\n   \u25a1 Uses \\n separator: [YES/NO]\n   \u25a1 No parentheses: [YES/NO]\n   \u25a1 No commas as separators: [YES/NO]\n   \u25a1 Has all 4 stages: [YES/NO - list them]\n   Status: [PASS/FAIL]\n\n5. customer_persona_trait:\n   \u25a1 4-6 sentences: [YES/NO - count: X]\n   \u25a1 Has name: [YES/NO]\n   \u25a1 Has age (number): [YES/NO]\n   \u25a1 Has occupation: [YES/NO]\n   \u25a1 Has city: [YES/NO]\n   Status: [PASS/FAIL]\n\n6. GEO_tactic:\n   \u25a1 3-5 competitor keywords: [YES/NO - count: X]\n   \u25a1 Keywords in {{ $('Submit Form').item.json.Language }}: [YES/NO]\n   \u25a1 Has strategy section: [YES/NO]\n   Status: [PASS/FAIL]\n\n7. client_website:\n   \u25a1 No https://: [YES/NO]\n   \u25a1 No www: [YES/NO]\n   Status: [PASS/FAIL]\n\n8. All 14 fields populated: [YES/NO]\n   List any missing: [field names]\n\nOVERALL STATUS: [READY TO SAVE / NEEDS FIXES]\n\nIf NEEDS FIXES: [list specific corrections needed]\n```\n\n---\n\n## Critical Rules\n\n### \u2705 ALWAYS DO:\n\n1. **Execute ALL research tools** - URL_search, get_internal_links, online_Search, deep_research, serp_Search/ai_Mode\n2. **Use think_tool after EACH research phase** - document findings immediately\n3. **Search in target language** - ALL queries must use {{ $('Submit Form').item.json.Language }}\n4. **Validate before saving** - complete PHASE 4 quality check\n5. **Use exact formats** - customer_journey with `\\n`, people_ask with numbered format and `\\n`\n6. **Clean domain format** - remove https:// and www from client_website\n7. **Count requirements** - exactly 5 traits, exactly 5 questions, 2-4 sentences, 4-6 sentences\n8. **Use get_internal_links strategically** - identify which pages have needed information\n9. **Extract from tool outputs only** - never hallucinate data\n10. **Complete full workflow** - don't stop until database insert succeeds\n\n### \u274c NEVER DO:\n\n1. Skip get_internal_links tool\n2. Use English for non-English markets\n3. Format customer_journey with parentheses or commas\n4. Provide 3 or 7 questions (must be exactly 5)\n5. Include https:// or www in client_website\n6. Save without PHASE 4 validation\n7. Use fewer or more than 5 brand traits\n8. Skip think_tool documentation phases\n9. Hallucinate data not in tool outputs\n10. Stop before successful database insert\n\n---\n\n## Execution Workflow\n\n### Step 1: Website Intelligence\n\n```\nCall URL_search with: {{ $('Submit Form').item.json['Page URL'] }}\n\u2193\nCall get_internal_links with: {{ $('Submit Form').item.json['Page URL'] }}\n\u2193\nCall think_tool \u2192 Use PHASE 1 template\n  - Extract: client_name, client_website, client_description, call_to_action\n  - Analyze site structure from internal links\n  - Identify pages for deeper extraction (About, Services, Team, Blog)\n  - Prioritize which pages to scrape for specific fields\n```\n\n### Step 2: Brand Intelligence\n\n```\nCall online_Search with query in {{ $('Submit Form').item.json.Language }}:\n  \"[business name] [industry] {{ $('Submit Form').item.json.Language }}\"\n\u2193\nCall think_tool \u2192 Use PHASE 2 template\n  - Extract: brand_personality_matrix (exactly 5 traits)\n  - Extract: unique_value_proposition\n  - Extract: eeat_signal_integration (from website + search)\n```\n\n### Step 3: Customer & Market Intelligence\n\n```\nCall deep_research with query in {{ $('Submit Form').item.json.Language }}:\n  \"[business type] target audience {{ $('Submit Form').item.json.Country }} {{ $('Submit Form').item.json.Language }}\"\n\u2193\nCall serp_Search OR ai_Mode with query in {{ $('Submit Form').item.json.Language }}:\n  \"[main service/product] {{ $('Submit Form').item.json.Country }}\"\n\u2193\nCall think_tool \u2192 Use PHASE 3 template\n  - Extract: target_audience_personas\n  - Extract: people_ask (exactly 5 questions, numbered format with \\n)\n  - Extract: customer_journey (with \\n separator)\n  - Extract: customer_persona_trait (4-6 sentences with name, age, occupation, city)\n  - Extract: GEO_tactic (with 3-5 competitor keywords in target language)\n```\n\n### Step 4: Quality Validation & Database Save\n\n```\nCall think_tool \u2192 Use PHASE 4 template\n  - Validate ALL 14 fields against format requirements\n  - Count sentences, traits, questions\n  - Verify formats (numbered with \\n, \\n separator, no https/www)\n  - Check language correctness\n\u2193\nIf validation PASSES:\n  Call insert_row_in_data_table with all 14 fields\n\u2193\nIf validation FAILS:\n  Fix issues and re-validate before saving\n```\n\n---\n\n## Common Formatting Errors (AVOID)\n\n| \u274c Wrong | \u2705 Correct |\n|:---------|:-----------|\n| `client_website: \"https://www.example.com\"` | `client_website: \"example.com\"` |\n| `people_ask: \"[\\\"Q1?\\\", \\\"Q2?\\\", \\\"Q3?\\\", \\\"Q4?\\\", \\\"Q5?\\\"]\"` (JSON format) | `people_ask: \"1. Question one?\\n2. Question two?\\n3. Question three?\\n4. Question four?\\n5. Question five?\"` |\n| `people_ask: \"1. Q1? 2. Q2? 3. Q3?\"` (only 3 questions, no \\n) | `people_ask: \"1. Q1?\\n2. Q2?\\n3. Q3?\\n4. Q4?\\n5. Q5?\"` (5 questions with \\n) |\n| `customer_journey: \"Awareness (discovery), Consideration (evaluation)\"` | `customer_journey: \"Awareness: discovery\\nConsideration: evaluation\\nPurchase: decision\\nLoyalty: retention\"` |\n| `brand_personality_matrix: \"Professional, Trustworthy, Innovative\"` (3) | `brand_personality_matrix: \"Professional, Trustworthy, Innovative, Reliable, Local\"` (5) |\n| Queries in English for Spanish market | All queries in {{ $('Submit Form').item.json.Language }} |\n| `client_description: \"They provide services.\"` (1 sentence) | `client_description: \"[2-4 sentences with services, area, years, differentiator]\"` |\n| Saving without validation | Always complete PHASE 4 validation first |\n\n---\n\n## Stop Sequences\n\n```\n---END EXTRACTION---\nANALYSIS COMPLETE\n```\n\n---\n\n## Begin Execution\n\n**Execute this EXACT workflow NOW:**\n\n```\nSTEP 1: URL_search \u2192 {{ $('Submit Form').item.json['Page URL'] }}\nSTEP 2: get_internal_links \u2192 {{ $('Submit Form').item.json['Page URL'] }}\nSTEP 3: think_tool \u2192 PHASE 1 (Core Data Extraction)\nSTEP 4: online_Search \u2192 [business research in target language]\nSTEP 5: think_tool \u2192 PHASE 2 (Brand Analysis)\nSTEP 6: deep_research \u2192 [audience research in target language]\nSTEP 7: serp_Search OR ai_Mode \u2192 [competitor keywords in target language]\nSTEP 8: think_tool \u2192 PHASE 3 (Customer Intelligence)\nSTEP 9: think_tool \u2192 PHASE 4 (Quality Validation)\nSTEP 10: insert_row_in_data_table \u2192 [all 14 fields]\n```\n[If a tool fails, try again]\n```\n\n**START NOW with STEP 1.**"
            }
          ]
        },
        "simplify": false
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "8b7e53f4-11e5-4612-8940-63758b72d51a",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        -544
      ],
      "parameters": {
        "color": 7,
        "width": 256,
        "height": 256,
        "content": "## ->  Reference data"
      },
      "typeVersion": 1
    },
    {
      "id": "af44c2d5-741f-447a-8ece-6656a81bc6e3",
      "name": "Get Session Data",
      "type": "n8n-nodes-base.set",
      "position": [
        480,
        -464
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "3b9b69d8-ab3e-4ee0-b6d3-2dcfb41832ea",
              "name": "session_id",
              "type": "string",
              "value": "={{ $('Get Business Data').item.json.session_id }}"
            },
            {
              "id": "60ec7b85-f558-4bdf-b79d-f24907184718",
              "name": "location_code",
              "type": "number",
              "value": "={{ $('Get Country & Language Code').item.json.location_code }}"
            },
            {
              "id": "833bc73b-7f47-4d27-9ff5-e814028b1fe1",
              "name": "language_code",
              "type": "string",
              "value": "={{ $('Get Country & Language Code').item.json.language_code }}"
            },
            {
              "id": "ab85d2d1-9936-4a4a-b327-fce4c1d6017d",
              "name": "pdfwebViewLink",
              "type": "string",
              "value": "={{ $('Get Links').item.json.pdfwebViewLink }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "c1e6ae63-d6bc-426f-80a1-b82b08d2517d",
      "name": "get_internal_links",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        -320,
        -960
      ],
      "parameters": {
        "workflowId": {
          "__rl": true,
          "mode": "list",
          "value": "VjpOW2V2aNV9HpQJ",
          "cachedResultUrl": "/workflow/VjpOW2V2aNV9HpQJ",
          "cachedResultName": "Laboratory \u2014 Business Analysis Workflow Tools"
        },
        "description": "This tool will return all internal links for the client.",
        "workflowInputs": {
          "value": {
            "url": "={{ $('Submit Form').item.json['Page URL'] }}",
            "function": "internal_links"
          },
          "schema": [
            {
              "id": "function",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "function",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "keyword",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "keyword",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "url",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "location_code",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "location_code",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "language_code",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "language_code",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "e85d778b-f116-4c73-985c-3fe94b6b9bf2",
      "name": "Sticky Note21",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -496,
        -224
      ],
      "parameters": {
        "color": 7,
        "width": 336,
        "height": 368,
        "content": "**1. `[-Business Data-]`** Data Table\n* `session_id` (string)\n* `client_name` (string)\n* `client_country` (string)\n* `client_language` (string)\n* `client_website` (string)\n* `client_description` (string)\n* `target_audience_personas` (string)\n* `brand_personality_matrix` (string)\n* `unique_value_proposition` (string)\n* `people_ask` (string)\n* `customer_journey` (string)\n* `customer_persona_trait` (string)\n* `eeat_signal_integration` (string)\n* `GEO_tactic` (string)\n* `call_to_action` (string)"
      },
      "typeVersion": 1
    },
    {
      "id": "342a5304-f3af-422a-afc5-9f183f789a0a",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1152,
        -1008
      ],
      "parameters": {
        "color": 7,
        "width": 608,
        "height": 1344,
        "content": "## **Business Analysis Workflow Setup Guide** \ud83d\ude80\nHere\u2019s a simple guide to get your workflow up and running.\n\n## **Step 1. Set Up Your Data T \ud83d\uddc2\ufe0f**\nThis workflow needs a place to store information. You'll need to create a Data Table in n8n.\n\nPlease use the separate **Datatable Setup Guide** for the exact table name and columns. Getting this right is super important!\n\n## **Step 2. Connect Your API Keys \ud83d\udd11**\nFind the nodes that require credentials and set up your API keys.\n* **Firecrawl**: [Firecrawl Website](https://www.firecrawl.dev/)\n* **Perplexity**: [Perplexity Docs](https://docs.perplexity.ai/)\n* **DataforSEO**: [DataForSEO API](https://dataforseo.com/)\n\nYou'll also need to add your **Gemini** API key in the `A-SBI Agent`. You can get the API key from [Google AI Studio](https://aistudio.google.com).\n\n## **Step 3. Configure the AI Agent \ud83e\udd16**\n\n### **A-SBI Agent**\n* **Model:** Gemini 2.5 Pro\n* **Connections:**\n  * `online_search` & `pro_search` \u2192 **Perplexity**\n  * `url_search` \u2192 **Firecrawl**\n  * `insert_row_in_data_table` \u2192 **[-KR- Business Data]** (Insert option)\n  * `get_internal_links`, `serp_search` & `ai_mode` \u2192 **Business Intelligence tools**\n* Make sure its **Data Table** is linked to the correct `Business Data Table` so it can save findings.\n\n### \ud83d\udd11 Condition for Data Tables:\n* **session_id** must equal the session ID of the workflow.\n\n## Step 4. Set Up Google Nodes \ud83d\udcca\nConnect your **Google Drive**, **Gmail**, **Google Sheets**, and **Google Docs** accounts in n8n.\nIf you haven\u2019t already set up your Google API credentials, follow this video guide to enable the required APIs and create credentials:\n\ud83c\udfa5 [How to Set Up Google API in n8n](https://www.youtube.com/watch?v=3Ai1EPznlAc&t)\n\n\n### **Copy the Google Docs Template \ud83d\udcc4**\nMake a copy of the main report template and connect it in \"Make Copy of Template\" google drive node.\n* **Primary Link:** [Template Copy](https://docs.google.com/document/d/1Q6LvBw6cSGdcNbsEd0Tjo-pVfQsXI1_jUpeUaBsRDdg/edit?usp=sharing)\n* **Backup Link:** [If primary link doesn't work (docx)](https://pub-70c57f6d49284d1da8650039c2add836.r2.dev/Business%20Analysis%20Report%20Template.docx)\n\n\n### **Configure Email Delivery \ud83d\udcec**\nIn the **\u201cSend Email\u201d** node, enter the email address where you want the final report to be delivered.\n\n\n### **\ud83d\udc49 IMPORTANT: Test As You Go!**\nBefore activating the whole workflow, **test each node individually**. Click a node, press the 'Play' button on it, and see if it works. This is the fastest way to find and fix any problems!"
      },
      "typeVersion": 1
    },
    {
      "id": "226c6bac-43e3-450f-bea9-5c3322b86a02",
      "name": "Get Business Data",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        544,
        -736
      ],
      "parameters": {
        "limit": 1,
        "filters": {
          "conditions": [
            {
              "keyName": "session_id",
              "keyValue": "={{ $('Session ID').item.json.session_id }}"
            }
          ]
        },
        "operation": "get",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "wa0kkSaygUdBVzcF",
          "cachedResultUrl": "/projects/6s3sOILcGEL9TSZr/datatables/wa0kkSaygUdBVzcF",
          "cachedResultName": "Business Data"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "6e3a3db7-b73b-45f8-b3e3-d10154e348c8",
      "name": "Make Copy of Template",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        912,
        -736
      ],
      "parameters": {
        "name": "=Business Analysis Report for {{ $json.client_name }}",
        "fileId": {
          "__rl": true,
          "mode": "list",
          "value": "1grgYd2Pyr_THq4FJ83PibO_1vXzbEHiQPVqaTdCOvuk",
          "cachedResultUrl": "https://docs.google.com/document/d/1grgYd2Pyr_THq4FJ83PibO_1vXzbEHiQPVqaTdCOvuk/edit?usp=drivesdk",
          "cachedResultName": "Business Analysis Free Report Template"
        },
        "options": {},
        "operation": "copy"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "4f3d5e1c-fe14-49c1-bf8c-0b2d48a6c68b",
      "name": "Generate PDF",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -272,
        -464
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Change Variables in Doc').item.json.documentId }}"
        },
        "options": {
          "binaryPropertyName": "data",
          "googleFileConversion": {
            "conversion": {
              "docsToFormat": "application/pdf"
            }
          }
        },
        "operation": "download"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "0c04268b-dd1e-4707-a576-8041b748878e",
      "name": "Add PDF To Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -96,
        -464
      ],
      "parameters": {
        "name": "={{ $('Make Copy of Template').item.json.name }}",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive",
          "cachedResultUrl": "https://drive.google.com/drive/my-drive",
          "cachedResultName": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "list",
          "value": "1lrO0o56kQ1npPIwpbFc3WzllUWj95svX",
          "cachedResultUrl": "https://drive.google.com/drive/folders/1lrO0o56kQ1npPIwpbFc3WzllUWj95svX",
          "cachedResultName": "n8n test"
        }
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "7dcfbadc-7abd-4c10-b3cd-9a1ca89df40e",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -512,
        -544
      ],
      "parameters": {
        "color": 4,
        "width": 896,
        "height": 256,
        "content": "## -> Business Analysis Report"
      },
      "typeVersion": 1
    },
    {
      "id": "bc4a2927-29e7-4472-b159-779232d00126",
      "name": "Get All Data",
      "type": "n8n-nodes-base.set",
      "position": [
        720,
        -736
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "1145d9f2-e25a-45a2-a06b-eecd4aaef91d",
              "name": "Date",
              "type": "string",
              "value": "={{ $now.toFormat('dd LLL yyyy') }}"
            },
            {
              "id": "25408253-e058-40d8-a7d3-fda3b14c909c",
              "name": "client_name",
              "type": "string",
              "value": "={{ $('Get Business Data').item.json.client_name }}"
            },
            {
              "id": "6c2c24f0-eed4-4f5d-946b-44f4b0b0ec58",
              "name": "client_country",
              "type": "string",
              "value": "={{ $('Get Business Data').item.json.client_country }}"
            },
            {
              "id": "e98ccf58-ba10-4096-9a1e-7f919dd017b8",
              "name": "client_language",
              "type": "string",
              "value": "={{ $('Get Business Data').item.json.client_language }}"
            },
            {
              "id": "f4cc5449-d1be-4451-90f5-35a6ae43dcea",
              "name": "client_website",
              "type": "string",
              "value": "={{ $('Get Business Data').item.json.client_website }}"
            },
            {
              "id": "8489bde7-6246-4b51-888d-d455c017f5e3",
              "name": "client_description",
              "type": "string",
              "value": "={{ $('Get Business Data').item.json.client_description }}"
            },
            {
              "id": "4ed2bdab-b859-4aaf-b453-9e834a362b71",
              "name": "target_audience_personas",
              "type": "string",
              "value": "={{ $('Get Business Data').item.json.target_audience_personas }}"
            },
            {
              "id": "9c58af50-f25b-417c-8390-5c697e19d341",
              "name": "brand_personality_matrix",
              "type": "string",
              "value": "={{ $('Get Business Data').item.json.brand_personality_matrix }}"
            },
            {
              "id": "8d6576be-b587-45fe-81f5-4570f3513bc8",
              "name": "unique_value_proposition",
              "type": "string",
              "value": "={{ $('Get Business Data').item.json.unique_value_proposition }}"
            },
            {
              "id": "2a9c5928-e3e0-433d-b0a6-bd11b336dda1",
              "name": "people_ask",
              "type": "string",
              "value": "={{ $('Get Business Data').item.json.people_ask }}"
            },
            {
              "id": "1cf608b4-61e1-4bdd-8e14-f240745b946b",
              "name": "customer_journey",
              "type": "string",
              "value": "={{ $('Get Business Data').item.json.customer_journey }}"
            },
            {
              "id": "5e22b364-9a59-453d-85ad-88f99b71d52e",
              "name": "customer_persona_trait",
              "type": "string",
              "value": "={{ $('Get Business Data').item.json.customer_persona_trait }}"
            },
            {
              "id": "32d212be-0a4a-4c3d-b8f6-2212e200892a",
              "name": "eeat_signal_integration",
              "type": "string",
              "value": "={{ $('Get Business Data').item.json.eeat_signal_integration }}"
            },
            {
              "id": "2f598121-3846-4b91-849e-b55f063c616c",
              "name": "GEO_tactic",
              "type": "string",
              "value": "={{ $('Get Business Data').item.json.GEO_tactic }}"
            },
            {
              "id": "0f858441-7dc3-4b6a-bca0-eccfdf4c9e79",
              "name": "call_to_action",
              "type": "string",
              "value": "={{ $('Get Business Data').item.json.call_to_action }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "d4638468-34a7-40be-a695-8faf7822abf3",
      "name": "Generate Doc",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1344,
        -736
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.documentId }}"
        },
        "options": {
          "binaryPropertyName": "data",
          "googleFileConversion": {
            "conversion": {
              "docsToFormat": "application/vnd.oasis.opendocument.text"
            }
          }
        },
        "operation": "download"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "620594e5-aaa3-4c80-b19d-5aa8a54dd2ca",
      "name": "Add Doc to Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -432,
        -464
      ],
      "parameters": {
        "name": "={{ $('Make Copy of Template').item.json.name }}",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive",
          "cachedResultUrl": "https://drive.google.com/drive/my-drive",
          "cachedResultName": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "list",
          "value": "1lrO0o56kQ1npPIwpbFc3WzllUWj95svX",
          "cachedResultUrl": "https://drive.google.com/drive/folders/1lrO0o56kQ1npPIwpbFc3WzllUWj95svX",
          "cachedResultName": "n8n test"
        }
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "7596700f-0bf1-433c-b9fc-8ceed8e0cddb",
      "name": "Get Links",
      "type": "n8n-nodes-base.set",
      "position": [
        64,
        -464
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "1b14a360-bd52-4a83-836f-714879e7dfad",
              "name": "Date",
              "type": "string",
              "value": "={{ $('Get All Data').item.json.Date }}"
            },
            {
              "id": "e3a57535-9036-4d51-bd0d-d1c52c075c51",
              "name": "client_name",
              "type": "string",
              "value": "={{ $('Get All Data').item.json.client_name }}"
            },
            {
              "id": "c792cd1b-9dea-4fca-89ec-2b7da1c25457",
              "name": "client_website",
              "type": "string",
              "value": "={{ $('Get All Data').item.json.client_website }}"
            },
            {
              "id": "ec12e72c-5382-4345-95e2-09de89cbfedb",
              "name": "originalFilename",
              "type": "string",
              "value": "={{ $('Add Doc to Drive').item.json.originalFilename }}"
            },
            {
              "id": "f836570f-8da2-42e0-b6ce-9e7068cea1c7",
              "name": "docwebViewLink",
              "type": "string",
              "value": "={{ $('Add Doc to Drive').item.json.webViewLink }}"
            },
            {
              "id": "b626d5dc-5957-4d46-ad84-aca8ec598ad0",
              "name": "pdfwebViewLink",
              "type": "string",
              "value": "={{ $json.webViewLink }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "f34e1c4e-ec63-43d6-b783-db8e1cb90430",
      "name": "Send email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        224,
        -464
      ],
      "parameters": {
        "sendTo": "user@example.com",
        "message": "=Hey Daniel \ud83d\udc4b\n\nHere\u2019s your report \ud83d\udcc4\n\n\ud83d\udcdd Name: {{ $json.originalFilename }}\n\n\ud83c\udf10 Document: \n{{ $json.docwebViewLink }}\n\n\ud83d\udcd8 PDF: \n{{ $json.pdfwebViewLink }}\n\n---\n\n\u2699\ufe0f Session ID: {{ $('Get Business Data').item.json.session_id }}",
        "options": {},
        "subject": "=Business Analysis for {{ $json.client_name }}",
        "emailType": "text"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "40e2dbde-d0b1-4807-8b67-2913fde07eca",
      "name": "Sticky Note22",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        800,
        -992
      ],
      "parameters": {
        "color": 7,
        "width": 720,
        "content": "### **serp_search**, **get_internal_links**, **ai_mode** tools Sub-workflow inputs:\n* function: `serp_search` / `ai_mode` / `get_internal_links`\n* keyword: Defined automatically by the model\n* url: Defined automatically by the model\n* location_code: `{{ $('Get Country & Language Code').item.json.location_code }}`\n* language_code: `{{ $('Get Country & Language Code').item.json.language_code }}`"
      },
      "typeVersion": 1
    },
    {
      "id": "15a0fb74-5559-4c95-ac8e-214dd1bae74e",
      "name": "Change Variables in Doc",
      "type": "n8n-nodes-base.googleDocs",
      "position": [
        1120,
        -736
      ],
      "parameters": {
        "actionsUi": {
          "actionFields": [
            {
              "text": "{{client_name}}",
              "action": "replaceAll",
              "replaceText": "={{ $('Get All Data').item.json.client_name }}"
            },
            {
              "text": "{{client_website}}",
              "action": "replaceAll",
              "replaceText": "={{ $('Get All Data').item.json.client_website }}"
            },
            {
              "text": "{{client_country}}",
              "action": "replaceAll",
              "replaceText": "={{ $('Get All Data').item.json.client_country }}"
            },
            {
              "text": "{{client_language}}",
              "action": "replaceAll",
              "replaceText": "={{ $('Get All Data').item.json.client_language }}"
            },
            {
              "text": "{{ranked_keywords_sheets_link}}",
              "action": "replaceAll",
              "replaceText": "={{ $('Get All Data').item.json.ranked_keywords_sheet_link }}"
            },
            {
              "text": "{{date_time}}",
              "action": "replaceAll",
              "replaceText": "={{ $now.toFormat('dd LLL yyyy') }}"
            },
            {
              "text": "{{client_description}}",
              "action": "replaceAll",
              "replaceText": "={{ $('Get All Data').item.json.client_description }}"
            },
            {
              "text": "{{target_audience_personas}}",
              "action": "replaceAll",
              "replaceText": "={{ $('Get All Data').item.json.target_audience_personas }}"
            },
            {
              "text": "{{brand_personality_matrix}}",
              "action": "replaceAll",
              "replaceText": "={{ $('Get All Data').item.json.brand_personality_matrix }}"
            },
            {
              "text": "{{unique_value_proposition}}",
              "action": "replaceAll",
              "replaceText": "={{ $('Get All Data').item.json.unique_value_proposition }}"
            },
            {
              "text": "{{people_ask}}",
              "action": "replaceAll",
              "replaceText": "={{ $('Get All Data').item.json.people_ask }}"
            },
            {
              "text": "{{customer_journey}}",
              "action": "replaceAll",
              "replaceText": "={{ $('Get All Data').item.json.customer_journey }}"
            },
            {
              "text": "{{customer_persona_trait}}",
              "action": "replaceAll",
              "replaceText": "={{ $('Get All Data').item.json.customer_persona_trait }}"
            },
            {
              "text": "{{eeat_signal_integration}}",
              "action": "replaceAll",
              "replaceText": "={{ $('Get All Data').item.json.eeat_signal_integration }}"
            },
            {
              "text": "{{GEO_tactic}}",
              "action": "replaceAll",
              "replaceText": "={{ $('Get All Data').item.json.GEO_tactic }}"
            },
            {
              "text": "{{call_to_action}}",
              "action": "replaceAll",
              "replaceText": "={{ $('Get All Data').item.json.call_to_action }}"
            }
          ]
        },
        "operation": "update",
        "documentURL": "={{ $json.id }}"
      },
      "credentials": {
        "googleDocsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "2da7f621-4ec5-4319-93c0-fa001f4c8523",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -512,
        -272
      ],
      "parameters": {
        "color": 3,
        "width": 384,
        "height": 432,
        "content": "## Data Tables Setup:"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "f037103e-d153-4354-aab7-f40b66cff1bd",
  "connections": {
    "ai_Mode": {
      "ai_tool": [
        [
          {
            "node": "Business Analyst",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get Links": {
      "main": [
        [
          {
            "node": "Send email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send email": {
      "main": [
        [
          {
            "node": "Get Session Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Session ID": {
      "main": [
        [
          {
            "node": "Business Analyst",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Think_tool": {
      "ai_tool": [
        [
          {
            "node": "Business Analyst",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "URL_search": {
      "ai_tool": [
        [
          {
            "node": "Business Analyst",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Submit Form": {
      "main": [
        [
          {
            "node": "Get Country & Language Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "serp_Search": {
      "ai_tool": [
        [
          {
            "node": "Business Analyst",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Generate Doc": {
      "main": [
        [
          {
            "node": "Add Doc to Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate PDF": {
      "main": [
        [
          {
            "node": "Add PDF To Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get All Data": {
      "main": [
        [
          {
            "node": "Make Copy of Template",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "deep_research": {
      "ai_tool": [
        [
          {
            "node": "Business Analyst",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "online_Search": {
      "ai_tool": [
        [
          {
            "node": "Business Analyst",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Add Doc to Drive": {
      "main": [
        [
          {
            "node": "Generate PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add PDF To Drive": {
      "main": [
        [
          {
            "node": "Get Links",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Business Analyst": {
      "main": [
        [
          {
            "node": "Get Business Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Session Data": {
      "main": [
        []
      ]
    },
    "Get Business Data": {
      "main": [
        [
          {
            "node": "Get All Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_internal_links": {
      "ai_tool": [
        [
          {
            "node": "Business Analyst",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Make Copy of Template": {
      "main": [
        [
          {
            "node": "Change Variables in Doc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Change Variables in Doc": {
      "main": [
        [
          {
            "node": "Generate Doc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "insert_row_in_data_table": {
      "ai_tool": [
        [
          {
            "node": "Business Analyst",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get Country & Language Code": {
      "main": [
        [
          {
            "node": "Session ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}