Saltar al contenido

Google Sheets a PostgreSQL RAG con Agente AI

Monitorea una hoja de cálculo de Google por cambios, sincroniza sus datos a una tabla PostgreSQL y permite la consulta en lenguaje natural de la base de datos a través de un Agente AI impulsado por Google Gemini.

Repo Original 21 nodos 11 tipos conectado
Cargando workflow...

Nodos

Webhook Set Code If HttpRequest Function RespondToWebhook ReadWriteFile ConvertToFile Merge ExtractFromFile

Detalles

ID
2974
Nodos
21
Conex.
Tipos
11

Pertenece a:

¿Qué hace este workflow?

Este workflow automatiza la monitorización de una hoja de cálculo de Google, detectando cambios y sincronizando automáticamente los datos con una base de datos PostgreSQL. Además, integra un potente Agente AI, impulsado por Google Gemini, que permite a los usuarios realizar consultas en lenguaje natural directamente sobre la base de datos PostgreSQL. Esta funcionalidad transforma la forma en que los equipos interactúan con sus datos, haciendo que la información sea accesible sin necesidad de conocimientos técnicos avanzados en SQL. Ideal para empresas que buscan centralizar datos de hojas de cálculo en un entorno robusto como PostgreSQL y democratizar el acceso a la información a través de una interfaz conversacional. Mejora la eficiencia en la toma de decisiones al proporcionar respuestas rápidas y precisas, reduciendo la dependencia de expertos en bases de datos y eliminando errores manuales de exportación e importación. Optimiza la gestión de datos y potencia el análisis empresarial con inteligencia artificial.

¿Cómo funciona?

Este workflow usa 21 nodos conectados con 11 tipos diferentes: Webhook, Set, Code, If, HttpRequest y 6 más. La estructura está totalmente conectada — listo para importar.

¿Para quién es?

Diseñado para equipos de IT & DevOps. Nivel avanzado — recomendado para usuarios experimentados. Alto valor de negocio: automatiza una tarea recurrente con impacto directo.

¿Lo quieres en tu empresa?

Lo implementamos por ti end-to-end: integración, deploy, mantenimiento y soporte. Consultoría B2B con Genai Sapiens.

Hablemos de tu proyecto

¿Quieres aprender a hacerlo?

Sprints de 30 días con companion IA + comunidad. Aprende n8n, automatización y agentes IA desde cero o nivel avanzado.

Ver formación Momentum

Workflows similares

