InTouch Hub · Blue Isle Software

RFQ Triage (Gmail → Sheets → Drive)

Triage incoming RFQ emails. AI-extracts customer/area/qty/material/processes/due, files attachments to a per-RFQ Drive folder, appends to a Sheets quote log, auto-replies to the customer in thread with a reference number, and notifies the estimator. Processes one RFQ per scheduled run.

Provided free and as is, without warranty of any kind — including merchantability, fitness for a particular purpose, and the accuracy or completeness of any result. See the licence. You are responsible for checking what this produces before relying on it.

aidriveemailestimatingextractgmaillogmachine-shopmanufacturingmessagequoterequestrfqruntimeenvschedulesignaturestatustracker

rfq-triage

Pulls one unprocessed RFQ email per scheduled run, files attachments to a per-RFQ Drive folder, has Claude extract customer/qty/material/processes/due/urgency from the message body, appends a row to a Sheets quote log, auto-replies to the customer in-thread with a reference number, notifies the estimator, and relabels the message.

Use case

A small machine shop receives RFQs by email. Without automation, someone has to read each one, save the drawings somewhere sensible, type the customer + qty + due date into the quote tracker, send an acknowledgment, and forward it to the estimator. This workflow does all of it. Schedule it every 5 minutes; backlog catches up automatically.

Setup

  1. Credentials (Credentials view):
  2. google-workspace — Google Workspace service-account JSON with domain-wide delegation
  3. claude-api — API key for any supported AI provider (Anthropic, OpenAI, Gemini, Mistral, Ollama or OpenRouter)
  4. Runtime environment (Runtime Environments view):
  5. bash — InTouch auto-creates this on Linux/macOS install from /bin/bash. Must include bash, awk, grep, cut, tr, mktemp, date, python3, and the gog CLI on PATH.
  6. Windows: InTouch auto-creates powershell and command prompt instead. To run this workflow on Windows: install Git Bash or WSL and add a bash runtime env in InTouch pointing at it (e.g. C:\Program Files\Git\bin\bash.exe), OR change runtimeEnvName: "bash" to "powershell" in workflow.iml and rewrite the script blocks in PowerShell.
  7. Gmail prep:
  8. Create label RFQ
  9. Create label processed
  10. Create a filter that auto-applies RFQ to inbound customer RFQ emails (by sender domain, by quote request / RFQ in subject, or by forwarding from [email protected])
  11. Drive prep:
  12. Create a parent folder for RFQs (any name)
  13. Copy its folder ID from the URL: https://drive.google.com/drive/folders/<THIS_IS_THE_ID>
  14. Sheets prep:
  15. Create a sheet with tab QuoteLog and 11 columns: ref_id | received_at | customer | from_email | project | qty | material | processes | due_date | urgency | status
  16. Copy the spreadsheet ID from the URL
  17. Edit workflow.iml — replace the four placeholders:
  18. <<RFQ_LABEL>>RFQ
  19. <<RFQ_PARENT_FOLDER_ID>> → the Drive folder ID
  20. <<QUOTE_LOG_SHEET_ID>> → the Sheet ID
  21. <<ESTIMATOR_EMAIL>> → the internal estimator's email
  22. <<SHOP_NAME>> → company name for the auto-reply signature
  23. Schedule the workflow every 5 minutes

Pipeline

  1. intakeruntimeenv (bash + gog). Finds the oldest message labeled RFQ without processed, fetches it as --format full --plain TSV, parses headers + body + attachment rows, creates a dated subfolder under the RFQ parent, downloads each attachment and re-uploads it to Drive, emits a JSON blob.
  2. extractanthropic (claude-sonnet-4-6). Parses the JSON blob into structured fields: customer, project, qty, material, processes, due, urgency, complexity. Returns strict JSON.
  3. dispatchruntimeenv (bash + gog + python3). Appends a row to the Sheets quote log, sends an in-thread auto-reply to the customer with a RFQ-YYYYMMDD-HHMMSS reference, sends a separate digest to the estimator, then applies processed and removes RFQ on the original message.

If intake finds no new RFQ, the rest of the pipeline exits cleanly with no Sheets write, no emails, no API spend beyond one Anthropic call to confirm "empty."

What runs per scheduled fire

gmail messages search "label:RFQ -label:processed" --max 1
        ↓ message ID
gmail get --format full --plain
        ↓ headers + body + attachments
drive mkdir <date>_<subject> --parent <RFQs folder ID>
        ↓ subfolder ID
gmail attachment + drive upload (per attachment)
        ↓ JSON blob (message_id, thread_id, from, subject, body, folder, attachments[])
anthropic extract
        ↓ structured RFQ fields
sheets append QuoteLog!A:K <11 values>
gmail send --thread-id <thread> (customer reply)
gmail send (estimator notification)
gmail messages modify --add processed --remove RFQ

Customization

Verified

The gog flag names (--parent, --out, --thread-id, --add/--remove, --reply-to-message-id) are all confirmed against the bundled gog v0.19.0 (2026-06-01). The gmail get --plain TSV shape and the drive upload/mkdir --plain output keys should be re-verified on first run against your Workspace account. If the bundled gog ever moves to a new major version, re-verify before promoting.

Source

See workflow.iml.

AI provider

Any supported AI provider works here. This template ships configured for the anthropic tool; swap that task's tool to anthropic, openai, gemini, mistral, ollama or openrouter to use the provider you already have, and point its credential at your own key. The step is a plain summarise/classify call — nothing in it is vendor specific. See requires.ai in the manifest.