Prompt: Build a workflow for: Serp Analysis Template

Response:
# Workflow Architecture

**Purpose**: General Automation

**Key Components**:
- Total Nodes: 35
- Node Types: n8n-nodes-base.splitOut, n8n-nodes-base.set, n8n-nodes-base.wait, n8n-nodes-base.limit, n8n-nodes-base.splitInBatches, @n8n/n8n-nodes-langchain.openAi, n8n-nodes-base.if, n8n-nodes-base.stickyNote, n8n-nodes-base.googleSheets, n8n-nodes-base.httpRequest

**Logic Flow**:
1. **Trigger**: n8n-nodes-base.formTrigger - Initiates the workflow

## Complete Workflow JSON

```json
{
  "name": "SERP Analysis Template",
  "nodes": [
    {
      "parameters": {
        "formTitle": "Keyword Research Form",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Focus Keyword",
              "requiredField": true
            },
            {
              "fieldLabel": "Country",
              "fieldType": "dropdown",
              "fieldOptions": {
                "values": [
                  {
                    "option": "de"
                  },
                  {
                    "option": "us"
                  },
                  {}
                ]
              }
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.formTrigger",
      "typeVersion": 2.2,
      "position": [
        -880,
        940
      ],
      "id": "b93168f8-109d-4014-9ec8-661086b9c4ad",
      "name": "On form submission",
      "webhookId": "92522c0f-d6a1-4d0d-aff7-eb5db34ee8e0"
    },
    {
      "parameters": {
        "url": "https://serpapi.com/search",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "serpApi",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "q",
              "value": "={{ $json['Focus Keyword'] }}"
            },
            {
              "name": "gl",
              "value": "={{ $json.Country }}"
            },
            {
              "name": "device",
              "value": "DESKTOP"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -660,
        1040
      ],
      "id": "67331a54-782c-4e11-a3c8-5441d65ded74",
      "name": "get_desktop_serp_results"
    },
    {
      "parameters": {
        "url": "https://serpapi.com/search",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "serpApi",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "q",
              "value": "={{ $json['Focus Keyword'] }}"
            },
            {
              "name": "gl",
              "value": "={{ $json.Country }}"
            },
            {
              "name": "device",
              "value": "mobile"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -660,
        820
      ],
      "id": "990a8da4-2021-4663-8416-09dbfafbe98c",
      "name": "get_mobile_serp_results"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "fcf16964-061d-4c9e-82c6-954e769e899c",
              "name": "organic_results",
              "value": "={{ $json.organic_results }}",
              "type": "array"
            },
            {
              "id": "44fba0e5-686c-4475-89dd-66f711bf910c",
              "name": "search_parameters.device",
              "value": "={{ $json.search_parameters.device }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -440,
        820
      ],
      "id": "f9875911-5b24-4584-b161-a5d0a4978fb1",
      "name": "get_organic_results_by_mobile"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "e76a9070-4782-4a54-84b6-bce1eb50023d",
              "name": "organic_results",
              "value": "={{ $json.organic_results }}",
              "type": "array"
            },
            {
              "id": "64fffe61-bb13-47e6-9555-c8adb9c3762d",
              "name": "search_parameters.device",
              "value": "={{ $json.search_parameters.device }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -460,
        1040
      ],
      "id": "97f9f45d-c6a7-47fd-9377-ab0261f673b5",
      "name": "get_organic_results_by_desktop"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "0e112e59-ad43-4321-9de0-d1d502f98266",
              "name": "related_questions",
              "value": "={{ $json.related_questions }}",
              "type": "array"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -440,
        640
      ],
      "id": "228b96fa-9d26-474c-8105-af5d565beb34",
      "name": "get_faq_by_mobile"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "0e112e59-ad43-4321-9de0-d1d502f98266",
              "name": "related_questions",
              "value": "={{ $json.related_questions }}",
              "type": "array"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -460,
        1260
      ],
      "id": "40066e50-cfe3-4fff-8afb-8661d75a0592",
      "name": "get_faq_by_desktop"
    },
    {
      "parameters": {
        "maxItems": 3
      },
      "type": "n8n-nodes-base.limit",
      "typeVersion": 1,
      "position": [
        -220,
        820
      ],
      "id": "ee22525b-fb1d-492e-8c6c-65665c705ca7",
      "name": "top_3_by_mobile"
    },
    {
      "parameters": {
        "maxItems": 3
      },
      "type": "n8n-nodes-base.limit",
      "typeVersion": 1,
      "position": [
        -240,
        1040
      ],
      "id": "18964edb-4e1c-46f5-9a84-eefcc5ab2119",
      "name": "top_3_by_desktop"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3,
      "position": [
        40,
        780
      ],
      "id": "f07e0e80-7ab1-4631-8d12-0eabb82dbc4d",
      "name": "get_urls_to_crawl"
    },
    {
      "parameters": {
        "options": {
          "reset": false
        }
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        40,
        1080
      ],
      "id": "21ae683d-b280-4250-9fd9-53cf4fceaacd",
      "name": "Loop Over Items"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "http://crawl4ai:11235/crawl",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "urls",
              "value": "={{ $json.link }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        320,
        1100
      ],
      "id": "8f051515-5b35-49b7-bb09-7da492daf249",
      "name": "get_page_content"
    },
    {
      "parameters": {
        "url": "=http://crawl4ai:11235/task/{{ $json.task_id }}",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        740,
        1100
      ],
      "id": "07f77190-2241-41aa-b731-4049dd1274c4",
      "name": "get_status"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "100015ac-f73c-406d-acd5-49a41d60111a",
              "leftValue": "={{ $json.status }}",
              "rightValue": "completed",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        940,
        1100
      ],
      "id": "c0e6afbf-12a1-4d25-b335-dc0111fe1480",
      "name": "If"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "4eec2c04-b519-4c06-a911-bb7780b776b5",
              "name": "result.metadata.title",
              "value": "={{ $('get_status').item.json.result.metadata.title }}",
              "type": "string"
            },
            {
              "id": "0eac8d67-34d9-4809-92fc-69f47381e104",
              "name": "result.metadata.description",
              "value": "={{ $('get_status').item.json.result.metadata.description }}",
              "type": "string"
            },
            {
              "id": "58b74b11-74f8-42e3-b68f-a2aa4c380578",
              "name": "result.metadata['og:url']",
              "value": "={{ $('get_status').item.json.result.metadata['og:url'] }}",
              "type": "string"
            },
            {
              "id": "f57680c0-48ed-492f-a1d9-508a0c996198",
              "name": "result.cleaned_html",
              "value": "={{ $('get_status').item.json.result.cleaned_html }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1160,
        1040
      ],
      "id": "c097144a-cc69-4061-a720-a1f94d91ab3b",
      "name": "get_metadata"
    },
    {
      "parameters": {
        "html": "={{ $json.result.cleaned_html }}",
        "destinationKey": "content",
        "options": {}
      },
      "type": "n8n-nodes-base.markdown",
      "typeVersion": 1,
      "position": [
        1400,
        1200
      ],
      "id": "52102ba3-90b5-4ff7-b368-469c0c79baff",
      "name": "get_content_as_markdown"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        540,
        1100
      ],
      "id": "0e696748-e2cb-4767-b532-83eb429f2906",
      "name": "wait_5_sec_0",
      "webhookId": "28064a82-1e4e-41f5-bdd9-7cf011034260"
    },
    {
      "parameters": {
        "fieldToSplitOut": "organic_results",
        "options": {}
      },
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        200,
        780
      ],
      "id": "5380bee4-e5ed-4022-9771-6858fe1af7ea",
      "name": "Split Out"
    },
    {
      "parameters": {
        "compare": "selectedFields",
        "fieldsToCompare": "link",
        "options": {}
      },
      "type": "n8n-nodes-base.removeDuplicates",
      "typeVersion": 2,
      "position": [
        520,
        780
      ],
      "id": "ef611ef3-164c-4fed-81d2-e724af8438a2",
      "name": "Remove Duplicates"
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "gpt-4o-mini",
          "mode": "list",
          "cachedResultName": "GPT-4O-MINI"
        },
        "messages": {
          "values": [
            {
              "content": "You are a SEO-specialist and your task is to analyze the articles from our competitors. The ultimate goal is to write an article that is better than the competitors article. Apart from that, you are familiar with markdown and you are able to extract only relevant content.",
              "role": "system"
            },
            {
              "content": "=Your task is to analyze the following <article> =  {{ $json.content }} and provide me the following information:\n- Short Summary\n- Potential Focus Keyword\n- Relevant long-tail keywords\n- N-Gram-Analysis\n"
            }
          ]
        },
        "jsonOutput": true,
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.8,
      "position": [
        1620,
        1200
      ],
      "id": "97b7b8c9-855c-4d83-a06f-3ff07f6213b6",
      "name": "OpenAI"
    },
    {
      "parameters": {
        "maxItems": 5
      },
      "type": "n8n-nodes-base.limit",
      "typeVersion": 1,
      "position": [
        360,
        780
      ],
      "id": "f55ec09b-332d-416e-aad5-e824dea44efd",
      "name": "Limit"
    },
    {
      "parameters": {
        "content": "# Get SERPs by Keyword and Country",
        "height": 840,
        "width": 840
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -920,
        580
      ],
      "id": "2bf16ade-d73d-463b-9d72-8084e92b90ec",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "content": "# Prepare SERPs for Crawling and Analysis",
        "height": 400,
        "width": 820,
        "color": 6
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -60,
        580
      ],
      "id": "5767bdeb-11b2-45aa-9edb-56aaf4665dd2",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "content": "# Crawl Pages with Crawl4ai",
        "height": 420,
        "width": 2240,
        "color": 4
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -60,
        1000
      ],
      "id": "c5414411-56e7-4307-ab8c-a1f2abf852e9",
      "name": "Sticky Note2"
    },
    {
      "parameters": {
        "content": "# Save Results to Google Sheets",
        "height": 920,
        "width": 1020
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        3060,
        -360
      ],
      "id": "04fe31ac-9da9-4814-a493-a90473942ed9",
      "name": "Sticky Note3"
    },
    {
      "parameters": {
        "content": "### Google Sheets\n\nCreate a sheet called \"SERPs\" with the following columns:\n- position\n- title\n- link\n- snippet\n- short_summary\n- potential_focus_keyword\n- relevant_long_tail_keywords\n- unigrams\n- bigrams\n- trigrams",
        "width": 400
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1760,
        1020
      ],
      "id": "4d2a7420-a20e-4c62-a0cd-8563c72ef2cc",
      "name": "Sticky Note4"
    },
    {
      "parameters": {
        "content": "### Limit\n\nSet a limit when testing the workflow to save computing costs and token usage.",
        "height": 120,
        "width": 220
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        360,
        640
      ],
      "id": "5b6f6a69-fe05-4a8a-82a0-73bb799e2276",
      "name": "Sticky Note5"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3,
      "position": [
        920,
        680
      ],
      "id": "e73f5aac-00c8-4e5c-b6b1-d05cd18d452f",
      "name": "merge_faq"
    },
    {
      "parameters": {
        "fieldToSplitOut": "related_questions",
        "options": {}
      },
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        1140,
        680
      ],
      "id": "f024e1c0-1b30-457e-8a76-e216ddab21ac",
      "name": "get_questions"
    },
    {
      "parameters": {
        "compare": "selectedFields",
        "fieldsToCompare": "question",
        "options": {}
      },
      "type": "n8n-nodes-base.removeDuplicates",
      "typeVersion": 2,
      "position": [
        1360,
        680
      ],
      "id": "ffa44fad-d363-40db-b94d-8fbd16edab19",
      "name": "remove_duplicates_in_questions"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        1580,
        680
      ],
      "id": "4a3183c1-a045-4d8a-aae6-9fde63d5500e",
      "name": "loop_over_questions"
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1h9qtlFg5vYVWAvY6iUliFzHQaOAyDQ4kboutM6Zlj6w",
          "mode": "list",
          "cachedResultName": "Keyword Research",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1h9qtlFg5vYVWAvY6iUliFzHQaOAyDQ4kboutM6Zlj6w/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 738525081,
          "mode": "list",
          "cachedResultName": "FAQs",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1h9qtlFg5vYVWAvY6iUliFzHQaOAyDQ4kboutM6Zlj6w/edit#gid=738525081"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "question": "={{ $json.question }}",
            "title": "={{ $json.title }}",
            "link": "={{ $json.link }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "question",
              "displayName": "question",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "title",
              "displayName": "title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "link",
              "displayName": "link",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        1900,
        780
      ],
      "id": "7527a6f0-1908-4a91-a1a2-704ba5602c36",
      "name": "insert_faqs"
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1h9qtlFg5vYVWAvY6iUliFzHQaOAyDQ4kboutM6Zlj6w",
          "mode": "list",
          "cachedResultName": "Keyword Research",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1h9qtlFg5vYVWAvY6iUliFzHQaOAyDQ4kboutM6Zlj6w/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "SERPs",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1h9qtlFg5vYVWAvY6iUliFzHQaOAyDQ4kboutM6Zlj6w/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "short_summary": "={{ $json.message.content.short_summary ?  $json.message.content.short_summary: \"\" }}",
            "potential_focus_keyword": "={{ $json.message.content.potential_focus_keyword ?  $json.message.content.potential_focus_keyword: \"\" }}",
            "unigrams": "={{ $json.message.content.n_gram_analysis.unigrams ?  $json.message.content.n_gram_analysis.unigrams: \"\" }}",
            "bigrams": "={{ $json.message.content.n_gram_analysis.bigrams ?  $json.message.content.n_gram_analysis.bigrams: \"\" }}",
            "trigrams": "={{ $json.message.content.n_gram_analysis.trigrams ?  $json.message.content.n_gram_analysis.trigrams: \"\" }}",
            "relevant_long_tail_keywords": "={{ $json.message.content.relevant_long_tail_keywords ?  $json.message.content.relevant_long_tail_keywords: \"\" }}",
            "title": "={{ $('Loop Over Items').item.json.title }}",
            "link": "={{ $('Loop Over Items').item.json.link }}",
            "snippet": "={{ $('Loop Over Items').item.json.snippet }}",
            "position": "={{ $('Loop Over Items').item.json.position }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "position",
              "displayName": "position",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "title",
              "displayName": "title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "link",
              "displayName": "link",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "snippet",
              "displayName": "snippet",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "short_summary",
              "displayName": "short_summary",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "potential_focus_keyword",
              "displayName": "potential_focus_keyword",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "relevant_long_tail_keywords",
              "displayName": "relevant_long_tail_keywords",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "unigrams",
              "displayName": "unigrams",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "bigrams",
              "displayName": "bigrams",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "trigrams",
              "displayName": "trigrams",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        1960,
        1200
      ],
      "id": "77f6f438-83ad-4e99-aec0-52e006fd3f49",
      "name": "insert_serp_analysis"
    },
    {
      "parameters": {
        "content": "# GET FAQs",
        "height": 400,
        "width": 1400,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        780,
        580
      ],
      "id": "7bdc4d1c-9987-401b-8a23-0e44a052c541",
      "name": "Sticky Note6"
    },
    {
      "parameters": {
        "content": "### Google Sheets\n\nCreate a sheet called \"FAQs\" with the following columns:\n- question\n- title\n- link",
        "width": 260
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1880,
        600
      ],
      "id": "f0770b44-c147-4f04-9623-802beb9f7dcb",
      "name": "Sticky Note7"
    }
  ],
  "pinData": {},
  "connections": {
    "On form submission": {
      "main": [
        [
          {
            "node": "get_desktop_serp_results",
            "type": "main",
            "index": 0
          },
          {
            "node": "get_mobile_serp_results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_mobile_serp_results": {
      "main": [
        [
          {
            "node": "get_organic_results_by_mobile",
            "type": "main",
            "index": 0
          },
          {
            "node": "get_faq_by_mobile",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_desktop_serp_results": {
      "main": [
        [
          {
            "node": "get_organic_results_by_desktop",
            "type": "main",
            "index": 0
          },
          {
            "node": "get_faq_by_desktop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_faq_by_mobile": {
      "main": [
        [
          {
            "node": "merge_faq",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_organic_results_by_mobile": {
      "main": [
        [
          {
            "node": "top_3_by_mobile",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_organic_results_by_desktop": {
      "main": [
        [
          {
            "node": "top_3_by_desktop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_faq_by_desktop": {
      "main": [
        [
          {
            "node": "merge_faq",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "top_3_by_mobile": {
      "main": [
        [
          {
            "node": "get_urls_to_crawl",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "top_3_by_desktop": {
      "main": [
        [
          {
            "node": "get_urls_to_crawl",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "get_urls_to_crawl": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "get_page_content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_page_content": {
      "main": [
        [
          {
            "node": "wait_5_sec_0",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_status": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If": {
      "main": [
        [
          {
            "node": "get_metadata",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "wait_5_sec_0",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_metadata": {
      "main": [
        [
          {
            "node": "get_content_as_markdown",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "wait_5_sec_0": {
      "main": [
        [
          {
            "node": "get_status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_content_as_markdown": {
      "main": [
        [
          {
            "node": "OpenAI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Limit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Remove Duplicates": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit": {
      "main": [
        [
          {
            "node": "Remove Duplicates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI": {
      "main": [
        [
          {
            "node": "insert_serp_analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "merge_faq": {
      "main": [
        [
          {
            "node": "get_questions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_questions": {
      "main": [
        [
          {
            "node": "remove_duplicates_in_questions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "remove_duplicates_in_questions": {
      "main": [
        [
          {
            "node": "loop_over_questions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "loop_over_questions": {
      "main": [
        [],
        [
          {
            "node": "insert_faqs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "insert_faqs": {
      "main": [
        [
          {
            "node": "loop_over_questions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "insert_serp_analysis": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "b43516de-b4c7-4038-b4f6-83294815796d",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "558d88703fb65b2d0e44613bc35916258b0f0bf983c5d4730c00c424b77ca36a"
  },
  "id": "9lW9vKY54sMpIvZC",
  "tags": [
    {
      "createdAt": "2025-03-02T12:05:53.836Z",
      "updatedAt": "2025-03-02T12:05:53.836Z",
      "id": "utwtHTzeqUdktrxJ",
      "name": "SEO"
    }
  ]
}
```


