Automation library · Chat assistants

AI-powered credit card recommendation system with OpenAI

Started by an incoming Telegram message, and works across Google Sheets and Telegram. It hands the judgement calls to OpenAI. 26 steps, 3 branches: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAI

26 stepsLarge: read it before trusting it with anything live
3Branches: places the flow splits
0Loops or waits
2Services it connects to

The flow

Starts it 1Model 1Logic 17Service 7

The steps in the order they run, from what starts it.

  1. 1Trigger: Incoming Telegram MessageTelegram triggerStarts it
  2. 2Extract Telegram Message TextCodeLogic
  3. 3Lookup User State (Google Sheet)Google SheetsService
  4. 4Merge Incoming Message with StateMergeLogic
  5. 5Merge Updated State for Next StepMergeLogic
  6. 6Check if User Exists in DBIfLogic
  7. 7Carry Forward Previous AnswersSetLogic
  8. 8Map & Format Answer for Google SheetCodeLogic
  9. 9Insert New User into Google SheetGoogle SheetsService
  10. 10Update Answer in Google SheetGoogle SheetsService
  11. 11Extract Metadata from AnswerSetLogic
  12. 12Determine Next Quiz QuestionCodeLogic
  13. 13Append Full User State for ProcessingCodeLogic
  14. 14Check if More Questions RemainingSwitchLogic
  15. 15Is Q7 Answered?IfLogic
  16. 16TelegramTelegramService
  17. 17Fetch CardsGoogle SheetsService
  18. 18Clean Q1–Q7 InputsSetLogic
  19. 19Get Question TextCodeLogic
  20. 20Merge User Profile & Card DatasetMergeLogic
  21. 21Send QuestionTelegramService
  22. 22Build GPT Prompt with User Profile & Card DataCodeLogic
  23. 23Send Prompt to GPT for Card MatchingOpen AiModel
  24. 24Clean GPT Output & Split into SectionsCodeLogic
  25. 25Format GPT Card Recommendations for TelegramCodeLogic
  26. 26Send Card Recommendations to TelegramTelegramService

How it's built

Starts on
An incoming Telegram message
Steps
26, with 3 branches
Size
Large: read it before trusting it with anything live
Connects to
Google Sheets, Telegram
Model
OpenAI

Questions

What does it need to run?

An n8n account, plus your own Google Sheets and Telegram accounts, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an incoming Telegram message.

Does it use AI?

Yes. It calls OpenAI. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 26 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

Before you run it

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 26 steps before you point it at anything that matters.