AutomationFlowsAI & RAG › Web Research Agent Pipeline

Web Research Agent Pipeline

Web Research Agent Pipeline. Uses executeCommand, readBinaryFile, emailSend, slack. Scheduled trigger; 7 nodes.

Cron / scheduled trigger★★★★☆ complexity7 nodesExecute CommandRead Binary FileEmail SendSlack
AI & RAG Trigger: Cron / scheduled Nodes: 7 Complexity: ★★★★☆ Added:

This workflow follows the Emailsend → Slack 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
{
  "name": "Web Research Agent Pipeline",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 9 * * 1-5"
            }
          ]
        }
      },
      "name": "Cron Trigger",
      "type": "n8n-nodes-base.cron",
      "typeVersion": 1,
      "position": [
        240,
        300
      ]
    },
    {
      "parameters": {
        "jsCode": "// Generate topics from a predefined list or external source\nconst topics = [\n  'artificial intelligence trends 2024',\n  'quantum computing breakthroughs',\n  'climate technology solutions',\n];\nconst topic = topics[Math.floor(Math.random() * topics.length)];\nreturn [{ json: { topic, timestamp: new Date().toISOString() } }];"
      },
      "name": "Select Research Topic",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        460,
        300
      ]
    },
    {
      "parameters": {
        "command": "cd /opt/web-research-agent && python -m src.cli research \"{{ $json.topic }}\" --output /tmp/reports/{{ $json.topic | replace(' ', '_') }}.html --max-sources 8"
      },
      "name": "Run Research Agent",
      "type": "n8n-nodes-base.executeCommand",
      "typeVersion": 1,
      "position": [
        680,
        300
      ]
    },
    {
      "parameters": {
        "jsCode": "const exitCode = $input.first().json.exitCode;\nif (exitCode !== 0) {\n  throw new Error('Research agent failed: ' + $input.first().json.stderr);\n}\nconst topic = $('Select Research Topic').first().json.topic;\nconst reportPath = '/tmp/reports/' + topic.replace(/ /g, '_') + '.html';\nreturn [{ json: { success: true, reportPath, topic } }];"
      },
      "name": "Check Result",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        900,
        300
      ]
    },
    {
      "parameters": {
        "filePath": "={{ $json.reportPath }}"
      },
      "name": "Read Report File",
      "type": "n8n-nodes-base.readBinaryFile",
      "typeVersion": 1,
      "position": [
        1120,
        300
      ]
    },
    {
      "parameters": {
        "fromEmail": "research-agent@example.com",
        "toEmail": "team@example.com",
        "subject": "=Research Report: {{ $('Select Research Topic').first().json.topic }}",
        "html": "=<p>Your automated research report is attached.</p><p><strong>Topic:</strong> {{ $('Select Research Topic').first().json.topic }}</p><p>Report generated at {{ $('Select Research Topic').first().json.timestamp }}</p>",
        "attachments": "data"
      },
      "name": "Email Report",
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 2,
      "position": [
        1340,
        300
      ]
    },
    {
      "parameters": {
        "content": "=## Research Report Ready\\n\\n**Topic:** {{ $('Select Research Topic').first().json.topic }}\\n**Time:** {{ $('Select Research Topic').first().json.timestamp }}\\n\\nReport saved to `{{ $('Check Result').first().json.reportPath }}`",
        "channel": "#research-reports"
      },
      "name": "Slack Notification",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2,
      "position": [
        1340,
        460
      ]
    }
  ],
  "connections": {
    "Cron Trigger": {
      "main": [
        [
          {
            "node": "Select Research Topic",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Select Research Topic": {
      "main": [
        [
          {
            "node": "Run Research Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run Research Agent": {
      "main": [
        [
          {
            "node": "Check Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Result": {
      "main": [
        [
          {
            "node": "Read Report File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Report File": {
      "main": [
        [
          {
            "node": "Email Report",
            "type": "main",
            "index": 0
          },
          {
            "node": "Slack Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "saveManualExecutions": true,
    "callerPolicy": "workflowsFromSameOwner"
  },
  "id": "web-research-agent-workflow",
  "tags": [
    {
      "name": "research"
    },
    {
      "name": "automation"
    },
    {
      "name": "ai"
    }
  ]
}
Pro

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

About this workflow

Web Research Agent Pipeline. Uses executeCommand, readBinaryFile, emailSend, slack. Scheduled trigger; 7 nodes.

Source: https://github.com/shaikn6/web-research-agent/blob/main/n8n/research_workflow.json — 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

Clara Agent Pipeline. Uses readWriteFile, executeCommand, slack. Scheduled trigger; 8 nodes.

Read Write File, Execute Command, Slack
AI & RAG

This workflow automates end-to-end carbon emissions monitoring, strategy optimisation, and ESG reporting using a multi-agent AI supervisor architecture in n8n. Designed for sustainability managers, ES

Agent, OpenAI Chat, Output Parser Structured +10
AI & RAG

This n8n workflow automates the daily generation of comprehensive analytics reports from multiple websites, processes them using OpenAI's powerful language models, and then delivers the insights direc

Memory Buffer Window, Google Analytics, Agent +6
AI & RAG

This workflow automates end-to-end carbon emissions monitoring, strategy optimisation, and ESG reporting using a multi-agent AI supervisor architecture in n8n. Designed for sustainability managers, ES

Agent, OpenAI Chat, Output Parser Structured +10
AI & RAG

This workflow automates end-to-end carbon emissions monitoring, strategy optimisation, and ESG reporting using a multi-agent AI supervisor architecture in n8n. Designed for sustainability managers, ES

Agent, OpenAI Chat, Output Parser Structured +10