Search documentation

Search for a topic, a control, or an event type.

    Docs / Workflows / Integrations / Gmail

    Gmail

    Read, send and organise mail in a connected Gmail mailbox.

    What you can do

    Each Gmail integration’s page in OAIZ shows these uses, with its events and its read and write actions, under What you can do with Gmail.

    Reply drafts
    Draft a reply to each customer question for someone to check and send.
    Invoice reading
    Read invoice emails and pass each amount to the next job.
    Inbox clean-up
    Label and archive newsletters, so the inbox shows only mail that needs an answer.

    Connection scope

    Each connection uses one Google account’s Gmail mailbox. Message IDs, draft IDs and label IDs refer to different objects. A draft remains unsent until Send Draft runs.

    Connecting

    Choose Gmail in OAIZ and authorize the Google account whose mailbox the workflows should use. If this service is being added to an existing Google connection, use the same Google account.

    The sender must belong to the connected mailbox or be one of its verified send-as aliases.

    Google permissions

    OAuth scopes are the permissions OAIZ requests from Google. Each connection asks for account identity and the permissions for its selected service. Adding another Google service requests its additional permissions on the same account. Google’s consent screen shows the exact access before you approve.

    Requested OAuth scopes
    openid
    https://www.googleapis.com/auth/userinfo.email
    https://www.googleapis.com/auth/gmail.modify
    openid
    Identify the Google account that owns the shared connection.
    userinfo.email
    Show the connected Google account’s email address in OAIZ.
    gmail.modify
    Read messages and drafts, send email, manage messages and labels, list verified send-as addresses, and read mailbox changes that start workflows.

    Read actions

    Get Email and Get Draft limit message bodies with maxBodyLength, which defaults to 100,000 characters. Attachment downloads are optional.

    List Labels
    List Gmail labels with their IDs, names, and types.
    Get Email
    Read a message’s content and optionally download its attachments.
    List Emails
    List emails with label filtering and pagination.
    Search Emails
    Search emails using Gmail search syntax with pagination.
    List Send-As Aliases
    List the mailbox’s verified sender addresses.
    Get Draft
    Read a draft’s content and optionally download its attachments.
    List Drafts
    List drafts with optional Gmail search syntax and pagination.

    Write actions

    Send Email
    Send a plain-text or HTML message, optionally as a reply in a thread.
    Create Draft
    Save an unsent plain-text or HTML message, optionally as a reply in a thread.
    Add Labels
    Add labels to Gmail messages.
    Remove Labels
    Remove labels from Gmail messages.
    Send Draft
    Send an existing Gmail draft to its recipients.
    Mark as Read
    Mark Gmail messages as read.
    Mark as Unread
    Mark Gmail messages as unread.
    Create Label
    Create a Gmail label.
    Delete Label
    Delete a Gmail label.
    Move to Trash
    Move Gmail messages to trash.
    Restore from Trash
    Restore Gmail messages from trash.

    Events

    The mailbox publishes received, sent, read, archived and deleted email events, draft creation and label changes. These events carry message data and IDs for later actions. Self-addressed Gmail messages labeled SENT do not trigger email-received workflows. Test from another account.

    Google data use and removal

    The business customer controls workflows using the connected account. Google data can become input to an action that uses AI, such as LLM call, Agent or Decision. OAIZ sends that input to the LLM provider or TypeSafe AI decision engine used for the action to produce the requested output. OAIZ does not use Google data to train, fine-tune or improve AI models. OAIZ does not sell Google data or share it for advertising.

    OAIZ stores connection credentials while services are connected. Google data can also be stored in workflow events, execution history and files. Removing a service does not erase these retained records. The privacy policy and Data Processing Agreement explain storage, sharing, retention and deletion. Contact the business customer or support@oaiz.io to request deletion of retained data.

    Removing one Google service stops its OAIZ actions and subscriptions. Other services on the same account keep the shared connection and accumulated Google permissions. Removing the final service deletes the stored credential and requests revocation at Google. The disconnect result reports whether Google confirmed revocation.

    OAIZ’s use and transfer of Google API data follows Google’s Limited Use requirements. For Gmail, Google Calendar and Google Drive, OAIZ also follows the additional requirements of the Google Workspace API User Data and Developer Policy described in the privacy policy.