# Multi-platform AI sales agent with RAG and CRM: n8n workflow

> Started by an incoming WhatsApp message, and works across Airtable, Google Calendar, Google Drive, Telegram and one other.

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

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

# Multi-platform AI sales agent with RAG and CRM

Started by an incoming WhatsApp message, and works across Airtable, Google Calendar, Google Drive, Telegram and one other. It puts Gemini and OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 71 steps, 5 branches: large, and worth reading before you trust it with anything live.

Large Calls a model: Gemini, OpenAI Retrieval

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

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

**5** Branches: places the flow splits

**0** Loops or waits

**5** Services it connects to

## The flow

Starts it 11 Model 17 Logic 14 Service 18

The steps in the order they run, from what starts it. The first 60 of 71.

- 1 **When chat message received** Chat trigger *Starts it*
- 2 **Postgres Chat Memory** Memory Postgres Chat *Model*
- 3 **Consultation Agent** Tool Workflow *Model*
- 4 **CRM Agent** Tool Workflow *Model*
- 5 **Telegram Trigger** Telegram trigger *Starts it*
- 6 **Facebook Trigger** Webhook *Starts it*
- 7 **Instagram Trigger** Webhook *Starts it*
- 8 **WhatsApp Trigger** Whats App trigger *Starts it*
- 9 **When clicking ‘Execute workflow’** Manual trigger *Starts it*
- 10 **Default Data Loader** Document Default Data Loader *Model*
- 11 **Gemini** Embeddings Google Gemini *Model*
- 12 **When Executed by Another Workflow** Execute Workflow trigger *Starts it*
- 13 **get_schema** Airtable Tool *Service*
- 14 **list_records** Airtable Tool *Service*
- 15 **Window Buffer Memory** Memory Buffer Window *Model*
- 16 **create_opportunity** Airtable Tool *Service*
- 17 **update_opportunity** Airtable Tool *Service*
- 18 **create_contact** Airtable Tool *Service*
- 19 **update_contact** Airtable Tool *Service*
- 20 **Create Event with Attendee** Google Calendar Tool *Service*
- 21 **Get Events** Google Calendar Tool *Service*
- 22 **Delete Event** Google Calendar Tool *Service*
- 23 **Update Event** Google Calendar Tool *Service*
- 24 **OpenAI Chat Model** Lm Chat Open Ai *Model*
- 25 **OpenAI Chat Model1** Lm Chat Open Ai *Model*
- 26 **OpenAI Chat Model2** Lm Chat Open Ai *Model*
- 27 **OpenAI Chat Model3** Lm Chat Open Ai *Model*
- 28 **Embeddings OpenAI** Embeddings Open Ai *Model*
- 29 **Set Message6** Set *Logic*
- 30 **Sales Agent** Agent *Model*
- 31 **Route Message** Switch *Logic*
- 32 **Respond to Webhook - facebook post** Respond To Webhook *Starts it*
- 33 **Respond to Webhook - facebook get** Respond To Webhook *Starts it*
- 34 **Respond to Webhook - instagram post** Respond To Webhook *Starts it*
- 35 **Respond to Webhook - instagram get** Respond To Webhook *Starts it*
- 36 **Get Lead Info** Airtable *Service*
- 37 **Download file** Google Drive *Service*
- 38 **PGVector** Vector Store PGVector *Model*
- 39 **CRM Assistant** Agent *Model*
- 40 **Calendar Agent** Agent *Model*
- 41 **Company Database** Tool Vector Store *Model*
- 42 **Vector Database** Vector Store PGVector *Model*
- 43 **No Operation, do nothing** No Op *Logic*
- 44 **Switch1** Switch *Logic*
- 45 **Set Message** Set *Logic*
- 46 **Get Audio1** Telegram *Service*
- 47 **Reply to user** Telegram *Service*
- 48 **If not echo** If *Logic*
- 49 **If not echo1** If *Logic*
- 50 **Route Messages** Switch *Logic*
- 51 **Response** Set *Logic*
- 52 **Try Again** Set *Logic*
- 53 **Success** Set *Logic*
- 54 **Try Again1** Set *Logic*
- 55 **Update Agent Details** Set *Logic*
- 56 **Send message (Whatsapp)** Whats App *Service*
- 57 **Send message (facebook)** Facebook Graph Api *Service*
- 58 **Send message (instagram)** Http Request *Service*
- 59 **Send message (embedded)** Set *Logic*
- 60 **Send message (telegram)** Telegram *Service*

## How it's built

- **Starts on:** An incoming WhatsApp message
- **Steps:** 71, with 5 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Airtable, Google Calendar, Google Drive, Telegram, WhatsApp
- **Model:** Gemini, OpenAI
- **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 Airtable, Google Calendar, Google Drive, Telegram and WhatsApp accounts, and a key for Gemini and OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an incoming WhatsApp message.

Does it use AI?

Yes. It calls Gemini and OpenAI. 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 71 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 71 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%2Fmulti-platform-ai-sales-agent-with-rag-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.

[Airtable](https://millionrounds.com/workflows?service=Airtable#library)[Google Calendar](https://millionrounds.com/workflows?service=Google+Calendar#library)[Google Drive](https://millionrounds.com/workflows?service=Google+Drive#library)[Telegram](https://millionrounds.com/workflows?service=Telegram#library)[WhatsApp](https://millionrounds.com/workflows?service=WhatsApp#library)

## Workflows like it

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

- [**Automated multi-platform sales agent with Gemini** 75 steps · calls a model · Google Calendar, Postgres](https://millionrounds.com/workflow/agente-de-ventas-automatizado-multiplataforma-with-gemini)
- [**Build a multi-functional Telegram bot with Gemini** 65 steps · calls a model · Google Calendar, Google Docs](https://millionrounds.com/workflow/build-a-multi-functional-telegram-bot-with-gemini)
- [**Build a WhatsApp assistant with Google Suite** 63 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/build-a-whatsapp-assistant-with-google-suite)
- [**Automated HR Service System with WhatsApp and OpenAI** 57 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/automated-hr-service-system-with-whatsapp-and-openai)
- [**Unified business orchestrator with Gemini and Notion** 85 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/unified-business-orchestrator-with-gemini-and-notion)
- [**Automate salon appointment management with WhatsApp and OpenAI** 56 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/automate-salon-appointment-management-with-whatsapp-and-open)
