The Gmail Integration allows SendBot to operate as an automated real-time email assistant. Incoming emails are processed instantly, triggering your custom bot flows, qualifying leads, and sending direct email replies.

Key Features

  • Real-Time Push Notifications: Powered by Google Cloud Pub/Sub, incoming emails trigger bot execution within milliseconds without polling.
  • Automated Bot Flow Execution: Automatically parse subject, body text, and attachments, feeding them directly into your Studio bot or AI agent.
  • Direct Email Replies: Send responses directly from your connected Gmail or Google Workspace address, preserving thread history.
  • Automatic Watch Renewal: Google Pub/Sub notifications expire after 7 days. SendBot automatically renews active subscriptions in the background so your bot remains 100% online.

How It Works

  1. Inbound Email: A customer or lead sends an email to your connected Gmail address.
  2. Pub/Sub Webhook Trigger: Google Cloud Pub/Sub sends an instant push notification to SendBot (POST /v3/integrations/gmail/webhook).
  3. Bot Flow Execution: SendBot processes the message content, matches your workspace bot, and executes the configured flow logic (e.g. AI agent, lead qualification, or FAQ).
  4. Outbound Response: Responses generated by the bot or live support team are delivered using your authenticated Gmail credentials.

Setup Instructions

Step 1: Connect Your Google Account

  1. In the SendBot Studio, open your bot project and navigate to Publish > Gmail.
  2. Click Connect Gmail Account and authorize SendBot via Google OAuth2.

Step 2: Enable Inbound Watch

  1. Select your authenticated account in the dropdown.
  2. Click Start Watch to enable real-time notifications.
  3. You will see an operational status badge indicating Watch active until [Date].

Requirements & Troubleshooting

This error occurs if the authenticated Google account does not have an active Gmail mailbox.
  • Google Workspace Users: Ensure your administrator has enabled the Gmail service for your user account.
  • Self-Hosted GCP Projects: Ensure that the Gmail API (gmail.googleapis.com) is enabled in the Google Cloud Console API Library for your project.
No. SendBot runs a background worker (gmailWatchRenewal) that automatically renews all active watches before they expire.
Yes. SendBot never stores your Google password. Connections use encrypted OAuth2 refresh tokens handled with strict workspace isolation.