See llms.txt for all machine-readable content.

Back to Templates

Run a Gemini Live voice support assistant with Google Drive and Sheets

Quick overview

This workflow provides a Gemini Live assistant for an e-commerce store by generating single-use Gemini ephemeral tokens, loading a knowledge base from a Google Drive folder, and handling tool calls to read order status, create return/exchange requests, log complaints to Google Sheets and notify the owner via Gmail

How it works

  1. Receives a POST webhook request to create a new Gemini Live voice session.
  2. Applies daily and per-IP rate limits, then lists and downloads supported knowledge files from a specified Google Drive folder and combines them into a single system prompt.
  3. Builds a Gemini Live session configuration (voice, model, and tool schema), signs the session with an HMAC, and requests a single-use ephemeral token from the Gemini API.
  4. Returns the token, model, WebSocket URL, signed session metadata, and tool-callback URL to the client via the webhook response.
  5. Receives tool-call webhook requests from the Gemini Live client, validates the HMAC signature and expiry, and enforces a per-session tool-call limit.
  6. For authorized tool calls, reads order data from Google Sheets to return order status, verifies and appends return/exchange requests to Google Sheets and emails the owner, logs complaints to Google Sheets and emails the owner, or sends owner notifications for unanswered questions.
  7. Responds to the tool-call request with a JSON result (or returns an error for missing info, rate limits, unknown tools, or unauthorized calls).

Setup

  1. Add an HTTP Header Auth credential containing your Gemini API key with header name x-goog-api-key.
  2. Connect Google Drive OAuth2, Google Sheets OAuth2, and Gmail OAuth2 credentials used by the workflow.
  3. Update the Business Settings values, including owner email, Google Drive folder ID, Google Sheet ID, public tool URL, and a long random HMAC secret.
  4. Create or update the Google Sheet with tabs and columns for Siparisler, Iadeler, and Sikayetler matching the fields the workflow reads/writes.
  5. Copy the production webhook URLs for /webhook/gemini-live-token and /webhook/gemini-live-tool into your client application and restrict allowedOrigins on both webhooks to your site domain.