← Back to Progress Timeline

API Integration (The Engine)

Seamlessly linking Steve's digital world.

The "10-Second Loop"

The core philosophy of the BackPocket OS is zero-friction approval. We achieve this by connecting the `Gmail API` directly to the `WhatsApp API`.

1. Email Ingest (Gmail API)

A background worker securely monitors the inbox. When a client emails "Can I get a quote for a deck?", the system flags it as Tier 1 (Action Required).

2. The Draft Engine (Gemini + MCP)

Gemini analyzes the intent and drafts a response in the "Cherry Style" voice. It now leverages the new Model Context Protocol (MCP) to seamlessly call isolated AI tools like `mcp_servers/quotes.mjs` and `mcp_servers/pipeline.mjs` for exact data retrieval.

{ "tier_label": "T1", "summary": "Client seeking deck quote.", "draft_reply": "Absolutely mate. I can swing by Tuesday...", "mcp_server": "quotes.mjs" }

3. The Action Push (WhatsApp / Whapi)

Instead of logging into a CRM, Steve receives an interactive WhatsApp message. He reads the summary and clicks a button to approve or reject. If approved, the OS handles the actual Gmail sending.