Automation library · AI assistants

Retrieve and answer Gmail email queries with Llama and Qdrant

Started by an arriving email, and works across Gmail and Google Drive. It hands the judgement calls to OpenAI. 21 steps, 1 branch: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAI

21 stepsLarge: read it before trusting it with anything live
1Branch: places the flow splits
0Loops or waits
2Services it connects to

The flow

Starts it 2Model 1Logic 8Service 10

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

  1. 1Google Drive TriggerGoogle Drive triggerStarts it
  2. 2Gmail TriggerGmail triggerStarts it
  3. 3Download fileGoogle DriveService
  4. 4Fetch Collection NameCodeLogic
  5. 5Fields PreparationSetLogic
  6. 6Extract from FileExtract From FileService
  7. 7Check If Collection ExistsQdrantService
  8. 8Query EmbeddingHttp RequestService
  9. 9Collection Name FetchCodeLogic
  10. 10Data FetchSetLogic
  11. 11IfIfLogic
  12. 12MergeMergeLogic
  13. 13Data PreprocessingCodeLogic
  14. 14Delete CollectionQdrantService
  15. 15Create CollectionQdrantService
  16. 16Similarity SearchQdrantService
  17. 17Embedding GenerationHttp RequestService
  18. 18Message a modelOpen AiModel
  19. 19Upsert PointsQdrantService
  20. 20Email FormatSetLogic
  21. 21Send Repy EmailGmailService

How it's built

Starts on
An arriving email
Steps
21, with 1 branch
Size
Large: read it before trusting it with anything live
Connects to
Gmail, Google Drive
Model
OpenAI

Questions

What does it need to run?

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

What starts it?

It starts on an arriving email.

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 21 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 21 steps before you point it at anything that matters.