AutomationFlowsWeb Scraping › Memoria: Buscar

Memoria: Buscar

02 - Memoria: Buscar. Uses httpRequest. Webhook trigger; 7 nodes.

Webhook trigger★★★★☆ complexity7 nodesHTTP Request
Web Scraping Trigger: Webhook Nodes: 7 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": "02 - Memoria: Buscar",
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "tags": [
    {
      "name": "memoria"
    }
  ],
  "nodes": [
    {
      "id": "b2c3d4e5-0002-0002-0002-000000000001",
      "name": "Webhook Buscar",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        0,
        300
      ],
      "parameters": {
        "path": "memoria-buscar",
        "httpMethod": "POST",
        "responseMode": "responseNode",
        "options": {}
      }
    },
    {
      "id": "b2c3d4e5-0002-0002-0002-000000000002",
      "name": "Validar Input",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        220,
        300
      ],
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "1",
              "name": "query",
              "value": "={{ $json.body.query }}",
              "type": "string"
            },
            {
              "id": "2",
              "name": "limit",
              "value": "={{ $json.body.limit || 5 }}",
              "type": "number"
            },
            {
              "id": "3",
              "name": "score_threshold",
              "value": "={{ $json.body.score_threshold || 0.65 }}",
              "type": "number"
            },
            {
              "id": "4",
              "name": "session_id",
              "value": "={{ $json.body.session_id || '' }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      }
    },
    {
      "id": "b2c3d4e5-0002-0002-0002-000000000003",
      "name": "Generar Embedding (nomic)",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        440,
        300
      ],
      "parameters": {
        "method": "POST",
        "url": "http://host.docker.internal:11434/api/embeddings",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ model: 'nomic-embed-text', prompt: $json.query }) }}",
        "options": {
          "response": {
            "response": {
              "responseFormat": "json"
            }
          }
        }
      }
    },
    {
      "id": "b2c3d4e5-0002-0002-0002-000000000004",
      "name": "Merge Embedding + Query",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        660,
        300
      ],
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "1",
              "name": "embedding",
              "value": "={{ $json.embedding }}",
              "type": "array"
            },
            {
              "id": "2",
              "name": "query",
              "value": "={{ $('Validar Input').item.json.query }}",
              "type": "string"
            },
            {
              "id": "3",
              "name": "limit",
              "value": "={{ $('Validar Input').item.json.limit }}",
              "type": "number"
            },
            {
              "id": "4",
              "name": "score_threshold",
              "value": "={{ $('Validar Input').item.json.score_threshold }}",
              "type": "number"
            },
            {
              "id": "5",
              "name": "session_id",
              "value": "={{ $('Validar Input').item.json.session_id }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      }
    },
    {
      "id": "b2c3d4e5-0002-0002-0002-000000000005",
      "name": "Buscar en Qdrant",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        880,
        300
      ],
      "parameters": {
        "method": "POST",
        "url": "http://host.docker.internal:6333/collections/agent_memory/points/search",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({\n  vector: $json.embedding,\n  limit: $json.limit,\n  score_threshold: $json.score_threshold,\n  with_payload: true,\n  filter: $json.session_id\n    ? { must: [{ key: 'session_id', match: { value: $json.session_id } }] }\n    : undefined\n}) }}",
        "options": {
          "response": {
            "response": {
              "responseFormat": "json"
            }
          }
        }
      }
    },
    {
      "id": "b2c3d4e5-0002-0002-0002-000000000006",
      "name": "Formatear Resultados",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1100,
        300
      ],
      "parameters": {
        "jsCode": "const results = $input.first().json.result || [];\n\nif (results.length === 0) {\n  return [{ json: {\n    found: false,\n    count: 0,\n    context: 'No se encontr\u00f3 informaci\u00f3n previa relevante.',\n    memories: []\n  }}];\n}\n\nconst memories = results.map(r => ({\n  score: Math.round(r.score * 100) / 100,\n  content: r.payload.content,\n  category: r.payload.category,\n  timestamp: r.payload.timestamp,\n  session_id: r.payload.session_id\n}));\n\nconst contextText = memories\n  .map((m, i) => `[Memoria ${i+1} | Score: ${m.score} | ${m.category}]\\n${m.content}`)\n  .join('\\n\\n');\n\nreturn [{ json: {\n  found: true,\n  count: memories.length,\n  context: contextText,\n  memories\n}}];"
      }
    },
    {
      "id": "b2c3d4e5-0002-0002-0002-000000000007",
      "name": "Responder",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [
        1320,
        300
      ],
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ JSON.stringify($json) }}",
        "options": {
          "responseCode": 200
        }
      }
    }
  ],
  "connections": {
    "Webhook Buscar": {
      "main": [
        [
          {
            "node": "Validar Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validar Input": {
      "main": [
        [
          {
            "node": "Generar Embedding (nomic)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generar Embedding (nomic)": {
      "main": [
        [
          {
            "node": "Merge Embedding + Query",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Embedding + Query": {
      "main": [
        [
          {
            "node": "Buscar en Qdrant",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Buscar en Qdrant": {
      "main": [
        [
          {
            "node": "Formatear Resultados",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Formatear Resultados": {
      "main": [
        [
          {
            "node": "Responder",
            "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

02 - Memoria: Buscar. Uses httpRequest. Webhook trigger; 7 nodes.

Source: https://github.com/nicoiud/holding-multi-marca/blob/e48d52729d9e5a672b141cf1b4b048dc0a1cf1b3/n8n-workflows/02-memoria-buscar.json — original creator credit. Request a take-down →

More Web Scraping workflows → · Browse all categories →

Related workflows

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

Web Scraping

This n8n template provides enterprise-level version control for your workflows using GitHub integration. Stop losing hours to broken workflows and manual exports – get proper commit history, visual di

n8n, Execute Workflow Trigger, HTTP Request +1
Web Scraping

This flow creates dummy files for every item added in your *Arrs (Radarr/Sonarr) with the tag .

HTTP Request, Ssh
Web Scraping

eek-Go v2 (Batch-Then-Review). Uses httpRequest. Webhook trigger; 75 nodes.

HTTP Request
Web Scraping

This workflow receives webhook requests from a content calendar and uses the X API v2 to publish text posts, threads, image/video posts, and polls, as well as delete existing posts and run a credentia

HTTP Request
Web Scraping

This workflow acts as a central API gateway for all technical indicator agents in the Binance Spot Market Quant AI system. It listens for incoming webhook requests and dynamically routes them to the c

HTTP Request