# WhatsApp AI Agent with Payments and CRM: n8n workflow template

> Started by another system calling it, and works across Gmail and Google Sheets. It puts Gemini behind a retrieval step, so answers are drawn from documents...

Source: https://millionrounds.com/workflow/whatsapp-ai-agent-with-payments-and-crm (Millionrounds; every figure on the page links to its filing or article)

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

# WhatsApp AI Agent with Payments and CRM

Started by another system calling it, and works across Gmail and Google Sheets. It puts Gemini behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 22 steps, 1 branch, 2 loops or waits: large, and worth reading before you trust it with anything live.

Large Calls a model: Gemini Retrieval

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fwhatsapp-ai-agent-with-payments-and-crm)

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

**1** Branch: places the flow splits

**2** Loops or waits

**2** Services it connects to

## The flow

Starts it 2 Model 7 Logic 5 Service 8

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

- 1 **Send Email** Gmail Tool *Service*
- 2 **Appointment CRM1** Google Sheets Tool *Service*
- 3 **Google Gemini Chat Model** Lm Chat Google Gemini *Model*
- 4 **Get many messages in Gmail** Gmail Tool *Service*
- 5 **Mark a message as read in Gmail** Gmail Tool *Service*
- 6 **Create a token in Stripe** Stripe Tool *Service*
- 7 **Postgres Chat Memory** Memory Postgres Chat *Model*
- 8 **WhatsApp Trigger** Webhook *Starts it*
- 9 **Google Gemini Chat Model1** Lm Chat Google Gemini *Model*
- 10 **AI Agent1** Agent *Model*
- 11 **Redirect Message Types** Switch *Logic*
- 12 **Image Explainer** Chain Llm *Model*
- 13 **Respond to Webhook** Respond To Webhook *Starts it*
- 14 **Download Audio** Http Request *Service*
- 15 **Download Video** Http Request *Service*
- 16 **Download Image** Http Request *Service*
- 17 **Wait** Wait *Logic*
- 18 **Analyze audio** Google Gemini *Model*
- 19 **Analyze video** Google Gemini *Model*
- 20 **Wait1** Wait *Logic*
- 21 **Format Response1** Set *Logic*
- 22 **Format Response** Set *Logic*

## How it's built

- **Starts on:** Another system calling it
- **Steps:** 22, with 1 branch, 2 loops or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Gmail, Google Sheets
- **Model:** Gemini
- **Retrieval:** Answers are drawn from documents you supply, not from the model alone

## Questions

What does it need to run?

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

What starts it?

It starts on another system calling it.

Does it use AI?

Yes. It calls Gemini. Its answers draw on documents you give it, not on the model alone. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 22 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 22 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%2Fwhatsapp-ai-agent-with-payments-and-crm)
- **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.

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

## Workflows like it

Also money admin, with the same services where possible, closest in size first.

- [**Extract and organize Colombian invoices with Gmail and OpenAI** 22 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/extract-and-organize-colombian-invoices-with-gmail-and-opena)
- [**Extract invoice data from Gmail PDFs** 22 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/extract-invoice-data-from-gmail-pdfs)
- [**Follow up on overdue invoices with OpenAI and Gmail** 22 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/follow-up-on-overdue-invoices-with-openai-and-gmail)
- [**Log email receipt data to Google Sheets with Gmail and OpenAI** 22 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/log-email-receipt-data-to-google-sheets-with-gmail-and-opena)
- [**Process and validate invoices from Gmail and forms with OpenAI** 22 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/process-and-validate-invoices-from-gmail-and-forms-with-open)
- [**Process emailed PDF invoices into QuickBooks bills with OpenAI** 22 steps · calls a model · Gmail](https://millionrounds.com/workflow/process-emailed-pdf-invoices-into-quickbooks-bills-with-open)
