AI-Powered Automation: Connect ChatGPT to n8n

Published: March 21, 2025

Video thumbnail

Seamlessly integrate with Python processing, APIs, Databases, Google Apps Script, Sheets and more for real-time updates, workflow automation, reports, PDF & decks

n8n Automation

Check out dedicated Custom GPT section on REX AI Co Analyst site

Automations

n8n's extensive workflow nodes, routing nodes, connectors, and AI nodes make it a powerful tool for automation and apps - AI-enabled or otherwise. Handle processing within n8n or connect to any external system or custom code. Self-hosted version is free - with unlimited executions, workflows, and access to community nodes.

Connect n8n to any User Interface

Connect n8n to any UI, including ChatGPT. Can also be easily connected to a custom UI like AI Co-Analyst (React JS) at tigzig.com… or simply use native n8n UI

ChatGPT Advantage

Simple to set up, and provides off-the-shelf access to GPT-4o capabilities: AI Agent, Mobile App, Web Search, Realtime Voice, Python Code Interpreter...

How to Connect n8n to ChatGPT

Update custom actions in Custom GPT using an OpenAPI schema to connect to an n8n workflow. Any LLM /AI coder can generate one -example schema shared in comments

Use Cases

Update any backend system accessible via an API. Example shared - Postgres DB / Google Sheets

Example: On-the-fly Markdown to PDF via FastAPI server

Apps Script enables JavaScript-based processing, deployed as an API endpoint-a powerful tool. Example: generate formatted PDF & Slides, then email them out

Example - simple update via Edit Node. Combined with Code node and Routing nodes, you can do a fairly complex processing within n8n

Example shared - connect to any database on-the-fly and review records. Uses a custom FastAPI server - you could also use a n8n Switch node, routing to MySQL/Postgres nodes

Enhance content with LLM + web searches. Example shared-structure rough user input into a coherent data row and suggest business use cases

Note: sharing a small set of common use cases. Also, multiple ways to do these - depends on the use case.

Try it/ Replicate it

Custom GPT, n8n schema, source code, and resource links: n8n Workflows & Schemas. Video has demo + architecture and workflow walkthrough: https://lnkd.in/gjV_z8UU

Build AI Co-Analyst Apps for Analytics

Explore 15+ open-source AI analytics apps at tigzig.com

Source Codes & Resources

Custom GPT

Feel free to try out the markdown-to-PDF functionality and Google Sheets updates. Google Sheet available at https://docs.google.com/spreadsheets/d/1LPV1pZb4Bc3TMVAYqqH8MCNU55Ew8oB1K8MZMu2cfp0/edit?gid=0#gid=0. You can also connect to any remote database by providing DB credentials-get an instant free Postgres DB at neon.tech.

n8n Workflow and OpenAPI Schema for Custom GPT

n8n Workflows & Schemas

FastAPI Server: Markdown-to-PDF

Markdown to PDF Server

No environment variables required. After deployment, you just need to update the URL in the HTTP request node as per the schema shared above.

FastAPI Server: Database Connection

FastAPI DB Server

No environment variables required for simple database connectivity in this workflow. After deployment, you just need to update the URL in the HTTP request node as per the schema shared above.

Automation with Google Apps Script: Source Code & Video Guide

See video guide: https://lnkd.in/gjV_z8UU

You can directly jump to the Google Apps Script section. Once deployed, you just need to update the web service URL in the n8n HTTP request node as per the schema shared above.

🔗
Blog Migration Notice: Some links or images in earlier posts may be broken. View the original post on the old blog site.