AutomationFlowsSocial Media › Webhook to Local API Query Handler

Webhook to Local API Query Handler

Original n8n title: Agent Query Workflow (prototype)

Agent Query Workflow (Prototype). Uses httpRequest. Webhook trigger; 3 nodes.

Webhook trigger★☆☆☆☆ complexity3 nodesHTTP Request
Social Media Trigger: Webhook Nodes: 3 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": "Agent Query Workflow (Prototype)",
  "nodes": [
    {
      "parameters": {
        "path": "query",
        "httpMethod": "POST",
        "responseMode": "onReceived",
        "options": {}
      },
      "id": "WebhookTrigger",
      "name": "Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        240,
        280
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "http://127.0.0.1:8000/query",
        "sendBody": true,
        "jsonParameters": true,
        "bodyParametersJson": "={\n  \"text\": $json.body?.text || $json.text || \"\",\n  \"top_k\": 4,\n  \"allow_generation\": false\n}",
        "options": {}
      },
      "id": "CallLocalAPI",
      "name": "Call Local API (/query)",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        520,
        280
      ]
    },
    {
      "parameters": {
        "respondWith": "allIncomingItems",
        "responseBody": "={{$json}}",
        "options": {}
      },
      "id": "Respond",
      "name": "Respond",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [
        780,
        280
      ]
    }
  ],
  "connections": {
    "Webhook Trigger": {
      "main": [
        [
          {
            "node": "Call Local API (/query)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Call Local API (/query)": {
      "main": [
        [
          {
            "node": "Respond",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  }
}
Pro

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

About this workflow

Agent Query Workflow (Prototype). Uses httpRequest. Webhook trigger; 3 nodes.

Source: https://github.com/salah1892/26_MR2-Ing-nierie_des_protocoles_r-seaux_Complement_Part_B_Phase_I_-_II/blob/3615ec6faf56623ab0975a1594d4f7c3283ce5c8/n8n/query_workflow.json — original creator credit. Request a take-down →

More Social Media workflows → · Browse all categories →

Related workflows

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

Social Media

This workflow adds one fixed Wouldliker TikTok sound to any downstream posting or content workflow. A webhook receives an optional . The workflow defaults to when no sound is provided. It fetches the

HTTP Request
Social Media

YouTube Newsletter Generator. Uses httpRequest. Webhook trigger; 5 nodes.

HTTP Request
Social Media

Authenticate_instagram. Uses httpRequest. Webhook trigger; 5 nodes.

HTTP Request
Social Media

01.10 Headless Checkout Tax Liability Sync. Uses httpRequest. Webhook trigger; 5 nodes.

HTTP Request
Social Media

Instagram - Fluxo de mensagens. Uses rabbitmq, rabbitmqTrigger, googleSheets, httpRequest. Webhook trigger; 74 nodes.

Rabbitmq, Rabbitmq Trigger, Google Sheets +1