Prompt: Create an n8n automation that handles general automation

Response:
# Workflow Architecture

**Purpose**: General Automation

**Key Components**:
- Total Nodes: 36
- Node Types: n8n-nodes-base.splitOut, n8n-nodes-base.set, n8n-nodes-base.removeDuplicates, n8n-nodes-base.limit, n8n-nodes-base.splitInBatches, @n8n/n8n-nodes-langchain.openAi, n8n-nodes-base.stickyNote, n8n-nodes-base.httpRequest, n8n-nodes-base.code, n8n-nodes-base.formTrigger

**Logic Flow**:
1. **Trigger**: n8n-nodes-base.formTrigger - Initiates the workflow

## Complete Workflow JSON

```json
{
  "name": "Template - SERP Analysis (Serper)",
  "nodes": [
    {
      "parameters": {
        "formTitle": "Keyword Research Form",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Focus Keyword",
              "requiredField": true
            },
            {
              "fieldLabel": "Country",
              "fieldType": "dropdown",
              "fieldOptions": {
                "values": [
                  {
                    "option": "de"
                  },
                  {
                    "option": "us"
                  }
                ]
              }
            },
            {
              "fieldLabel": "hl",
              "fieldType": "dropdown",
              "fieldOptions": {
                "values": [
                  {
                    "option": "de"
                  },
                  {
                    "option": "en"
                  }
                ]
              }
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.formTrigger",
      "typeVersion": 2.2,
      "position": [
        -1340,
        1080
      ],
      "id": "349ba094-8f87-4bcb-83f1-d286e7b96f76",
      "name": "On form submission",
      "webhookId": "688891c0-8e2b-49f6-beb1-ad881f0412cd"
    },
    {
      "parameters": {
        "url": "https://google.serper.dev/search",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "q",
              "value": "={{ $json['Focus Keyword']}}"
            },
            {
              "name": "gl",
              "value": "={{ $json.Country }}"
            },
            {
              "name": "device",
              "value": "mobile"
            },
            {
              "name": "exclude",
              "value": "[\"video\", \"image\", \"news\", \"places\"]"
            },
            {
              "name": "hl",
              "value": "={{ $json.hl }}"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -1120,
        980
      ],
      "id": "0262df51-ba80-46db-bf76-03417617fe44",
      "name": "get_mobile_serp_results",
      "credentials": {
        "httpHeaderAuth": {
          "id": "9PtnIrGtPxKAKD1J",
          "name": "Serper Demo"
        }
      }
    },
    {
      "parameters": {
        "fieldToSplitOut": "faqs",
        "options": {}
      },
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        -180,
        900
      ],
      "id": "fd37ed1e-149b-49bb-a1fc-345d642997f2",
      "name": "get_questions"
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1Wdynwg7WmGldyWOd8r-mf9VjnCHJQtHosxJskNLfb2A",
          "mode": "list",
          "cachedResultName": "SERP Analysis (Serper)",
          "cachedResultUrl": ""
        },
        "sheetName": {
          "__rl": true,
          "value": 954676522,
          "mode": "list",
          "cachedResultName": "FAQs",
          "cachedResultUrl": ""
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "question": "={{ $json.question }}",
            "snippet": "={{ $json.snippet }}",
            "title": "={{ $json.title }}",
            "link": "={{ $json.link }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "question",
              "displayName": "question",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "title",
              "displayName": "title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "link",
              "displayName": "link",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "snippet",
              "displayName": "snippet",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        260,
        900
      ],
      "id": "6b533b68-e380-4fc7-8286-d7741751847e",
      "name": "insert_faqs",
      "alwaysOutputData": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "oYP1Bc15GY7emvD3",
          "name": "Google Sheets account"
        }
      },
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "url": "https://google.serper.dev/search",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "q",
              "value": "={{ $json['Focus Keyword']}}"
            },
            {
              "name": "gl",
              "value": "={{ $json.Country }}"
            },
            {
              "name": "device",
              "value": "desktop"
            },
            {
              "name": "hl",
              "value": "={{ $json.hl }}"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -1120,
        1180
      ],
      "id": "df178d34-0af1-46dd-a542-ac49a619c543",
      "name": "get_desktop_serp_results",
      "credentials": {
        "httpHeaderAuth": {
          "id": "9PtnIrGtPxKAKD1J",
          "name": "Serper Demo"
        }
      }
    },
    {
      "parameters": {
        "fieldToSplitOut": "related_searches",
        "options": {}
      },
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        -200,
        500
      ],
      "id": "5140a96e-5086-40ef-b357-fcd535e8a4f0",
      "name": "get_queries"
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1Wdynwg7WmGldyWOd8r-mf9VjnCHJQtHosxJskNLfb2A",
          "mode": "list",
          "cachedResultName": "SERP Analysis (Serper)",
          "cachedResultUrl": ""
        },
        "sheetName": {
          "__rl": true,
          "value": 857390152,
          "mode": "list",
          "cachedResultName": "Related Searches",
          "cachedResultUrl": ""
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "query": "={{ $json.query }}"
          },
          "matchingColumns": [
            "query"
          ],
          "schema": [
            {
              "id": "query",
              "displayName": "query",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        240,
        500
      ],
      "id": "7811c41b-ed61-49ca-903c-b121ffea7f3b",
      "name": "insert_related_searches",
      "alwaysOutputData": true,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "oYP1Bc15GY7emvD3",
          "name": "Google Sheets account"
        }
      },
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "0e112e59-ad43-4321-9de0-d1d502f98266",
              "name": "faqs",
              "value": "={{ $json.peopleAlsoAsk }}",
              "type": "array"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -680,
        900
      ],
      "id": "623722a5-a1f6-470d-b9c9-d48272641bb5",
      "name": "get_faq_mobile",
      "alwaysOutputData": true,
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "fcf16964-061d-4c9e-82c6-954e769e899c",
              "name": "organic_results",
              "value": "={{ $json.organic }}",
              "type": "array"
            },
            {
              "id": "44fba0e5-686c-4475-89dd-66f711bf910c",
              "name": "search_parameters.device",
              "value": "={{ $json.searchParameters.device }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -680,
        1160
      ],
      "id": "d08f09c1-8f87-4a8e-9ed7-88b8ace602cd",
      "name": "get_organic_results_mobile"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "e76a9070-4782-4a54-84b6-bce1eb50023d",
              "name": "organic_results",
              "value": "={{ $json.organic }}",
              "type": "array"
            },
            {
              "id": "64fffe61-bb13-47e6-9555-c8adb9c3762d",
              "name": "search_parameters.device",
              "value": "={{ $json.searchParameters.device }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -680,
        1360
      ],
      "id": "fd37ffb2-175d-43be-b3eb-a1a1bc0bec3e",
      "name": "get_organic_results_desktop"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "0e112e59-ad43-4321-9de0-d1d502f98266",
              "name": "faqs",
              "value": "={{ $json.peopleAlsoAsk }}",
              "type": "array"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -680,
        1560
      ],
      "id": "d3c39dcf-a921-434b-bbe9-2ba0e2af3f2b",
      "name": "get_faq_desktop",
      "alwaysOutputData": true,
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "content": "# Insert Related Searches\n",
        "height": 380,
        "width": 960,
        "color": 4
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -460,
        400
      ],
      "id": "55b418ae-b85e-48ce-b5ab-7c6e8f6bd237",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "content": "# Insert FAQs",
        "height": 380,
        "width": 960,
        "color": 4
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -460,
        800
      ],
      "id": "19e037a0-0e0d-4b1c-a0a2-5d4f169a5298",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "content": "# Get Data",
        "height": 1560,
        "width": 900
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -1400,
        400
      ],
      "id": "17460b8b-cd05-4396-9c7b-280c1007ca3c",
      "name": "Sticky Note3"
    },
    {
      "parameters": {
        "content": "# SERP Analysis\n",
        "height": 760,
        "width": 2180,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -460,
        1200
      ],
      "id": "b4ac485c-2dc6-40e2-b373-46d320ef3901",
      "name": "Sticky Note4"
    },
    {
      "parameters": {
        "content": "## Workflow Instructions\n#### Requirements\nTo use this workflow, you will need accounts and API access for the following services:\n- **Google Sheets**\n- **Serper Dev**\n- **OpenAI**\n#### Google Spreadsheet Setup\nCreate a Google Spreadsheet with **three sheets** named exactly as follows:\n1. **SERP Analysis**  \n   Columns (in order):  \n   `position`, `title`, `link`, `snippet`, `short_summary`, `potential_focus_keyword`, `relevant_long_tail_keywords`, `unigrams`, `bigrams`, `trigrams`\n2. **FAQs**  \n   Columns (in order):  \n   `question`, `title`, `link`, `snippet`\n3. **Related Searches**  \n   Columns (in order):  \n   `query`\n> **Tip:** Make sure the sheet names and column headers match exactly, including capitalization and spacing, to ensure the workflow functions correctly.\n#### Getting Started\n1. **Set up your Google Spreadsheet** as described above.\n2. **Configure your API credentials** for Serper and OpenAI within n8n.\n3. **Import the workflow** into your n8n instance.\n4. **Update any required variables or nodes** in the workflow to point to your specific spreadsheet and API keys.\n5. **Run the workflow** and monitor the results in your Google Sheets.\n#### Support & Contact\nDeveloped by **Marvomatic**\n- [Website](https://marvomatic.com)\n- [TikTok](https://www.tiktok.com/@marvomatic)\n- [YouTube](https://www.youtube.com/@marvomatic)\n\nFor business inquiries, email: [hello@marvomatic.com](mailto:hello@marvomatic.com)",
        "height": 780,
        "width": 1180
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        540,
        400
      ],
      "id": "5ef92013-20dd-4f6a-bc7c-230065b9972e",
      "name": "Sticky Note5"
    },
    {
      "parameters": {
        "jsCode": "// Create an array to hold the cleaned items\nconst cleanedArray = [];\n\n// Loop through all input items\nfor (const item of $input.all()) {\n  // Create a copy of the item's JSON\n  const cleanedItem = {...item.json};\n  \n  // Filter organic results to remove any with youtube.com in the link\n  if (cleanedItem.organic) {\n    cleanedItem.organic = cleanedItem.organic.filter(result => \n      !result.link.includes('youtube.com')\n    );\n    \n    // Also filter any sitelinks that might contain youtube.com\n    for (const result of cleanedItem.organic) {\n      if (result.sitelinks) {\n        result.sitelinks = result.sitelinks.filter(sitelink => \n          !sitelink.link.includes('youtube.com')\n        );\n      }\n    }\n  }\n  \n  // Filter related searches if needed\n  if (cleanedItem.relatedSearches) {\n    cleanedItem.relatedSearches = cleanedItem.relatedSearches.filter(search => \n      !search.query.includes('youtube.com')\n    );\n  }\n  \n  // Add the cleaned item to our array\n  cleanedArray.push(cleanedItem);\n}\n\n// Return the cleaned array\nreturn cleanedArray;"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -920,
        980
      ],
      "id": "6db2c1a6-0b73-447d-b5bc-caf2503a5e3d",
      "name": "clean_results_mobile"
    },
    {
      "parameters": {
        "jsCode": "// Create an array to hold the cleaned items\nconst cleanedArray = [];\n\n// Loop through all input items\nfor (const item of $input.all()) {\n  // Create a copy of the item's JSON\n  const cleanedItem = {...item.json};\n  \n  // Filter organic results to remove any with youtube.com in the link\n  if (cleanedItem.organic) {\n    cleanedItem.organic = cleanedItem.organic.filter(result => \n      !result.link.includes('youtube.com')\n    );\n    \n    // Also filter any sitelinks that might contain youtube.com\n    for (const result of cleanedItem.organic) {\n      if (result.sitelinks) {\n        result.sitelinks = result.sitelinks.filter(sitelink => \n          !sitelink.link.includes('youtube.com')\n        );\n      }\n    }\n  }\n  \n  // Filter related searches if needed\n  if (cleanedItem.relatedSearches) {\n    cleanedItem.relatedSearches = cleanedItem.relatedSearches.filter(search => \n      !search.query.includes('youtube.com')\n    );\n  }\n  \n  // Add the cleaned item to our array\n  cleanedArray.push(cleanedItem);\n}\n\n// Return the cleaned array\nreturn cleanedArray;"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -920,
        1180
      ],
      "id": "a74656ba-5010-47fa-b0af-5d1362ec21c7",
      "name": "clean_results_desktop"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "0e112e59-ad43-4321-9de0-d1d502f98266",
              "name": "related_searches",
              "value": "={{ $json.relatedSearches }}",
              "type": "array"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -680,
        500
      ],
      "id": "80407282-3e1f-4299-acf5-46208a88dc3a",
      "name": "get_related_searches_mobile"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "0e112e59-ad43-4321-9de0-d1d502f98266",
              "name": "related_searches",
              "value": "={{ $json.relatedSearches }}",
              "type": "array"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -680,
        1760
      ],
      "id": "95d4baed-a22f-40d7-aaa8-07f2927cc83f",
      "name": "get_related_searches_desktop"
    },
    {
      "parameters": {
        "maxItems": 3
      },
      "type": "n8n-nodes-base.limit",
      "typeVersion": 1,
      "position": [
        -400,
        1360
      ],
      "id": "7731c85d-1eee-4358-9596-8ec3352dbc6a",
      "name": "top_3_by_mobile"
    },
    {
      "parameters": {
        "maxItems": 3
      },
      "type": "n8n-nodes-base.limit",
      "typeVersion": 1,
      "position": [
        -400,
        1560
      ],
      "id": "46a784cc-9522-449e-8401-9b8624311cca",
      "name": "top_3_by_desktop"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3,
      "position": [
        -180,
        1360
      ],
      "id": "307fc94b-5d8f-489d-933d-68d219625ad2",
      "name": "get_urls_to_crawl"
    },
    {
      "parameters": {
        "fieldToSplitOut": "organic_results",
        "options": {}
      },
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        40,
        1360
      ],
      "id": "0f11d76a-f581-4ca2-9e74-07f2ed377d63",
      "name": "Split Out"
    },
    {
      "parameters": {
        "compare": "selectedFields",
        "fieldsToCompare": "link",
        "options": {}
      },
      "type": "n8n-nodes-base.removeDuplicates",
      "typeVersion": 2,
      "position": [
        260,
        1360
      ],
      "id": "7aa14696-7e34-4f83-a55f-50e3f6de2a7c",
      "name": "Remove Duplicates"
    },
    {
      "parameters": {
        "maxItems": 5
      },
      "type": "n8n-nodes-base.limit",
      "typeVersion": 1,
      "position": [
        500,
        1360
      ],
      "id": "42822b6c-1853-4124-bd48-63926e8c961a",
      "name": "Limit"
    },
    {
      "parameters": {
        "fieldToSplitOut": "link, snippet, position, title",
        "options": {}
      },
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        700,
        1360
      ],
      "id": "c333051f-5237-43c6-a05d-672a600bd5e3",
      "name": "get_links"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "4eec2c04-b519-4c06-a911-bb7780b776b5",
              "name": "title",
              "value": "={{ $json.metadata.title }}",
              "type": "string"
            },
            {
              "id": "0eac8d67-34d9-4809-92fc-69f47381e104",
              "name": "description",
              "value": "={{ $json.metadata.description }}",
              "type": "string"
            },
            {
              "id": "58b74b11-74f8-42e3-b68f-a2aa4c380578",
              "name": "url",
              "value": "={{ $json.metadata['og:url']}}",
              "type": "string"
            },
            {
              "id": "f57680c0-48ed-492f-a1d9-508a0c996198",
              "name": "content",
              "value": "={{ $json.markdown }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        800,
        1580
      ],
      "id": "9c18cb01-e226-48d9-beb9-fa0cdc02ae29",
      "name": "get_metadata"
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1Wdynwg7WmGldyWOd8r-mf9VjnCHJQtHosxJskNLfb2A",
          "mode": "list",
          "cachedResultName": "SERP Analysis (Serper)",
          "cachedResultUrl": ""
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "SERP Analysis",
          "cachedResultUrl": ""
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "position": "={{ $('Loop Over Items').item.json.position }}",
            "title": "={{ $('Loop Over Items').item.json.title }}",
            "link": "={{ $('Loop Over Items').item.json.link }}",
            "snippet": "={{ $('Loop Over Items').item.json.snippet }}",
            "potential_focus_keyword": "={{ $json.message.content.potential_focus_keyword ?  $json.message.content.potential_focus_keyword: \"\" }}",
            "unigrams": "={{ $json.message.content.n_gram_analysis.unigrams ?  $json.message.content.n_gram_analysis.unigrams: \"\" }}",
            "relevant_long_tail_keywords": "={{ $json.message.content.relevant_long_tail_keywords ?  $json.message.content.relevant_long_tail_keywords: \"\" }}",
            "bigrams": "={{ $json.message.content.n_gram_analysis.bigrams ?  $json.message.content.n_gram_analysis.bigrams: \"\" }}",
            "trigrams": "={{ $json.message.content.n_gram_analysis.trigrams ?  $json.message.content.n_gram_analysis.trigrams: \"\" }}",
            "short_summary": "={{ $json.message.content.short_summary ?  $json.message.content.short_summary: \"\" }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "position",
              "displayName": "position",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "title",
              "displayName": "title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "link",
              "displayName": "link",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "snippet",
              "displayName": "snippet",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "short_summary",
              "displayName": "short_summary",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "potential_focus_keyword",
              "displayName": "potential_focus_keyword",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "relevant_long_tail_keywords",
              "displayName": "relevant_long_tail_keywords",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "unigrams",
              "displayName": "unigrams",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "bigrams",
              "displayName": "bigrams",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "trigrams",
              "displayName": "trigrams",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        1460,
        1580
      ],
      "id": "6c9c8793-2d05-4897-b7c5-3f2a8c31e2bf",
      "name": "insert_serp_analysis",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "oYP1Bc15GY7emvD3",
          "name": "Google Sheets account"
        }
      }
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        1120,
        1360
      ],
      "id": "ddab64b7-027e-4ed9-b5d2-3c5cd08aa7f7",
      "name": "Loop Over Items"
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "gpt-4o-mini",
          "mode": "list",
          "cachedResultName": "GPT-4O-MINI"
        },
        "messages": {
          "values": [
            {
              "content": "You are a SEO-specialist and your task is to analyze the articles from our competitors. The ultimate goal is to write an article that is better than the competitors article. Apart from that, you are familiar with markdown and you are able to extract only relevant content.",
              "role": "system"
            },
            {
              "content": "=Your task is to analyze the following <article> =  {{ $json.content }} and provide me the following information:\n- Short Summary\n- Potential Focus Keyword\n- Relevant long-tail keywords\n- N-Gram-Analysis\n"
            }
          ]
        },
        "jsonOutput": true,
        "options": {
          "temperature": 0
        }
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.8,
      "position": [
        1140,
        1580
      ],
      "id": "09bf9148-59a2-4a15-ba1e-b93a04e366a6",
      "name": "Analyze Content",
      "credentials": {
        "openAiApi": {
          "id": "RAj3VxCHt0rIwBTk",
          "name": "OpenAI"
        }
      }
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3,
      "position": [
        -420,
        500
      ],
      "id": "3770a01b-51c7-4799-a4dc-bccd53c36f76",
      "name": "merge_related_searches"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3,
      "position": [
        -400,
        900
      ],
      "id": "2833526f-c8e7-4962-9404-1c88d589d030",
      "name": "merge_faqs"
    },
    {
      "parameters": {
        "compare": "selectedFields",
        "fieldsToCompare": "query",
        "options": {}
      },
      "type": "n8n-nodes-base.removeDuplicates",
      "typeVersion": 2,
      "position": [
        20,
        500
      ],
      "id": "c0f3b915-532f-4c2d-8e50-33bc5b3cc44c",
      "name": "remove_duplicates_in_related_searches"
    },
    {
      "parameters": {
        "compare": "selectedFields",
        "fieldsToCompare": "faqs",
        "options": {}
      },
      "type": "n8n-nodes-base.removeDuplicates",
      "typeVersion": 2,
      "position": [
        40,
        900
      ],
      "id": "60b88dd3-d1af-451d-8eca-e244f6fdc38e",
      "name": "removed_duplicates_in_faqs"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://scrape.serper.dev",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "url",
              "value": "={{ $json.link }}"
            },
            {
              "name": "includeMarkdown",
              "value": "true"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        580,
        1580
      ],
      "id": "d3de725a-c32d-44e3-9925-b97aa291689e",
      "name": "scrape_url",
      "credentials": {
        "httpHeaderAuth": {
          "id": "9PtnIrGtPxKAKD1J",
          "name": "Serper Demo"
        }
      }
    }
  ],
  "pinData": {},
  "connections": {
    "On form submission": {
      "main": [
        [
          {
            "node": "get_mobile_serp_results",
            "type": "main",
            "index": 0
          },
          {
            "node": "get_desktop_serp_results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_mobile_serp_results": {
      "main": [
        [
          {
            "node": "clean_results_mobile",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_questions": {
      "main": [
        [
          {
            "node": "removed_duplicates_in_faqs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_desktop_serp_results": {
      "main": [
        [
          {
            "node": "clean_results_desktop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_queries": {
      "main": [
        [
          {
            "node": "remove_duplicates_in_related_searches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_faq_mobile": {
      "main": [
        [
          {
            "node": "merge_faqs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_organic_results_mobile": {
      "main": [
        [
          {
            "node": "top_3_by_mobile",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_organic_results_desktop": {
      "main": [
        [
          {
            "node": "top_3_by_desktop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_faq_desktop": {
      "main": [
        [
          {
            "node": "merge_faqs",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "clean_results_mobile": {
      "main": [
        [
          {
            "node": "get_related_searches_mobile",
            "type": "main",
            "index": 0
          },
          {
            "node": "get_organic_results_mobile",
            "type": "main",
            "index": 0
          },
          {
            "node": "get_faq_mobile",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "clean_results_desktop": {
      "main": [
        [
          {
            "node": "get_organic_results_desktop",
            "type": "main",
            "index": 0
          },
          {
            "node": "get_faq_desktop",
            "type": "main",
            "index": 0
          },
          {
            "node": "get_related_searches_desktop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_related_searches_mobile": {
      "main": [
        [
          {
            "node": "merge_related_searches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_related_searches_desktop": {
      "main": [
        [
          {
            "node": "merge_related_searches",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "top_3_by_mobile": {
      "main": [
        [
          {
            "node": "get_urls_to_crawl",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "top_3_by_desktop": {
      "main": [
        [
          {
            "node": "get_urls_to_crawl",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "get_urls_to_crawl": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Remove Duplicates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Remove Duplicates": {
      "main": [
        [
          {
            "node": "Limit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit": {
      "main": [
        [
          {
            "node": "get_links",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_links": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_metadata": {
      "main": [
        [
          {
            "node": "Analyze Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "insert_serp_analysis": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "scrape_url",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze Content": {
      "main": [
        [
          {
            "node": "insert_serp_analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "merge_related_searches": {
      "main": [
        [
          {
            "node": "get_queries",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "merge_faqs": {
      "main": [
        [
          {
            "node": "get_questions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "remove_duplicates_in_related_searches": {
      "main": [
        [
          {
            "node": "insert_related_searches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "removed_duplicates_in_faqs": {
      "main": [
        [
          {
            "node": "insert_faqs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "scrape_url": {
      "main": [
        [
          {
            "node": "get_metadata",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "906cd459-23f1-4cad-bd4e-0c2e68b0c01d",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "558d88703fb65b2d0e44613bc35916258b0f0bf983c5d4730c00c424b77ca36a"
  },
  "id": "GC4Ynw42APmu86h8",
  "tags": [
    {
      "createdAt": "2025-03-02T12:05:53.836Z",
      "updatedAt": "2025-03-02T12:05:53.836Z",
      "id": "utwtHTzeqUdktrxJ",
      "name": "SEO"
    },
    {
      "createdAt": "2025-03-29T14:05:42.024Z",
      "updatedAt": "2025-03-29T14:05:42.024Z",
      "id": "FTx17qhhXpcrm35X",
      "name": "Template"
    }
  ]
}
```


