Context

A pastry shop receives emails from potential clients asking for cakes. Every email is processed manually.

Problem

A manager reads each email by hand, finds the number of cakes, calculates the price, copies the commercial proposal template and replies to the client.

Solution

n8n workflow cake-order-automation: an AI agent determines whether the email is an order request and extracts the number of cakes as JSON. A commercial proposal is then created from a template automatically, and the client receives a reply with a link.

Process

  1. Prompt design — the agent returns JSON {is_order_request, cake_count}; the email body is passed into the prompt via an Expression.
  2. API integration — Gmail (trigger and reply), Google Drive (copy of the proposal template), Google Docs (value substitution).
  3. n8n workflow — Gmail Trigger (polling with a subject filter) → AI Agent → Edit Fields / Code → IF → Drive Copy file → Docs Update ({{total_price}}, {{cake_count}}) → Gmail Reply.

Results

Tech Stack

n8n, LLM (AI Agent), Gmail, Google Drive, Google Docs, Google Sheets

Screenshots / Workflow / Video

https://www.loom.com/share/52595b983c3844598c492a7c47ee84a6

изображение.png