This workflow follows the Agent → Chat Trigger 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 →
{
"name": "Agente Analista de Dados (CSV + Python/Pandas)",
"nodes": [
{
"parameters": {
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"typeVersion": 1.1,
"position": [
0,
0
],
"id": "chat_trigger_node",
"name": "When Chat Message Received"
},
{
"parameters": {
"options": {
"systemMessage": "Voc\u00ea \u00e9 um Analista de Dados s\u00eanior especializado em extrair insights de arquivos CSV. O usu\u00e1rio enviar\u00e1 perguntas em linguagem natural sobre os dados fornecidos. Para responder, voc\u00ea DEVE interagir com a ferramenta de C\u00f3digo (Python/Pandas) para inspecionar o DataFrame, filtrar, agrupar ou calcular estat\u00edsticas. Use a calculadora para opera\u00e7\u00f5es matem\u00e1ticas simples se necess\u00e1rio. Traduza suas descobertas em respostas claras, profissionais e f\u00e1ceis de entender em linguagem natural. N\u00e3o mencione termos t\u00e9cnicos de c\u00f3digo ou SQL para o usu\u00e1rio final, foque no resultado."
}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 1.7,
"position": [
440,
0
],
"id": "ai_agent_node",
"name": "AI Agent"
},
{
"parameters": {
"model2": "gpt-4o-mini",
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenai",
"typeVersion": 1.1,
"position": [
380,
240
],
"id": "openai_model_node",
"name": "OpenAI Chat Model"
},
{
"parameters": {},
"type": "@n8n/n8n-nodes-langchain.toolCalculator",
"typeVersion": 1,
"position": [
500,
240
],
"id": "calculator_tool_node",
"name": "Calculator"
},
{
"parameters": {
"name": "analisar_dados_pandas",
"description": "Use esta ferramenta para executar scripts Python utilizando a biblioteca Pandas para analisar o arquivo CSV carregado. O DataFrame j\u00e1 est\u00e1 dispon\u00edvel na vari\u00e1vel 'df'. Retorne sempre o resultado final da an\u00e1lise estruturado.",
"language": "python",
"code": "# O n8n recebe os dados mapeados do n\u00f3 anterior.\n# Voc\u00ea pode simular as opera\u00e7\u00f5es do Pandas aqui utilizando os dados do contexto.\nimport pandas as pd\nimport json\n\n# Recupera os dados do CSV que foram convertidos no n\u00f3 'Processar CSV'\ncontext_data = _input.context.get('json_data', [])\ndf = pd.DataFrame(context_data)\n\n# Exemplo de execu\u00e7\u00e3o din\u00e2mica que o agente pode inferir\n# O Agente de IA reescrever\u00e1 a l\u00f3gica interna conforme a pergunta do usu\u00e1rio\nreturn {\n \"mensagem\": \"DataFrame carregado com sucesso.\",\n \"colunas\": list(df.columns),\n \"linhas_totais\": len(df)\n}"
},
"type": "@n8n/n8n-nodes-langchain.toolCode",
"typeVersion": 1,
"position": [
620,
240
],
"id": "code_tool_node",
"name": "Code Tool (Python)"
},
{
"parameters": {
"options": {
"options": {
"delimiter": ",",
"readAsString": true
}
}
},
"type": "n8n-nodes-base.convertFromFile",
"typeVersion": 1.1,
"position": [
200,
0
],
"id": "convert_csv_node",
"name": "Processar CSV"
}
],
"connections": {
"When Chat Message Received": {
"main": [
[
{
"node": "Processar CSV",
"type": "main",
"index": 0
}
]
]
},
"Processar CSV": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Calculator": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Code Tool (Python)": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"clipColor": "#FF5722",
"id": "analista_dados_csv_wf"
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Agente Analista de Dados (CSV + Python/Pandas). Uses chatTrigger, agent, lmChatOpenai, toolCalculator. Chat trigger; 6 nodes.
Source: https://github.com/KFalcao/kensei-cybersec-ai/blob/7133c5fe382cf3001972d828d6d72b7ea053f083/semana-06/analista_dados.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
A smart personal assistant that can reason, search, calculate, and remember — powered by Google Gemini and ready in one click.
A reasoning agent that can think, search, calculate, and remember — powered by GROQ inference and ready to deploy in one click.
This workflow provides a chat-based CRM assistant powered by Google Gemini that can append new leads to a Google Sheets “Leads” tab, answer pipeline questions by reading the sheet, and log each conver
Power BI Data Analyst Agent. Uses stickyNote, chatTrigger, agent, lmChatOpenRouter. Chat trigger; 12 nodes.
This template is for users who want to combine the power of AI with Google Sheets for managing and calculating data quickly. It’s ideal for small businesses, data entry teams, and anyone who tracks li