Prompt: Design a workflow using @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.memoryBufferWindow, @n8n/n8n-nodes-langchain.lmChatAnthropic to auto tag blog posts

Response:
# Workflow Architecture

**Purpose**: AI & LLM + Data Processing + Database

**Key Components**:
- Total Nodes: 12
- Node Types: @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.memoryBufferWindow, @n8n/n8n-nodes-langchain.lmChatAnthropic, n8n-nodes-base.slack, @n8n/n8n-nodes-langchain.embeddingsOpenAi, @n8n/n8n-nodes-langchain.vectorStoreSupabase, @n8n/n8n-nodes-langchain.textSplitterCharacterTextSplitter, @n8n/n8n-nodes-langchain.toolVectorStore, n8n-nodes-base.webhook, n8n-nodes-base.stickyNote

**Logic Flow**:

## Complete Workflow JSON

```json
{
  "name": "Auto-tag Blog Posts",
  "nodes": [
    {
      "parameters": {
        "content": "Placeholder for Auto-tag Blog Posts",
        "height": 530,
        "width": 1100,
        "color": 5
      },
      "id": "84e22aae-0a0b-4bc9-94d9-aec2d9a07826",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -480,
        -240
      ]
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "auto-tag-blog-posts"
      },
      "id": "e83f725c-c083-4c9d-9623-d9c092bbad2a",
      "name": "Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        -300,
        0
      ]
    },
    {
      "parameters": {
        "chunkSize": 400,
        "chunkOverlap": 40
      },
      "id": "95ca42a5-e984-4245-b770-ef64b6495ec9",
      "name": "Text Splitter",
      "type": "@n8n/n8n-nodes-langchain.textSplitterCharacterTextSplitter",
      "typeVersion": 1,
      "position": [
        -130,
        0
      ]
    },
    {
      "parameters": {
        "model": "text-embedding-3-small",
        "options": {}
      },
      "id": "e515e8bb-c532-4428-a593-29f5d71ba000",
      "name": "Embeddings",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "typeVersion": 1,
      "position": [
        70,
        0
      ],
      "credentials": {
        "openAiApi": {
          "id": "OPENAI_API",
          "name": "OpenAI"
        }
      }
    },
    {
      "parameters": {
        "mode": "insert",
        "options": {},
        "indexName": "auto-tag_blog_posts"
      },
      "id": "1aa98ca1-c389-4a1a-8f0c-58fcc64e08b4",
      "name": "Supabase Insert",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
      "typeVersion": 1,
      "position": [
        270,
        0
      ],
      "credentials": {
        "supabaseApi": {
          "id": "SUPABASE_API",
          "name": "Supabase account"
        }
      }
    },
    {
      "parameters": {
        "indexName": "auto-tag_blog_posts"
      },
      "id": "53510366-3cdd-40ec-a22b-d344bbbe434f",
      "name": "Supabase Query",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
      "typeVersion": 1,
      "position": [
        270,
        -180
      ],
      "credentials": {
        "supabaseApi": {
          "id": "SUPABASE_API",
          "name": "Supabase account"
        }
      }
    },
    {
      "parameters": {
        "name": "Supabase",
        "description": "Vector context"
      },
      "id": "1693f5ae-6022-4fea-8e94-ebd59d4cbd31",
      "name": "Vector Tool",
      "type": "@n8n/n8n-nodes-langchain.toolVectorStore",
      "typeVersion": 1,
      "position": [
        450,
        -180
      ]
    },
    {
      "parameters": {},
      "id": "fff55186-78c9-4196-829c-0416c8c7d547",
      "name": "Window Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        450,
        -40
      ]
    },
    {
      "parameters": {
        "options": {}
      },
      "id": "ddbd622f-6ec7-499d-a48d-613db67e5f2b",
      "name": "Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "typeVersion": 1,
      "position": [
        450,
        -340
      ],
      "credentials": {
        "anthropicApi": {
          "id": "ANTHROPIC_API",
          "name": "Anthropic"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "Handle data",
        "options": {
          "systemMessage": "You are an assistant for Auto-tag Blog Posts"
        }
      },
      "id": "b12856e2-bed9-41ff-bdbd-4b4a2fd98aa2",
      "name": "RAG Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1,
      "position": [
        720,
        -40
      ]
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "SHEET_ID",
          "mode": "list",
          "cachedResultName": "Auto-tag Blog Posts"
        },
        "sheetName": {
          "__rl": true,
          "value": "Log",
          "mode": "list",
          "cachedResultName": "Log"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": "Status",
          "schema": []
        }
      },
      "id": "a8f14a3c-3865-4097-b1ee-0265ac6ffa47",
      "name": "Append Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4,
      "position": [
        930,
        -40
      ],
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "SHEETS_API",
          "name": "Google Sheets account"
        }
      }
    },
    {
      "parameters": {
        "channel": "#alerts",
        "text": "Auto-tag Blog Posts error: {$json.error.message}"
      },
      "id": "54b60e92-3672-4042-94c7-df1b6d28c221",
      "name": "Slack Alert",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 1,
      "position": [
        930,
        120
      ],
      "credentials": {
        "slackApi": {
          "id": "SLACK_API",
          "name": "Slack"
        }
      }
    }
  ],
  "connections": {
    "Webhook Trigger": {
      "main": [
        [
          {
            "node": "Text Splitter",
            "type": "main",
            "index": 0
          },
          {
            "node": "Window Memory",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Text Splitter": {
      "main": [
        [
          {
            "node": "Embeddings",
            "type": "main",
            "index": 0
          }
        ]
      ],
      "ai_textSplitter": [
        [
          {
            "node": "Supabase Insert",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings": {
      "ai_embedding": [
        [
          {
            "node": "Supabase Insert",
            "type": "ai_embedding",
            "index": 0
          },
          {
            "node": "Supabase Query",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Supabase Insert": {
      "ai_document": [
        []
      ]
    },
    "Supabase Query": {
      "ai_vectorStore": [
        [
          {
            "node": "Vector Tool",
            "type": "ai_vectorStore",
            "index": 0
          }
        ]
      ]
    },
    "Vector Tool": {
      "ai_tool": [
        [
          {
            "node": "RAG Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Window Memory": {
      "ai_memory": [
        [
          {
            "node": "RAG Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "RAG Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "RAG Agent": {
      "main": [
        [
          {
            "node": "Append Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ],
      "onError": [
        [
          {
            "node": "Slack Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "triggerCount": 1
}
```


