AutomationFlowsAI & RAG › News Agent Webhook

News Agent Webhook

News Agent Webhook. Webhook trigger; 4 nodes.

Webhook trigger★★★★☆ complexity4 nodes
AI & RAG Trigger: Webhook Nodes: 4 Complexity: ★★★★☆ Added:

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": "News Agent Webhook",
  "nodes": [
    {
      "parameters": {
        "path": "news-analyze",
        "options": {
          "responseData": "={{$json}}"
        }
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        200,
        300
      ],
      "name": "Webhook"
    },
    {
      "parameters": {
        "propertyName": "stage",
        "switchCases": {
          "preprocess": 1,
          "postprocess": 2
        }
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 1,
      "position": [
        420,
        300
      ],
      "name": "Switch Stage"
    },
    {
      "parameters": {
        "functionCode": "const input = items[0].json.input || {};\nlet text = input.text || '';\nif (input.url) {\n  if (input.url.includes('news.naver.com')) {\n    // \ub124\uc774\ubc84 \ub274\uc2a4 \uc804\uc6a9 Selector\n    text = $json.body?.match(/<div[^>]*id=\\\"dic_area[\\\"]?[^>]*>([\\s\\S]*?)<\\/div>/)?.[1] || '';\n  } else {\n    text = text || `Fetched content from ${input.url}`;\n  }\n}\nreturn [{ json: { text } }];"
      },
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        650,
        200
      ],
      "name": "Preprocess Function"
    },
    {
      "parameters": {
        "functionCode": "const r = items[0].json.result;\nconst meta = { tokens: 0, model: 'mcp-provider', latencyMs: 0 };\nreturn [{ json: { ...r, meta } }];"
      },
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        650,
        400
      ],
      "name": "Postprocess Function"
    }
  ],
  "connections": {
    "Switch Stage": {
      "main": [
        [
          {
            "node": "Preprocess Function",
            "type": "main",
            "index": 0
          },
          {
            "node": "Postprocess Function",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "Switch Stage",
            "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

News Agent Webhook. Webhook trigger; 4 nodes.

Source: https://github.com/hangj11/news-ai-agent/blob/30d3037a8ce7ee9801808c86a990f23f2d6ad711/n8n/workflow.newsAgent.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

Jigsaw API key for image processing, I use this as a gatekeeper/second pair of eyes. LINK to their website https://jigsawstack.com/ SECOND A postgress DATABASE (I use Supabase) LlamaCloud for the pars

HTTP Request, Postgres, Stop And Error +2
AI & RAG

Onsite Photos to Jobs (SMS Agent). Uses dataTable, twilio, httpRequest, airtable. Webhook trigger; 62 nodes.

Data Table, Twilio, HTTP Request +1
AI & RAG

AML Alert Triage. Uses httpRequest. Webhook trigger; 57 nodes.

HTTP Request
AI & RAG

W1 - IN WhatsApp Adapter (Secure + Fast ACK). Uses postgres, redis, httpRequest. Webhook trigger; 50 nodes.

Postgres, Redis, HTTP Request
AI & RAG

W1 - IN WhatsApp Adapter (Secure + Fast ACK). Uses postgres, redis, httpRequest. Webhook trigger; 48 nodes.

Postgres, Redis, HTTP Request