AutomationFlowsAI & RAG › Notas

Notas

Notas. Uses readBinaryFile, spreadsheetFile, openAIApi. Webhook trigger; 7 nodes.

Webhook trigger★★★★☆ complexityAI-powered7 nodesRead Binary FileSpreadsheet FileOpen Aiapi
AI & RAG Trigger: Webhook Nodes: 7 Complexity: ★★★★☆ AI nodes: yes 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
{
  "nodes": [
    {
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "parameters": {
        "httpMethod": "POST",
        "path": "fluxo-notas-local"
      }
    },
    {
      "name": "Extrair Pergunta",
      "type": "n8n-nodes-base.function",
      "parameters": {
        "language": "python",
        "mode": "runOnceForAllItems",
        "code": "items = _input.all()\nif items:\n    data = items[0].json\n    pergunta = data.get('body', {}).get('pergunta') or data.get('pergunta')\n    return [{ json: { perguntaSentenca: pergunta } }]\nreturn []"
      }
    },
    {
      "name": "Ler CSV",
      "type": "n8n-nodes-base.readBinaryFile",
      "parameters": {
        "filePath": "C:/Users/nicos/Downloads/agente/202401_NFs_Cabecalho.csv"
      }
    },
    {
      "name": "Extrair CSV",
      "type": "n8n-nodes-base.spreadsheetFile",
      "parameters": {
        "operation": "extractFromFile",
        "binaryPropertyName": "data",
        "fileType": "csv",
        "hasHeader": true
      }
    },
    {
      "name": "Agrega\u00e7\u00e3o",
      "type": "n8n-nodes-base.aggregate",
      "parameters": {
        "mode": "individualFields",
        "fields": [
          {
            "inputFieldName": "valor",
            "operation": "sum",
            "outputFieldName": "totalGasto"
          },
          {
            "inputFieldName": "valor",
            "operation": "average",
            "outputFieldName": "mediaValor"
          }
        ]
      }
    },
    {
      "name": "Modelo Local",
      "type": "n8n-nodes-base.openAIApi",
      "parameters": {
        "baseURL": "http://localhost:8080",
        "model": "mistral-7b-instruct-v0.2.Q4_K_M",
        "messages": [
          {
            "role": "system",
            "content": "Voc\u00ea \u00e9 um assistente que responde perguntas sobre notas fiscais."
          },
          {
            "role": "user",
            "content": "Pergunta: {{$node['Extrair Pergunta'].json.perguntaSentenca}}\n\nDados:\n- Total gasto: {{$node['Agrega\u00e7\u00e3o'].json.totalGasto}}\n- M\u00e9dia por nota: {{$node['Agrega\u00e7\u00e3o'].json.mediaValor}}\n\nResponda em tom de conversa."
          }
        ]
      }
    },
    {
      "name": "Responder",
      "type": "n8n-nodes-base.respondToWebhook",
      "parameters": {
        "statusCode": 200,
        "dataPropertyName": "resposta",
        "responseBody": "={{ $node['Modelo Local'].json.choices[0].message.content }}"
      }
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Extrair Pergunta",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extrair Pergunta": {
      "main": [
        [
          {
            "node": "Ler CSV",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Ler CSV": {
      "main": [
        [
          {
            "node": "Extrair CSV",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extrair CSV": {
      "main": [
        [
          {
            "node": "Agrega\u00e7\u00e3o",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Agrega\u00e7\u00e3o": {
      "main": [
        [
          {
            "node": "Modelo Local",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Modelo Local": {
      "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

Notas. Uses readBinaryFile, spreadsheetFile, openAIApi. Webhook trigger; 7 nodes.

Source: https://github.com/Nicolas-AS07/fluxo-open-source.json/blob/d0d5685dc5ac7a6b20293fa882795a9a8785257b/notas.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

Bot ROVEEb. Uses openAi, dataTable, telegram, spreadsheetFile. Webhook trigger; 31 nodes.

OpenAI, Data Table, Telegram +2
AI & RAG

ClaudeHumanizer - Complete 11-Phase Assembly Line (v3.3.0 - File I/O). Uses readBinaryFile, anthropic, writeBinaryFile. Webhook trigger; 28 nodes.

Read Binary File, Anthropic, Write Binary File
AI & RAG

유저 문의 자동 분류/응대 (IF Node). Uses openAi, googleTranslate, googleSheets, readBinaryFile. Webhook trigger; 19 nodes.

OpenAI, Google Translate, Google Sheets +2
AI & RAG

Use cases Auto-generate subtitles for training or educational videos Translate videos into multiple languages for global reach Create accessibility-friendly content with minimal effort Build a backend

HTTP Request, Execute Command, Read Binary File +2
AI & RAG

Automated Petroleum Billing (Local Files + PDFco + Gemini). Uses readBinaryFile, spreadsheetFile, httpRequest. Manual trigger; 10 nodes.

Read Binary File, Spreadsheet File, HTTP Request