Prompt: Design a workflow using @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.memoryBufferWindow, @n8n/n8n-nodes-langchain.lmChatAnthropic to customer sentiment analysis

Response:
# Workflow Architecture

**Purpose**: AI & LLM + Data Processing

**Key Components**:
- Total Nodes: 12
- Node Types: @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.memoryBufferWindow, @n8n/n8n-nodes-langchain.lmChatAnthropic, @n8n/n8n-nodes-langchain.embeddingsCohere, n8n-nodes-base.slack, @n8n/n8n-nodes-langchain.textSplitterCharacterTextSplitter, @n8n/n8n-nodes-langchain.toolVectorStore, n8n-nodes-base.webhook, n8n-nodes-base.stickyNote, @n8n/n8n-nodes-langchain.vectorStorePinecone

**Logic Flow**:

## Complete Workflow JSON

```json
{
  "name": "Customer Sentiment Analysis",
  "nodes": [
    {
      "parameters": {
        "content": "Placeholder for Customer Sentiment Analysis",
        "height": 530,
        "width": 1100,
        "color": 5
      },
      "id": "9432cbf3-839c-415b-bbad-164cacd8f761",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -480,
        -240
      ]
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "customer-sentiment-analysis"
      },
      "id": "deec2c7d-52f6-41d1-b6c9-f2f68cc2db9e",
      "name": "Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        -300,
        0
      ]
    },
    {
      "parameters": {
        "chunkSize": 400,
        "chunkOverlap": 40
      },
      "id": "c999cc42-bc54-402b-8a6d-e8c924c27332",
      "name": "Text Splitter",
      "type": "@n8n/n8n-nodes-langchain.textSplitterCharacterTextSplitter",
      "typeVersion": 1,
      "position": [
        -130,
        0
      ]
    },
    {
      "parameters": {
        "model": "embed-english-v3.0",
        "options": {}
      },
      "id": "9c230e35-adf4-49a7-a98e-c13dfa1c4e3d",
      "name": "Embeddings",
      "type": "@n8n/n8n-nodes-langchain.embeddingsCohere",
      "typeVersion": 1,
      "position": [
        70,
        0
      ],
      "credentials": {
        "cohereApi": {
          "id": "COHERE_API",
          "name": "Cohere"
        }
      }
    },
    {
      "parameters": {
        "mode": "insert",
        "options": {},
        "pineconeIndex": {
          "__rl": true,
          "value": "customer_sentiment_analysis",
          "mode": "list",
          "cachedResultName": "customer_sentiment_analysis"
        }
      },
      "id": "4b1cbbe7-ae91-4cbc-9b7d-106e8def867f",
      "name": "Pinecone Insert",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "typeVersion": 1,
      "position": [
        270,
        0
      ],
      "credentials": {
        "pineconeApi": {
          "id": "PINECONE_API",
          "name": "Pinecone account"
        }
      }
    },
    {
      "parameters": {
        "pineconeIndex": {
          "__rl": true,
          "value": "customer_sentiment_analysis",
          "mode": "list",
          "cachedResultName": "customer_sentiment_analysis"
        }
      },
      "id": "2051fbc6-2275-4529-bcc4-7ef84d05beed",
      "name": "Pinecone Query",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "typeVersion": 1,
      "position": [
        270,
        -180
      ],
      "credentials": {
        "pineconeApi": {
          "id": "PINECONE_API",
          "name": "Pinecone account"
        }
      }
    },
    {
      "parameters": {
        "name": "Pinecone",
        "description": "Vector context"
      },
      "id": "24603a00-5522-415e-b4c8-d80889678355",
      "name": "Vector Tool",
      "type": "@n8n/n8n-nodes-langchain.toolVectorStore",
      "typeVersion": 1,
      "position": [
        450,
        -180
      ]
    },
    {
      "parameters": {},
      "id": "e22fb094-3cc2-492f-95f7-608b93e89409",
      "name": "Window Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        450,
        -40
      ]
    },
    {
      "parameters": {
        "options": {}
      },
      "id": "3116ece9-b801-47f1-82fb-192574cedea1",
      "name": "Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "typeVersion": 1,
      "position": [
        450,
        -340
      ],
      "credentials": {
        "anthropicApi": {
          "id": "ANTHROPIC_API",
          "name": "Anthropic"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "Handle data",
        "options": {
          "systemMessage": "You are an assistant for Customer Sentiment Analysis"
        }
      },
      "id": "f94f99f3-4f7b-49d4-8432-b156ca31d831",
      "name": "RAG Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1,
      "position": [
        720,
        -40
      ]
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "SHEET_ID",
          "mode": "list",
          "cachedResultName": "Customer Sentiment Analysis"
        },
        "sheetName": {
          "__rl": true,
          "value": "Log",
          "mode": "list",
          "cachedResultName": "Log"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": "Status",
          "schema": []
        }
      },
      "id": "50ab5f32-d0a4-49e3-a3e3-a896b94ec7a0",
      "name": "Append Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4,
      "position": [
        930,
        -40
      ],
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "SHEETS_API",
          "name": "Google Sheets account"
        }
      }
    },
    {
      "parameters": {
        "channel": "#alerts",
        "text": "Customer Sentiment Analysis error: {$json.error.message}"
      },
      "id": "59c37726-aac9-49be-a899-ed4dc6563e33",
      "name": "Slack Alert",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 1,
      "position": [
        930,
        120
      ],
      "credentials": {
        "slackApi": {
          "id": "SLACK_API",
          "name": "Slack"
        }
      }
    }
  ],
  "connections": {
    "Webhook Trigger": {
      "main": [
        [
          {
            "node": "Text Splitter",
            "type": "main",
            "index": 0
          },
          {
            "node": "Window Memory",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Text Splitter": {
      "main": [
        [
          {
            "node": "Embeddings",
            "type": "main",
            "index": 0
          }
        ]
      ],
      "ai_textSplitter": [
        [
          {
            "node": "Pinecone Insert",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings": {
      "ai_embedding": [
        [
          {
            "node": "Pinecone Insert",
            "type": "ai_embedding",
            "index": 0
          },
          {
            "node": "Pinecone Query",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Pinecone Insert": {
      "ai_document": [
        []
      ]
    },
    "Pinecone Query": {
      "ai_vectorStore": [
        [
          {
            "node": "Vector Tool",
            "type": "ai_vectorStore",
            "index": 0
          }
        ]
      ]
    },
    "Vector Tool": {
      "ai_tool": [
        [
          {
            "node": "RAG Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Window Memory": {
      "ai_memory": [
        [
          {
            "node": "RAG Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "RAG Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "RAG Agent": {
      "main": [
        [
          {
            "node": "Append Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ],
      "onError": [
        [
          {
            "node": "Slack Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "triggerCount": 1
}
```