\n \n\n\n installation has been finished\n"},"typeVersion":1.1},{"id":"47c89107-6e6f-4255-94e6-776c2309de50","name":"Has Valid Settings?","type":"n8n-nodes-base.if","position":[660,60],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"or","conditions":[{"id":"71e52c3d-c95c-4ecf-8dce-dbad5c9db29f","operator":{"type":"boolean","operation":"equals"},"leftValue":"={{$json.success}}","rightValue":true}]}},"typeVersion":2.2},{"id":"220b32af-d886-4315-808e-825834eb440e","name":"Get Task Data","type":"n8n-nodes-base.httpRequest","position":[920,-40],"parameters":{"url":"=https://{{ $json.originalRequest.query.DOMAIN }}/rest/tasks.task.get?auth={{ $json.originalRequest.access_token }}","method":"POST","options":{},"jsonBody":"={{ $json.originalRequest.body.PLACEMENT_OPTIONS }}","sendBody":true,"specifyBody":"json"},"typeVersion":4.2},{"id":"e25fb425-28f2-4e48-85b2-8917d4a7497d","name":"Format Task Data","type":"n8n-nodes-base.function","position":[1100,-40],"parameters":{"functionCode":"// Format Task Data for display\nconst items = $input.all();\nlet taskData = {};\n\ntry {\n taskData = items[0].json.result.task;\n} catch (error) {\n return {\n json: {\n taskHtml: '
Error loading task data
'\n }\n };\n}\n\n// Create HTML table from task data\nlet tableHtml = '\\n';\n\nfor (const [field, value] of Object.entries(taskData)) {\n let displayValue = '';\n \n if (Array.isArray(value)) {\n displayValue = value.join(', ');\n } else if (value !== null && value !== undefined) {\n displayValue = value.toString();\n }\n \n tableHtml += ` \\n \\n \\n \\n`;\n}\n\ntableHtml += '
${field}${displayValue}
';\n\nreturn {\n json: {\n taskHtml: tableHtml\n }\n};"},"typeVersion":1},{"id":"a9d4ca61-d9e0-4a57-9807-40dc18625ce2","name":"Task View Response","type":"n8n-nodes-base.respondToWebhook","position":[1280,-40],"parameters":{"options":{"responseCode":200,"responseHeaders":{"entries":[{"name":"Content-Type","value":"text/html"}]}},"respondWith":"text","responseBody":"=\n\n\t\n\t\n\t\n\n\t\n\t\n\t\n\n\tTask View\n\n\n{{$json.taskHtml}}\n\n"},"typeVersion":1.1},{"id":"5bbbf72e-d743-450a-9534-a2a6c569f73d","name":"Error Response","type":"n8n-nodes-base.respondToWebhook","position":[940,160],"parameters":{"options":{"responseCode":200,"responseHeaders":{"entries":[{"name":"Content-Type","value":"text/html"}]}},"respondWith":"text","responseBody":"=\n\n\t\n\t\n\t\n\tError\n\n\n\t
\n\t\tSettings not found or access token expired. Please reinstall the application.\n\t
\n\n"},"typeVersion":1.1},{"id":"8fbaed6d-e9d8-4dbd-805f-a9e2a3e791c5","name":"Save Installation Settings","type":"n8n-nodes-base.readWriteFile","position":[620,-240],"parameters":{"options":{"append":false},"fileName":"={{ $('Set Settings Data').item.json.settingsFilePath }}/widget-app-settings.json","operation":"write"},"typeVersion":1},{"id":"38c01b85-cf8c-4df8-b226-cd199cdee1f2","name":"Set Settings Data","type":"n8n-nodes-base.set","position":[220,-240],"parameters":{"include":"selected","options":{},"assignments":{"assignments":[{"id":"ad1b12be-7b21-42cb-b8b5-3f141dd6040a","name":"data","type":"object","value":"={\n \"access_token\": \"{{$json.access_token}}\",\n \"refresh_token\": \"{{$json.refresh_token}}\",\n \"domain\": \"{{$json.domain}}\",\n \"expires_in\": \"{{$json.expires_in}}\",\n \"application_token\": \"{{$json.application_token}}\",\n \"client_endpoint\": \"https://{{$json.domain}}/rest/\",\n \"C_REST_CLIENT_ID\": \"app.644f4956606e88.45725320\",\n \"C_REST_CLIENT_SECRET\": \"lUb7WU81Wc4UVCWBJBh0xX5sKYWM4nKmsJl0m4vWb2XR6ByRGF\",\n \"updated_at\": \"{{$now}}\"\n}"}]},"includeFields":"settingsFilePath","includeOtherFields":true},"typeVersion":3.4},{"id":"490779aa-5c6b-49cb-960d-d710a848eb60","name":"Create Settings File","type":"n8n-nodes-base.convertToFile","position":[400,-240],"parameters":{"options":{"fileName":"={{ $json.settingsFilePath }}/widget-app-settings.json"},"operation":"toJson"},"typeVersion":1.1},{"id":"902671fc-9286-467b-9060-7326ee14b41a","name":"Read Installation Settings","type":"n8n-nodes-base.readWriteFile","position":[-40,140],"parameters":{"options":{},"fileSelector":"={{ $json.settingsFilePath }}/widget-app-settings.json"},"typeVersion":1},{"id":"8d38c6be-c3ed-493a-8600-a9adf5acff55","name":"If Installation finished","type":"n8n-nodes-base.if","position":[-20,-180],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"3c09735b-94df-4307-aadd-23080bdac02b","operator":{"type":"boolean","operation":"equals"},"leftValue":"={{ $json.isInstallationFinished }}","rightValue":true}]}},"typeVersion":2.2},{"id":"0047bf02-13d9-4ba6-abcd-a557b9ba3fbf","name":"Installation finished Response","type":"n8n-nodes-base.respondToWebhook","position":[220,-580],"parameters":{"options":{"responseCode":200,"responseHeaders":{"entries":[{"name":"Content-Type","value":"text/html"}]}},"respondWith":"text","responseBody":"=\n\n\n installation has been fully finished...\n"},"typeVersion":1.1},{"id":"8a060ae1-801f-469f-8087-26aee15486e3","name":"Merge Installation info","type":"n8n-nodes-base.merge","position":[780,-380],"parameters":{"mode":"combine","options":{},"combineBy":"combineAll"},"typeVersion":3},{"id":"b5dbdd6f-b81b-4457-8f04-75a951903755","name":"Extract Installation Settings","type":"n8n-nodes-base.extractFromFile","position":[140,140],"parameters":{"options":{},"operation":"fromJson"},"typeVersion":1},{"id":"b20494d5-409c-47a0-9cba-ef5798a0d7cb","name":"Merge request data with installation settings","type":"n8n-nodes-base.merge","position":[300,0],"parameters":{"mode":"combine","options":{},"combineBy":"combineAll"},"typeVersion":3}],"active":true,"pinData":{"Bitrix24 Handler":[{"json":{"body":{"status":"L","AUTH_ID":"e393b96700763c9900668809000000b6e0e30725387b1a3ae59c6fafa9ee42e7a25d5e","PLACEMENT":"TASK_VIEW_TAB","member_id":"19acdffbcfadf692f61b677d3d824490","REFRESH_ID":"d312e16700763c9900668809000000b6e0e307f6a903a54b17e22adcad3eb5d2063806","AUTH_EXPIRES":"3600","PLACEMENT_OPTIONS":"{\"taskId\":\"10184\"}"},"query":{"LANG":"en","DOMAIN":"hgap.bitrix24.eu","APP_SID":"f1be8a08b159e4113606b5f6bfc8d210","PROTOCOL":"1"},"params":{},"headers":{"host":"orpheus-dev.h-gap.hu","accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7","origin":"https://hgap.bitrix24.eu","referer":"https://hgap.bitrix24.eu/","priority":"u=0, i","sec-ch-ua":"\"Not(A:Brand\";v=\"99\", \"Google Chrome\";v=\"133\", \"Chromium\";v=\"133\"","x-real-ip":"85.66.162.255","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36","content-type":"application/x-www-form-urlencoded","cache-control":"max-age=0","content-length":"305","sec-fetch-dest":"iframe","sec-fetch-mode":"navigate","sec-fetch-site":"cross-site","accept-encoding":"gzip, deflate, br, zstd","accept-language":"hu-HU,hu;q=0.9,en-US;q=0.8,en;q=0.7","x-forwarded-for":"85.66.162.255","sec-ch-ua-mobile":"?0","x-forwarded-proto":"https","sec-ch-ua-platform":"\"Windows\"","x-forwarded-scheme":"https","sec-fetch-storage-access":"active","upgrade-insecure-requests":"1"},"webhookUrl":"https://orpheus-dev.h-gap.hu/webhook/bitrix24/widgethandler.php","executionMode":"production"}}]},"settings":{"executionOrder":"v1"},"versionId":"72d7eac7-03cb-4792-8f6f-d190631e34f9","connections":{"Get Task Data":{"main":[[{"node":"Format Task Data","type":"main","index":0}]]},"Bitrix24 Handler":{"main":[[{"node":"Extract Credentials","type":"main","index":0}]]},"Check Event Type":{"main":[[{"node":"Is Installation?","type":"main","index":0}]]},"Format Task Data":{"main":[[{"node":"Task View Response","type":"main","index":0}]]},"Is Installation?":{"main":[[{"node":"If Installation finished","type":"main","index":0}],[{"node":"Read Installation Settings","type":"main","index":0},{"node":"Merge request data with installation settings","type":"main","index":0}]]},"Process Settings":{"main":[[{"node":"Has Valid Settings?","type":"main","index":0}]]},"Set Settings Data":{"main":[[{"node":"Create Settings File","type":"main","index":0}]]},"Register Placement":{"main":[[{"node":"Merge Installation info","type":"main","index":0}]]},"Extract Credentials":{"main":[[{"node":"Check Event Type","type":"main","index":0}]]},"Has Valid Settings?":{"main":[[{"node":"Get Task Data","type":"main","index":0}],[{"node":"Error Response","type":"main","index":0}]]},"Create Settings File":{"main":[[{"node":"Save Installation Settings","type":"main","index":0}]]},"Merge Installation info":{"main":[[{"node":"Installation Response","type":"main","index":0}]]},"If Installation finished":{"main":[[{"node":"Installation finished Response","type":"main","index":0}],[{"node":"Register Placement","type":"main","index":0},{"node":"Set Settings Data","type":"main","index":0}]]},"Read Installation Settings":{"main":[[{"node":"Extract Installation Settings","type":"main","index":0}]]},"Save Installation Settings":{"main":[[{"node":"Merge Installation info","type":"main","index":1}]]},"Extract Installation Settings":{"main":[[{"node":"Merge request data with installation settings","type":"main","index":1}]]},"Merge request data with installation settings":{"main":[[{"node":"Process Settings","type":"main","index":0}]]}}}