Skip to content
NEWMarketplace and your team: sell what you build, and get plans and changes that are tested before you see them. See what is new

Library / Email Automation

Email Automation

Create purchase orders from Gmail using Groq LLM, Airtable, and Google Sheets

When you run it, it handles email with Groq and OpenAI / ChatGPT using Groq, Airtable, Gmail, Google Sheets.

What it does

## Workflow Overview: Freeform Text to Purchase Order Engine This workflow acts as an automated Procurement Triage Engine for your purchasing pipeline. It extracts unstructured purchase requests from Gmail, uses AI to parse the required items, and performs fuzzy matching against an Airtable catalog to enforce contract pricing and preferred-vendor rankings. By automating PO generation for matched items and diverting unknown requests to human triage, it ensures rapid, compliant procurement. ## Setup Steps * Start Workflow — Trigger the workflow to check for recent communications. * Fetch Emails — Retrieve unread purchase requests and filter out previously processed messages using timestamps. * Format Data — Standardize the raw text and extract the requester's contact information. * LLM: Parse Request — Transform unstructured text into a structured JSON list containing items, quantities, and urgency flags. * Airtable: Fetch Catalog — Load your approved items, standard prices, contract rates, and preferred vendor rankings. * Match & Price Logic — Cross-reference requests with the catalog, apply preferred-vendor score bonuses, and enforce contract pricing. * Router: Evaluate Status — Split the operational path based on whether the items were successfully matched or require human review. * Create Auto-PO — Generate an official approved Purchase Order record directly in the Airtable ERP for fully matched requests. * Sheets: Log Approval — Record the transaction details, matched SKUs, and final costs into a centralized audit log.

The steps

  1. Start Workflow
  2. Code: Get Last Run Time
  3. Gmail: Fetch Emails
  4. Set: Format Gmail Data
  5. LLM: Parse Request
  6. Model: Groq LLM
  7. Parse: Structured JSON
  8. Set: Extract AI Output
  9. Airtable: Fetch Catalog
  10. Code: Match & Price Logic
  11. Router: Evaluate Status
  12. Sheets: Log Approval
  13. Airtable: Log Triage
  14. Airtable: Log Urgent

15 steps in total.

Similar automations