Prompt: How would you build: Daily Content Ideas?

Response:
# Workflow Architecture

**Purpose**: Data Processing + Database

**Key Components**:
- Total Nodes: 12
- Node Types: @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.memoryBufferWindow, @n8n/n8n-nodes-langchain.lmChatOpenAi, @n8n/n8n-nodes-langchain.embeddingsCohere, n8n-nodes-base.slack, @n8n/n8n-nodes-langchain.vectorStoreSupabase, @n8n/n8n-nodes-langchain.textSplitterCharacterTextSplitter, @n8n/n8n-nodes-langchain.toolVectorStore, n8n-nodes-base.webhook, n8n-nodes-base.stickyNote

**Logic Flow**:

## Complete Workflow JSON

```json
{
  "name": "Daily Content Ideas",
  "nodes": [
    {
      "parameters": {
        "content": "Placeholder for Daily Content Ideas",
        "height": 530,
        "width": 1100,
        "color": 5
      },
      "id": "ca5f06fc-6dec-4477-bce5-e79c88a25e7d",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -480,
        -240
      ]
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "daily-content-ideas"
      },
      "id": "07884fea-1b21-4c07-9cc1-0f8c9546154d",
      "name": "Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        -300,
        0
      ]
    },
    {
      "parameters": {
        "chunkSize": 400,
        "chunkOverlap": 40
      },
      "id": "cddbaad6-33bf-4933-8a99-018c63325ad8",
      "name": "Text Splitter",
      "type": "@n8n/n8n-nodes-langchain.textSplitterCharacterTextSplitter",
      "typeVersion": 1,
      "position": [
        -130,
        0
      ]
    },
    {
      "parameters": {
        "model": "embed-english-v3.0",
        "options": {}
      },
      "id": "ba875ce2-e150-47e1-8036-72573e1e142d",
      "name": "Embeddings",
      "type": "@n8n/n8n-nodes-langchain.embeddingsCohere",
      "typeVersion": 1,
      "position": [
        70,
        0
      ],
      "credentials": {
        "cohereApi": {
          "id": "COHERE_API",
          "name": "Cohere"
        }
      }
    },
    {
      "parameters": {
        "mode": "insert",
        "options": {},
        "indexName": "daily_content_ideas"
      },
      "id": "5b7779c8-04ec-41ab-abf5-4f2a2d8405fd",
      "name": "Supabase Insert",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
      "typeVersion": 1,
      "position": [
        270,
        0
      ],
      "credentials": {
        "supabaseApi": {
          "id": "SUPABASE_API",
          "name": "Supabase account"
        }
      }
    },
    {
      "parameters": {
        "indexName": "daily_content_ideas"
      },
      "id": "9a6dab96-b119-484f-aa5f-6a50b470fecd",
      "name": "Supabase Query",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
      "typeVersion": 1,
      "position": [
        270,
        -180
      ],
      "credentials": {
        "supabaseApi": {
          "id": "SUPABASE_API",
          "name": "Supabase account"
        }
      }
    },
    {
      "parameters": {
        "name": "Supabase",
        "description": "Vector context"
      },
      "id": "9c83b97b-8ffc-4739-b045-27c982cae0dd",
      "name": "Vector Tool",
      "type": "@n8n/n8n-nodes-langchain.toolVectorStore",
      "typeVersion": 1,
      "position": [
        450,
        -180
      ]
    },
    {
      "parameters": {},
      "id": "c38b7694-050b-4e8d-97cd-876b30fcccab",
      "name": "Window Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        450,
        -40
      ]
    },
    {
      "parameters": {
        "options": {}
      },
      "id": "1b3d208d-2707-4bda-a5da-de6b5b52e811",
      "name": "Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1,
      "position": [
        450,
        -340
      ],
      "credentials": {
        "openAiApi": {
          "id": "OPENAI_API",
          "name": "OpenAI"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "Handle data",
        "options": {
          "systemMessage": "You are an assistant for Daily Content Ideas"
        }
      },
      "id": "f10af89a-34ee-416a-9e15-b4e44eb9a6ba",
      "name": "RAG Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1,
      "position": [
        720,
        -40
      ]
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "SHEET_ID",
          "mode": "list",
          "cachedResultName": "Daily Content Ideas"
        },
        "sheetName": {
          "__rl": true,
          "value": "Log",
          "mode": "list",
          "cachedResultName": "Log"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": "Status",
          "schema": []
        }
      },
      "id": "05153aa5-3e62-4cde-a050-7bfba1ac9895",
      "name": "Append Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4,
      "position": [
        930,
        -40
      ],
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "SHEETS_API",
          "name": "Google Sheets account"
        }
      }
    },
    {
      "parameters": {
        "channel": "#alerts",
        "text": "Daily Content Ideas error: {$json.error.message}"
      },
      "id": "4838e13d-2475-4bb1-9c74-bde4b5d4123a",
      "name": "Slack Alert",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 1,
      "position": [
        930,
        120
      ],
      "credentials": {
        "slackApi": {
          "id": "SLACK_API",
          "name": "Slack"
        }
      }
    }
  ],
  "connections": {
    "Webhook Trigger": {
      "main": [
        [
          {
            "node": "Text Splitter",
            "type": "main",
            "index": 0
          },
          {
            "node": "Window Memory",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Text Splitter": {
      "main": [
        [
          {
            "node": "Embeddings",
            "type": "main",
            "index": 0
          }
        ]
      ],
      "ai_textSplitter": [
        [
          {
            "node": "Supabase Insert",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings": {
      "ai_embedding": [
        [
          {
            "node": "Supabase Insert",
            "type": "ai_embedding",
            "index": 0
          },
          {
            "node": "Supabase Query",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Supabase Insert": {
      "ai_document": [
        []
      ]
    },
    "Supabase Query": {
      "ai_vectorStore": [
        [
          {
            "node": "Vector Tool",
            "type": "ai_vectorStore",
            "index": 0
          }
        ]
      ]
    },
    "Vector Tool": {
      "ai_tool": [
        [
          {
            "node": "RAG Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Window Memory": {
      "ai_memory": [
        [
          {
            "node": "RAG Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "RAG Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "RAG Agent": {
      "main": [
        [
          {
            "node": "Append Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ],
      "onError": [
        [
          {
            "node": "Slack Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "triggerCount": 1
}
```