AutomationFlowsAI & RAG › Search & Enrich: Smart Keyword Analysis with Decodo + Openai Gpt-4.1-mini

Search & Enrich: Smart Keyword Analysis with Decodo + Openai Gpt-4.1-mini

ByRanjan Dailata @ranjancse on n8n.io

Please note - This workflow is only available on n8n self-hosted as it's making use of the community node for the Decodo Web Scraping

Event trigger★★★★☆ complexityAI-powered17 nodesRead Write File@Decodo/N8N Nodes DecodoInformation ExtractorOpenAI ChatData Table
AI & RAG Trigger: Event Nodes: 17 Complexity: ★★★★☆ AI nodes: yes Added:
Search & Enrich: Smart Keyword Analysis with Decodo + Openai Gpt-4.1-mini — n8n workflow card showing Read Write File, @Decodo/N8N Nodes Decodo, Information Extractor integration

This workflow corresponds to n8n.io template #10648 — we link there as the canonical source.

This workflow follows the Datatable → OpenAI Chat recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "69iHvBqP5ykJDmMJ",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Search & Enrich: Smart Keyword Analysis with Decodo + OpenAI GPT-4.1-mini",
  "tags": [
    {
      "id": "Kujft2FOjmOVQAmJ",
      "name": "Engineering",
      "createdAt": "2025-04-09T01:31:00.558Z",
      "updatedAt": "2025-04-09T01:31:00.558Z"
    },
    {
      "id": "ZOwtAMLepQaGW76t",
      "name": "Building Blocks",
      "createdAt": "2025-04-13T15:23:40.462Z",
      "updatedAt": "2025-04-13T15:23:40.462Z"
    },
    {
      "id": "ddPkw7Hg5dZhQu2w",
      "name": "AI",
      "createdAt": "2025-04-13T05:38:08.053Z",
      "updatedAt": "2025-04-13T05:38:08.053Z"
    },
    {
      "id": "qpxJxOMCv2x7Op5c",
      "name": "SERP",
      "createdAt": "2025-04-03T15:37:19.686Z",
      "updatedAt": "2025-04-03T15:37:19.686Z"
    }
  ],
  "nodes": [
    {
      "id": "33ddc711-0e05-4b9e-bb38-935a720362fb",
      "name": "When clicking \u2018Execute workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -560,
        0
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "3ce843c8-d6e5-4f11-b8c7-2e2f566adc85",
      "name": "Set the Input Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        -336,
        0
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "270b22f2-4b71-4379-a847-2bf0ea0a3398",
              "name": "search_query",
              "type": "string",
              "value": "Pizza"
            },
            {
              "id": "ef5e40f9-7e5d-4e86-b3d4-2742c216498f",
              "name": "geo",
              "type": "string",
              "value": "India"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "3dc5d5a9-5918-4eea-86d3-1051dec80158",
      "name": "Create a Binary Response",
      "type": "n8n-nodes-base.function",
      "position": [
        368,
        -480
      ],
      "parameters": {
        "functionCode": "\n\nitems[0].binary = {\n  data: {\n    data: new Buffer(JSON.stringify(items[0].json, null, 2)).toString('base64')\n  }\n};\nreturn items;"
      },
      "typeVersion": 1
    },
    {
      "id": "1b0346e6-cf8b-4d7c-9fcb-bb75665a0b2a",
      "name": "Write the Structured Google Search Results to Disk",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        544,
        -480
      ],
      "parameters": {
        "options": {},
        "fileName": "=C:\\\\{{ $('Set the Input Fields').item.json.search_query }}.json",
        "operation": "write"
      },
      "typeVersion": 1
    },
    {
      "id": "c672ab3b-8227-4d8c-b62a-9aa27dc506a2",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        288,
        -576
      ],
      "parameters": {
        "color": 7,
        "width": 448,
        "height": 272,
        "content": "## 2. Export Data Handling\n\nExport the results to disk"
      },
      "typeVersion": 1
    },
    {
      "id": "4ac6838e-4783-4c46-a555-388278e262bb",
      "name": "Google Search with Decodo",
      "type": "@decodo/n8n-nodes-decodo.decodo",
      "position": [
        -112,
        0
      ],
      "parameters": {
        "geo": "={{ $json.geo }}",
        "query": "={{ $json.search_query }}",
        "locale": "en",
        "headless": false,
        "markdown": true,
        "operation": "google_search"
      },
      "credentials": {
        "decodoApi": {
          "name": "<your credential>"
        }
      },
      "retryOnFail": true,
      "typeVersion": 1
    },
    {
      "id": "359c9df3-d94c-4e0d-8607-7f58ce240a4d",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        368,
        0
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "7a9d0f82-f494-41b9-a40b-eb0b4dfa6c93",
      "name": "Extract Keywords and Topics",
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "position": [
        624,
        16
      ],
      "parameters": {
        "text": "=Extract keywords and topics of the following content \n\nDescription -  {{ $json.desc }}",
        "options": {},
        "schemaType": "manual",
        "inputSchema": "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"keywords\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"items\": {\n\t\t\t\t\"type\": \"string\"\n\t\t\t}\n\t\t},\n       \"topics\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"items\": {\n\t\t\t\t\"type\": \"string\"\n\t\t\t}\n\t\t}\n\t}\n}"
      },
      "retryOnFail": true,
      "typeVersion": 1.2
    },
    {
      "id": "c8251421-a218-4d3b-8c5a-9806b53db3ff",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        288,
        -240
      ],
      "parameters": {
        "color": 7,
        "width": 1200,
        "height": 592,
        "content": "## 3. Data Enrichment\n\nEnrich data with OpenAI gpt-4.1-mini. Perform keyword and topic analysis.\n\n- Loop through the organic search result\n- Extract the keywords and topics by description using OpenAI gpt-4.1-mini\n- Check if the Data Table Row Exists of not based on the url\n- If Row doesn't exist, then insert into the Data Table \n- Continue with the Loop until it's done"
      },
      "typeVersion": 1
    },
    {
      "id": "f6955e87-afa3-4640-bf57-2e07446aefb2",
      "name": "OpenAI Chat Model for Keywords and Topics",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        608,
        192
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "2f1198bf-8b84-42d5-af02-6c293fc40beb",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -208,
        -112
      ],
      "parameters": {
        "color": 7,
        "width": 288,
        "height": 320,
        "content": "## 1. Decodo\n\nPerform Google Search by Geo location using Decode"
      },
      "typeVersion": 1
    },
    {
      "id": "4335af23-a981-4858-8711-0e293d38f2a9",
      "name": "Return the Organic Search Results",
      "type": "n8n-nodes-base.code",
      "position": [
        128,
        0
      ],
      "parameters": {
        "jsCode": "return $input.first().json.results[0].content.results.results.organic"
      },
      "typeVersion": 2
    },
    {
      "id": "17ff3746-4c7f-453e-a896-01fd995de352",
      "name": "Insert row on Data Table",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        1328,
        16
      ],
      "parameters": {
        "columns": {
          "value": {
            "url": "={{ $('Loop Over Items').item.json.url }}",
            "topics": "={{ $('Extract Keywords and Topics').item.json.output.topics.toJsonString() }}",
            "keywords": "={{ $('Extract Keywords and Topics').item.json.output.keywords.toJsonString() }}"
          },
          "schema": [
            {
              "id": "url",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "url",
              "defaultMatch": false
            },
            {
              "id": "keywords",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "keywords",
              "defaultMatch": false
            },
            {
              "id": "topics",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "topics",
              "defaultMatch": false
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "gS0296vS5ZsPTcYJ",
          "cachedResultUrl": "/projects/OFZrD6piltNz73Y6/datatables/gS0296vS5ZsPTcYJ",
          "cachedResultName": "DecodoGoogleSearchResults"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "01d3ecff-d74c-45a8-9fe4-18e725e4dec1",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1376,
        -736
      ],
      "parameters": {
        "color": 5,
        "width": 720,
        "height": 1360,
        "content": "![Logo](https://cdn.brandfetch.io/idIeG9_eXK/w/100/h/100/theme/dark/icon.jpeg?c=1bxid64Mup7aczewSAYMX&t=1756483136894)\n\n## How It works\n\nThis workflow automates **keyword and topic extraction** from Google Search results using **Decodo\u2019s scraping engine** and **OpenAI GPT-4.1-mini** for semantic analysis.  \n\n- **Trigger & Inputs** \u2013 Start manually. Define your `search_query` (e.g., \u201cPizza\u201d) and `geo` (e.g., \u201cIndia\u201d) in the **Set node**.  \n-  **Perform Google Search** \u2013 Decodo\u2019s API scrapes real-time organic results based on your query and region.  \n-  **Extract Organic Data** \u2013 The workflow pulls titles, URLs, and descriptions for each result.  \n-  **AI Keyword & Topic Analysis** \u2013 OpenAI GPT-4.1-mini processes each description to extract **keywords** and **topics**.  \n-  **Data Validation** \u2013 The workflow checks if the URL already exists in the Data Table to prevent duplicates.  \n-  **Data Storage** \u2013 Saves enriched data (URL, keywords, topics) to an **n8n Data Table** and raw JSON output to disk.  \n\n**Output:** A structured dataset of URLs and AI-enriched keyword insights for SEO, content planning, and topic mapping.\n\n## Setup\n\n*  [ ]  Import the Workflow\n- Import this JSON template into n8n.  \n- Connect your credentials:\n  - `Decodo API` \u2192 for Google Search data scraping.  \n  - `OpenAI API` \u2192 for keyword extraction and topic enrichment.  \n\n\n*  [ ] Define Input Parameters\n- Update the **Set node** with:\n  - `search_query` \u2192 the keyword or phrase to analyze.  \n  - `geo` \u2192 target region (e.g., \u201cIndia\u201d).  \n\n\n*  [ ] Verify Output\n- The **n8n Data Table** (`DecodoGoogleSearchResults`) stores all enriched entries.  \n- A structured JSON file is also written to disk for offline use.  \n\n\n*  [ ] Execute\n- Click **Execute Workflow** to start the search and enrichment pipeline.\n\n## Customize\n\n- **Use Different AI Models**  \n  Swap `gpt-4.1-mini` with `gemini-1.5-pro`, `claude-3-opus`, or `mistral-large` for varied reasoning or performance.  \n\n- **Export to Google Sheets or DB**  \n  Replace the Data Table node with a **Google Sheets**, **Airtable**, or **MySQL** node for dynamic storage.  \n\n- **Automate Alerts**  \n  Add a **Slack**, **Discord**, or **Email** node to send alerts when new high-value keywords and topics are detected.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "8b3fbc55-ec14-495a-9394-51031b9efced",
      "name": "If row exists",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        944,
        0
      ],
      "parameters": {
        "filters": {
          "conditions": [
            {
              "keyName": "url",
              "keyValue": "={{ $('Loop Over Items').item.json.url }}"
            }
          ]
        },
        "operation": "rowExists",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "gS0296vS5ZsPTcYJ",
          "cachedResultUrl": "/projects/OFZrD6piltNz73Y6/datatables/gS0296vS5ZsPTcYJ",
          "cachedResultName": "DecodoGoogleSearchResults"
        }
      },
      "typeVersion": 1,
      "alwaysOutputData": true
    },
    {
      "id": "615a78e2-7642-4ba2-9666-1a348ca089d1",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        1120,
        0
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "aa0a4873-ce6d-4ed7-a695-7242d44aacd2",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{!$json.output.isEmpty()  }}",
              "rightValue": 0
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "b0124f12-8d20-4c62-93f5-a17df5519e95",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        288,
        -752
      ],
      "parameters": {
        "width": 448,
        "height": 144,
        "content": "## Disclaimer\n\nThis workflow is only available on n8n self-hosted as it's making use of the community node for the Decodo Web Scraping"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "207139b8-0800-496d-a210-f7a1b97ee128",
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Insert row on Data Table",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If row exists": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Extract Keywords and Topics",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set the Input Fields": {
      "main": [
        [
          {
            "node": "Google Search with Decodo",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create a Binary Response": {
      "main": [
        [
          {
            "node": "Write the Structured Google Search Results to Disk",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Insert row on Data Table": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Search with Decodo": {
      "main": [
        [
          {
            "node": "Return the Organic Search Results",
            "type": "main",
            "index": 0
          },
          {
            "node": "Create a Binary Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Keywords and Topics": {
      "main": [
        [
          {
            "node": "If row exists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Return the Organic Search Results": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "Set the Input Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model for Keywords and Topics": {
      "ai_languageModel": [
        [
          {
            "node": "Extract Keywords and Topics",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Please note - This workflow is only available on n8n self-hosted as it's making use of the community node for the Decodo Web Scraping

Source: https://n8n.io/workflows/10648/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

Please note - This workflow is only available on n8n self-hosted as it’s making use of the community node for the Decodo Web Scraping

@Decodo/N8N Nodes Decodo, Information Extractor, Read Write File +2
AI & RAG

Influencer 2.0. Uses formTrigger, form, informationExtractor, lmChatOpenAi. Event-driven trigger; 93 nodes.

Form Trigger, Form, Information Extractor +13
AI & RAG

Community nodes can only be installed on self-hosted instances of n8n.

N8N Nodes Mcp, Information Extractor, HTTP Request +3
AI & RAG

This workflow automates the discovery and structuring of FAQs from real AI search behavior using SE Ranking and OpenAI. It fetches domain-specific AI search prompts and answers, then extracts relevant

HTTP Request, Information Extractor, OpenAI Chat +1
AI & RAG

This n8n workflow automates domain level keyword ranking analysis and enriches raw SEO metrics with AI-generated summaries. It combines structured keyword data from SE Ranking with natural-language in

OpenAI Chat, Information Extractor, HTTP Request +2