# AI-powered credit card recommendation system with OpenAI: n8n workflow

> Started by an incoming Telegram message, and works across Google Sheets and Telegram. It hands the judgement calls to OpenAI.

Source: https://millionrounds.com/workflow/ai-powered-credit-card-recommendation-system-with-openai (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Chat assistants](https://millionrounds.com/workflows?category=Chat+assistants#library)

# 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.

Large Calls a model: OpenAI

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fai-powered-credit-card-recommendation-system-with-openai)

**26 steps** Large: read it before trusting it with anything live

**3** Branches: places the flow splits

**0** Loops or waits

**2** Services it connects to

## The flow

Starts it 1 Model 1 Logic 17 Service 7

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

- 1 **Trigger: Incoming Telegram Message** Telegram trigger *Starts it*
- 2 **Extract Telegram Message Text** Code *Logic*
- 3 **Lookup User State (Google Sheet)** Google Sheets *Service*
- 4 **Merge Incoming Message with State** Merge *Logic*
- 5 **Merge Updated State for Next Step** Merge *Logic*
- 6 **Check if User Exists in DB** If *Logic*
- 7 **Carry Forward Previous Answers** Set *Logic*
- 8 **Map & Format Answer for Google Sheet** Code *Logic*
- 9 **Insert New User into Google Sheet** Google Sheets *Service*
- 10 **Update Answer in Google Sheet** Google Sheets *Service*
- 11 **Extract Metadata from Answer** Set *Logic*
- 12 **Determine Next Quiz Question** Code *Logic*
- 13 **Append Full User State for Processing** Code *Logic*
- 14 **Check if More Questions Remaining** Switch *Logic*
- 15 **Is Q7 Answered?** If *Logic*
- 16 **Telegram** Telegram *Service*
- 17 **Fetch Cards** Google Sheets *Service*
- 18 **Clean Q1–Q7 Inputs** Set *Logic*
- 19 **Get Question Text** Code *Logic*
- 20 **Merge User Profile & Card Dataset** Merge *Logic*
- 21 **Send Question** Telegram *Service*
- 22 **Build GPT Prompt with User Profile & Card Data** Code *Logic*
- 23 **Send Prompt to GPT for Card Matching** Open Ai *Model*
- 24 **Clean GPT Output & Split into Sections** Code *Logic*
- 25 **Format GPT Card Recommendations for Telegram** Code *Logic*
- 26 **Send Card Recommendations to Telegram** Telegram *Service*

## 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.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fai-powered-credit-card-recommendation-system-with-openai)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Google Sheets](https://millionrounds.com/workflows?service=Google+Sheets#library)[Telegram](https://millionrounds.com/workflows?service=Telegram#library)

## Workflows like it

Also chat assistants, with the same services where possible, closest in size first.

- [**Create personalized news digests with OpenAI and SerpAPI** 26 steps · calls a model · Telegram, n8n data table](https://millionrounds.com/workflow/create-personalized-news-digests-with-openai-and-serpapi)
- [**Generate move-out deposit statements with Gmail** 26 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/generate-move-out-deposit-statements-with-gmail)
- [**Manage dental patients with Telegram and OpenAI** 26 steps · calls a model · Google Sheets, Slack](https://millionrounds.com/workflow/manage-dental-patients-with-telegram-and-openai)
- [**Smart email manager with Gmail and OpenAI** 26 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/smart-email-manager-with-gmail-and-openai)
- [**Telegram chatbot with OpenAI** 26 steps · calls a model · Google Sheets, Supabase vectors](https://millionrounds.com/workflow/telegram-chatbot-with-openai-2)
- [**Telegram personal AI agent with Gemini and Airtable** 26 steps · calls a model · Airtable, Telegram](https://millionrounds.com/workflow/telegram-personal-ai-agent-with-gemini-and-airtable)
