AutomationFlowsAI & RAG › Oxylabs & OpenAI Web Research Automation

Oxylabs & OpenAI Web Research Automation

Original n8n title: Automate Web Research & Analysis with Oxylabs & Gpt for Comprehensive Reports

ByVytenis @vytenis on n8n.io

This workflow is for anyone who needs to research topics quickly and thoroughly: content creators, marketers, product managers, researchers, journalists, students, or anyone seeking deep insights without spending hours browsing websites. If you find yourself opening dozens of…

Chat trigger trigger★★★★☆ complexityAI-powered23 nodesChat TriggerN8N Nodes Oxylabs Ai StudioData TableOpenAI
AI & RAG Trigger: Chat trigger Nodes: 23 Complexity: ★★★★☆ AI nodes: yes Added:

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

This workflow follows the Chat Trigger → OpenAI 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": "rApsjUd8dqh2ySSV",
  "name": "Deep Research AI Workflow",
  "tags": [],
  "nodes": [
    {
      "id": "27d13444-fc79-40ec-a483-3ffccd4ef7d4",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        784,
        176
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.3
    },
    {
      "id": "12afa4de-2a04-4143-bbdf-400717423285",
      "name": "Search Google",
      "type": "n8n-nodes-oxylabs-ai-studio.oxylabsAiStudio",
      "position": [
        1792,
        176
      ],
      "parameters": {
        "resource": "search",
        "searchQuery": "={{ $json.query }}",
        "searchReturnContent": false
      },
      "retryOnFail": true,
      "typeVersion": 1,
      "waitBetweenTries": 1000
    },
    {
      "id": "2c795a46-4418-497b-b5d7-908f42db8d3a",
      "name": "Split URLs",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        2352,
        176
      ],
      "parameters": {
        "options": {
          "destinationFieldName": "url"
        },
        "fieldToSplitOut": "output[0].content[0].text.urls"
      },
      "typeVersion": 1
    },
    {
      "id": "53cf66de-b210-4b5d-b631-d80633612c5e",
      "name": "Split queries",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1328,
        176
      ],
      "parameters": {
        "options": {
          "destinationFieldName": "query"
        },
        "fieldToSplitOut": "output[0].content[0].text.queries"
      },
      "typeVersion": 1
    },
    {
      "id": "ffea02a2-0341-4d34-89a2-aa8288154119",
      "name": "Get number of URLs",
      "type": "n8n-nodes-base.set",
      "position": [
        1712,
        752
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "d55ad15b-5d31-4103-b2b5-c9d0158c7558",
              "name": "length",
              "type": "string",
              "value": "={{ $('Split URLs').all().length }}"
            }
          ]
        }
      },
      "executeOnce": true,
      "typeVersion": 3.4
    },
    {
      "id": "ad23e5a2-81be-4aab-b5b8-59f62f8eb91e",
      "name": "Get all data",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        2848,
        432
      ],
      "parameters": {
        "operation": "get",
        "returnAll": true,
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "ZNXGefBcwkYYdyDE",
          "cachedResultUrl": "/projects/jsKya8bKmDGhXtT2/datatables/ZNXGefBcwkYYdyDE",
          "cachedResultName": "Content summaries"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "e3b3d79a-1cb8-45f0-802d-7fd5e2bd0db4",
      "name": "Get current data for polling",
      "type": "n8n-nodes-base.dataTable",
      "maxTries": 5,
      "position": [
        1936,
        752
      ],
      "parameters": {
        "operation": "get",
        "returnAll": true,
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "ZNXGefBcwkYYdyDE",
          "cachedResultUrl": "/projects/jsKya8bKmDGhXtT2/datatables/ZNXGefBcwkYYdyDE",
          "cachedResultName": "Content summaries"
        }
      },
      "executeOnce": false,
      "notesInFlow": false,
      "retryOnFail": false,
      "typeVersion": 1,
      "alwaysOutputData": false,
      "waitBetweenTries": 5000
    },
    {
      "id": "9996d9ba-083c-44e5-9487-1f7008247a87",
      "name": "If all data exists",
      "type": "n8n-nodes-base.if",
      "position": [
        2320,
        656
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "9b2069cc-152e-490e-8c87-3687f24d350c",
              "operator": {
                "type": "number",
                "operation": "equals"
              },
              "leftValue": "={{ $json.id.last() }}",
              "rightValue": "={{ $('Get number of URLs').item.json.length }}"
            }
          ]
        },
        "looseTypeValidation": true
      },
      "executeOnce": false,
      "typeVersion": 2.2
    },
    {
      "id": "d5760b93-94a9-4b42-acf2-b35ec10babf6",
      "name": "Extract IDs",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        2096,
        752
      ],
      "parameters": {
        "options": {},
        "fieldsToAggregate": {
          "fieldToAggregate": [
            {
              "fieldToAggregate": "id"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "5effde9e-3260-49d6-8058-6c1b9ea31a8f",
      "name": "Wait 60s",
      "type": "n8n-nodes-base.wait",
      "position": [
        1472,
        864
      ],
      "parameters": {
        "amount": 60
      },
      "typeVersion": 1.1
    },
    {
      "id": "0c6e19c9-12c5-4217-b605-e9157965a15c",
      "name": "Wait 10s",
      "type": "n8n-nodes-base.wait",
      "position": [
        2304,
        912
      ],
      "parameters": {
        "amount": 10
      },
      "typeVersion": 1.1
    },
    {
      "id": "70ab5aa1-8d40-4be1-b90d-522b01d1ed63",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        640,
        0
      ],
      "parameters": {
        "color": 7,
        "width": 960,
        "height": 448,
        "content": "# \ud83d\udd0e  STEP 1: Create Google search queries\nSubmit your message/questions, automatically create strategic Google Search queries, and make them ready for processing."
      },
      "typeVersion": 1
    },
    {
      "id": "44a7c413-9768-4e11-a7b7-ff9a28b1e47c",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1664,
        0
      ],
      "parameters": {
        "color": 7,
        "width": 960,
        "height": 448,
        "content": "# \ud83d\udccc  STEP 2: Scrape Google & pick relevant URLs\nScrape Google Search results for each query, select relevant and authoritative sources from all results, and prepare the list of URLs for further processing."
      },
      "typeVersion": 1
    },
    {
      "id": "18aa0a13-86ff-4024-9370-2706aec66546",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        640,
        512
      ],
      "parameters": {
        "color": 7,
        "width": 960,
        "height": 704,
        "content": "# \ud83d\udcd1  STEP 3: Scrape & summarize content in parallel\n\nScrape content from each URL, summarize it with AI, and save it into a data table. Make sure to convert the 3 nodes below to a sub-workflow and edit its setting to enable parallel execution. **See the setup instructions**."
      },
      "typeVersion": 1
    },
    {
      "id": "31855d55-0845-48e5-b0c2-787c57cda75f",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1664,
        512
      ],
      "parameters": {
        "color": 7,
        "width": 960,
        "height": 704,
        "content": "# \u23f3  STEP 4: Wait for data\nCheck the data table whether the last row's ID matches the amount of URLs we've sent to the sub-workflow. If it doesn't, wait for 10 seconds and repeat."
      },
      "typeVersion": 1
    },
    {
      "id": "214c885f-34f7-4164-8284-cf0a4d3c7a3e",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2688,
        288
      ],
      "parameters": {
        "color": 7,
        "width": 768,
        "height": 400,
        "content": "# \u2705 STEP 5: Create final analysis\nGet all summaries from the data table and analyze everything with AI to produce a comprehensive deep research report."
      },
      "typeVersion": 1
    },
    {
      "id": "87025c0d-ae1d-4158-baea-e11c158dc4da",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "width": 576,
        "height": 1216,
        "content": "# \u26a1\ufe0e  Fast Deep Research AI Flow\n\nFully automate **deep research from start to finish**: scrape Google Search results, select relevant sources, scrape & analyze each source in parallel, and generate a comprehensive research report.\n\nCheck out the [comprehensive step-by-step tutorial](https://blog.n8n.io/build-a-fast-deep-research-automation-flow-with-oxylabs-and-n8n/) on the n8n blog.\n\n\n## \u2753 How it works\n1. **Submit your research questions** through n8n\u2019s chat interface\n2. **AI generates strategic search queries** to explore different angles of your topic\n3. **Oxylabs scrapes Google Search** results for each query\n4. **AI evaluates and selects sources** that are the most relevant and authoritative\n5. **Content extraction runs in parallel** via a sub-workflow as Oxylabs scrapes each source and AI extracts key insights\n6. **Summaries are collected in n8n\u2019s data table** for final processing\n7. **AI synthesizes everything** into a comprehensive research report with actionable insights\n\n\n\n\n##  \u26a0\ufe0f  Requirements\n1. \ud83c\udd93 Create a **[free Oxylabs AI Studio key](https://aistudio.oxylabs.io/)** \u2013 1000 credits\n2. \ud83e\udde0 Create **OpenAI API key** \u2013 or use Gemini, Claude, or local Ollama models\n\n\n\n## \u2699\ufe0f Setup\n1. **Install Oxylabs AI Studio** as [shown on this page](https://n8n.io/integrations/oxylabs-ai-studio/)\n2. **Set your API keys**:\n    1.1 Oxylabs AI Studio\n    1.2 OpenAI\n3. **Create a [data table](https://docs.n8n.io/data/data-tables/) inside n8n**\n4. **Select the table name** in each data table node\n5. **Create a sub-workflow**:\n    4.1 Select the 3 nodes (Scrape content, Summarize content, Insert row)\n    4.2 Right-click\n    4.3 Select \u201cConvert 3 nodes to sub-workflow\u201d\n6. **Edit the sub-workflow settings** for for parallel execution:\n    5.1 Mode: Run once for each item\n    5.2 Options \u2192 Add Option \u2192 disable \u201cWait For Sub-Workflow Completion\u201d\n"
      },
      "typeVersion": 1
    },
    {
      "id": "77a2e3e0-3bb0-45ea-bfe8-0b25e84ca397",
      "name": "Create search queries",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        992,
        176
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-5-mini",
          "cachedResultName": "GPT-5-MINI"
        },
        "options": {
          "textFormat": {
            "textOptions": {
              "type": "json_object",
              "verbosity": "low"
            }
          }
        },
        "responses": {
          "values": [
            {
              "content": "={{ $json.chatInput }}"
            },
            {
              "role": "system",
              "content": "You are a part of a deep research team. Your task is to analyze the user's message and create highly specific Google Search queries that will uncover precise and actionable information.\n\nGuidelines for creating search queries:\n- Include ALL key requirements and constraints from the user's message in your queries\n- Every query MUST include the core topic/goal from the user's message\n- Each query must explore a DIFFERENT angle or aspect of the topic\n- Prioritize specificity over breadth - avoid generic terms\n- Use exact terminology and technical terms when relevant\n- Each query should be 4-8 words to balance specificity with searchability\n\nProvide 3 search queries in a list that together cover the full scope of what needs to be researched."
            }
          ]
        },
        "builtInTools": {}
      },
      "typeVersion": 2
    },
    {
      "id": "3d580a2b-a175-43b4-8187-bd1790efb58c",
      "name": "Pick URLs",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        2016,
        176
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-5-mini",
          "cachedResultName": "GPT-5-MINI"
        },
        "options": {
          "textFormat": {
            "textOptions": {
              "type": "json_object",
              "verbosity": "low"
            }
          }
        },
        "responses": {
          "values": [
            {
              "content": "={{ JSON.stringify($input.all().flatMap(item => item.json.data || [])) }}"
            },
            {
              "role": "system",
              "content": "=You are a part of a deep research team.\nAnalyze the provided Google SERP results and select up to 10 of the most relevant and trustworthy distinct sources for answering this question:\n\"{{ $('When chat message received').item.json.chatInput }}\"\n\nImportant: The Google SERP results are combined from different searches into a single list. Each search term was distinct:\n{{ $('Create search queries').item.json.output[0].content[0].text.queries }}\n\nEvaluation criteria:\n- Prioritize authoritative sources (official sites, established publications, expert domains)\n- Use the SERP descriptions to assess topical relevance to the user's question\n- Prefer recent, primary sources over aggregators when applicable\n\nReturn only the selected URLs compiled into a single JSON array: {\"urls\": [\"url1\", \"url2\", \"url3\"]}\n\nIf fewer than 10 sources meet the criteria, return only the quality ones."
            }
          ]
        },
        "builtInTools": {}
      },
      "executeOnce": true,
      "typeVersion": 2
    },
    {
      "id": "b901ffde-9522-46b8-b7a8-d6f3f22af22c",
      "name": "Scrape content",
      "type": "n8n-nodes-oxylabs-ai-studio.oxylabsAiStudio",
      "position": [
        736,
        688
      ],
      "parameters": {
        "scrapeUrl": "={{ $json.url }}"
      },
      "executeOnce": false,
      "retryOnFail": true,
      "typeVersion": 1
    },
    {
      "id": "9b7d6165-ec14-47a0-9e73-23e837b5df19",
      "name": "Insert row",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        1296,
        688
      ],
      "parameters": {
        "columns": {
          "value": {
            "summary": "={{ $json.output[0].content[0].text }}"
          },
          "schema": [
            {
              "id": "summary",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "summary",
              "defaultMatch": false
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "summary"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "ZNXGefBcwkYYdyDE",
          "cachedResultUrl": "/projects/jsKya8bKmDGhXtT2/datatables/ZNXGefBcwkYYdyDE",
          "cachedResultName": "Content summaries"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "6bb49288-2aba-4495-b9c2-1f41b11d6bea",
      "name": "Summarize content",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        944,
        688
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-5",
          "cachedResultName": "GPT-5"
        },
        "options": {},
        "responses": {
          "values": [
            {
              "content": "={{ $json.data }}"
            },
            {
              "role": "system",
              "content": "=You are a member of a deep research team and you specificaly focus on extracting relevant information from provided web sources. Analyze the provided Markdown content and extract information relevant to the user's question.\n\nStructure your response in Markdown with these sections:\n\n# Key Findings\nList the main facts, statistics, or claims relevant to the question. Provide as much details as necessary.\n\n# Step-by-Step Instructions (skip if none)\nIf the content includes procedural steps or how-to information, extract them here. Provide as much in detail as necessary.\n\n# Supporting Details\nAdditional context, explanations, or evidence that supports the findings\n\nCRITICAL RULES:\n- Only extract information present in the source - never infer or add external knowledge\n- If the source doesn't address part of the question, state \"Not covered in this source\"\n- Keep extractions concise but preserve key specifics (numbers, dates, technical terms)\n- Use bullet points for clarity\n- Provide a 700-1000 words summary\n\nUser's Question:\n{{ $('Start').item.json.chatInput }}"
            }
          ]
        },
        "builtInTools": {}
      },
      "typeVersion": 2
    },
    {
      "id": "27fd20bb-87cb-4bb9-814e-03fc493926bb",
      "name": "Final analysis",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        3088,
        432
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-5",
          "cachedResultName": "GPT-5"
        },
        "options": {},
        "responses": {
          "values": [
            {
              "content": "={{ JSON.stringify($input.all().flatMap(item => item.json.summary || [])) }}"
            },
            {
              "role": "system",
              "content": "=You are a senior research analyst in a deep research team. Your role is to synthesize multiple content summaries into a comprehensive and actionable final report.\n\n## YOUR TASK\nAnswer this user question using ONLY the provided summaries:\n{{ $('When chat message received').item.json.chatInput }}\n\n## CRITICAL RULES\n- **Use ONLY the provided summaries** - Do not add information from your training data or make assumptions beyond what's explicitly stated in the summaries\n- Maximum 1500 words\n\n## REPORT STRUCTURE\n1. **Executive Summary** - Direct answer and key takeaway (2-3 sentences)\n2. **Main Analysis** - Synthesize findings, identify patterns, consensus views\n3. **Actionable Recommendations** - Specific steps the user can take, prioritized suggestions based on data, clear next actions\n4. **Gaps & Limitations** - Missing information and areas needing more research (short section, max 100 words)\n\n## STYLE GUIDELINES\n- Be concise and direct - avoid fluff or repetition\n- Always use clear HEADINGS and FORMATTING for scanability\n- When sources disagree, present both perspectives fairly\n\n## FORMATTING REQUIREMENTS\nUse RICH Markdown formatting for readability:\n- H1, H2, H3, H4 headings to structure content\n- Bold text for emphasis on key findings\n- Tables for comparisons or structured data\n- Bullet lists and numbered lists when appropriate\n- inline code and code blocks where relevant\n- Keep paragraphs concise"
            }
          ]
        },
        "builtInTools": {}
      },
      "executeOnce": true,
      "typeVersion": 2
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "a8d7464d-d4ee-4cc5-8bf8-7eb863a409c2",
  "connections": {
    "Wait 10s": {
      "main": [
        [
          {
            "node": "Get current data for polling",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 60s": {
      "main": [
        [
          {
            "node": "Get number of URLs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pick URLs": {
      "main": [
        [
          {
            "node": "Split URLs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Insert row": {
      "main": [
        [
          {
            "node": "Wait 60s",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split URLs": {
      "main": [
        [
          {
            "node": "Scrape content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract IDs": {
      "main": [
        [
          {
            "node": "If all data exists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get all data": {
      "main": [
        [
          {
            "node": "Final analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search Google": {
      "main": [
        [
          {
            "node": "Pick URLs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split queries": {
      "main": [
        [
          {
            "node": "Search Google",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scrape content": {
      "main": [
        [
          {
            "node": "Summarize content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarize content": {
      "main": [
        [
          {
            "node": "Insert row",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get number of URLs": {
      "main": [
        [
          {
            "node": "Get current data for polling",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If all data exists": {
      "main": [
        [
          {
            "node": "Get all data",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait 10s",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create search queries": {
      "main": [
        [
          {
            "node": "Split queries",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "Create search queries",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get current data for polling": {
      "main": [
        [
          {
            "node": "Extract IDs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

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

About this workflow

This workflow is for anyone who needs to research topics quickly and thoroughly: content creators, marketers, product managers, researchers, journalists, students, or anyone seeking deep insights without spending hours browsing websites. If you find yourself opening dozens of…

Source: https://n8n.io/workflows/10504/ — 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

This workflow is for: People who want to quickly launch simple landing pages without paying monthly fees to landing page creators. It’s ideal for rapid prototyping, generation of large amounts of land

Google Gemini, OpenAI, Chat Trigger +3
AI & RAG

Most career advice is generic. This workflow builds a fully personalized AI coaching system that remembers every user, adapts to their career stage and goals, detects what kind of help they need, and

Google Sheets, Gmail, Chat Trigger +2
AI & RAG

Automate the creation of high-performing YouTube Shorts in minutes! Content Creators: Generate engaging short videos effortlessly. Marketing Agencies: Produce client-ready content quickly. Business Ow

Chat Trigger, HTTP Request, OpenAI
AI & RAG

I prepared a comprehensive guide demonstrating how to build a multi-level retrieval AI agent in n8n that smartly narrows down search results first by file descriptions, then retrieves detailed vector

Tool Code, Chat Trigger, OpenAI +2
AI & RAG

🚨 LinkedIn search is BROKEN.

Chat Trigger, Google Sheets, HTTP Request +2