Email Automation
Answer Gmail support emails from your docs with Gemini and Slack
When you run it, it handles email with Google Gemini using Data Table, Gmail, Slack.
What it does
## Answer support email from your own docs, and escalate what they miss A retrieval workflow with no floor under it always answers, because the nearest paragraph is always something. This one measures how close your docs got, and refuses rather than improvises. ### How it works The indexing branch runs when you run it. It reads your sitemap - including the shape, where every is another sitemap - fetches each page, cuts the article body into overlapping passages, embeds them with Gemini and stores them in a Data Table. Vectors are normalised first: gemini-embedding-001 returns a unit vector at 3072 dimensions and an unnormalised one at 768, so a floor set on the raw numbers would reject everything. The answering branch starts on a Gmail label. It strips the quoted history, embeds what is left, and scores it against every stored passage. Below min_score it stops there. Above it, one model drafts a reply from those passages only and a second audits that draft claim by claim. A reply survives both or it does not go. What survives becomes a Gmail draft in the customer's own thread. What does not becomes a Slack message naming the gap, and a row that turns into your docs backlog. ### Setup 1. A Header Auth credential holding x-goog-api-key and a Google AI Studio key, on both embedding nodes. A Gemini credential on the model node - the same key works. 2. Gmail and Slack credentials, and a Gmail label the questions land on. 3. A Data Table called docs_index with columns chunk_key, url, title, text, vec and run_id. 4. A Data Table called support_questions with columns asked_on, question, status, best_score and note. 5. Put your sitemap in Indexing Settings, run that branch once, then send yourself a question.
The steps
- Index The Docs When You Say So
- Indexing Settings
- Fetch The Sitemap
- Read The Sitemap
- Is It An Index Of Sitemaps?
- Fetch Each Child Sitemap
- Read The Child Sitemaps
- Gather Every Page URL
- Pick The Pages Worth Indexing
- Fetch Each Page
- Turn Each Page Into Passages
- Embed Every Passage
- Normalise The Vectors
- Store The Passages
33 steps in total.
Similar automations
Email AutomationAnswer customer support emails in Gmail with Google Docs and Google Gemini26 stepsChatbots & Messaging BotsAnswer Telegram support questions using Google Docs and Claude Sonnet11 stepsEmail AutomationRun procurement approvals with Google Sheets, Gmail, Google Docs, and Slack32 stepsRAG & Knowledge BasesAnswer support questions from your docs with Telegram, OpenRouter and pgvector28 steps