Skip to main content

Gmail

google

Version: 1.5
Updated: June 26, 2024

Interact with filters, mail messages, and attachments in Google Mail.

Actions​

  • Add Filter (Containment) - Creates a filter. Note: you can only create a maximum of 1,000 filters.
  • Authorize DO NOT USE IN PLAYBOOK (Enrichment) - Authorize access to Gmail. This should only be run once and not from Playbook.
  • Confirm DO NOT USE IN PLAYBOOK (Enrichment) - Confirm access to Gmail. This should only be run once and not from Playbook.
  • Delete Filter (Containment) - Immediately and permanently deletes the specified filter.
  • Delete Mail (Containment) - Immediately and permanently deletes the specified message. This operation cannot be undone.
  • Get Attachment (Enrichment) - Gets the specified message attachment.
  • Get Mail (Enrichment) - Gets the specified message.
  • Get Thread (Enrichment) - Gets the specified thread.
  • Gmail Daemon (Daemon) - Automatically retrieve all unread messages in the inbox and mark them as read.
  • List Filters (Enrichment) - Lists the message filters of a Gmail user.
  • List Labels (Enrichment) - Lists all labels in the user's mailbox.
  • Move Mail (Enrichment) - Modifies the labels on the specified message.
  • Search Engine (Enrichment) - Search all items using the specified query.
  • Search Mail (Enrichment) - Lists the messages in the user's mailbox.
  • Send Email * (Notification) - Sends the specified message.
  • Send Email V2 (Notification) - Sends the specified message without any attachments.

* Only available for Cloud SOAR

Gmail configuration​

  1. Create a new project in the Developer Console.

  2. In the APIs & Services section, navigate to Credentials and select Create Credentials: https://console.cloud.google.com/apis/api.

  3. Select OAuth Client ID as the credential type and set the following inputs:

    • Application Type. Web Application.
    • Authorized redirect URIs > Add URI. http://localhost/
      note

      Will only be used to generate a refresh token.

  4. Copy the resulting Client ID and Client Secret Key values, as these will be used later.
    gmail

  5. Navigate to the OAuth Consent Screen section and set the following inputs:

    • App Name
    • User Support Email: Set to an email that you have access to.
    • Developer Contact Information: Set to an email that you have access to.
  6. The following xcopes are needed:

    • https://mail.google.com
    • https://www.googleapis.com/auth/gmail.modify
    • https://www.googleapis.com/auth/gmail.readonly
    • https://www.googleapis.com/auth/admin.directory.user
    • https://www.googleapis.com/auth/gmail.compose
    • https://www.googleapis.com/auth/gmail.send
    • https://www.googleapis.com/auth/gmail.settings.basic
    • https://www.googleapis.com/auth/gmail.settings.sharing
  7. In Cloud SOAR, navigate to Settings > Integrations > Gmail, add a new Resource and provide the following inputs:

    • Client ID (generated in step 4)
    • Client Secret Key (generated in step 4)
  8. Save and close the Resource.

  9. Click and execute the Authorize DO NOT USE IN PLAYBOOK action. If successful, a URL will be returned.
    gmail

  10. Open a new browser tab, and navigate to the URL generated in the previous step.

  11. Provide consent for this developer project to access the Gmail API.

  12. The response to this consent flow is the localhost redirect specified earlier. Copy this URL.

  13. Within this URL, copy the code nested in this URL:

    http://localhost/?code=4/0AbUR2VXXXXFe8kuMTUE4Dkxts4J8mo3\_BkZKxXAcdzXXXXtd9lrjai00pEuG0YXWtWjimg&scope=https://mail.google.com/%20https://www.googleapis.com/auth/gmail.settings.basic

    gmail
  14. In Cloud SOAR, click and run the Confirm DO NOT USE IN PLAYBOOK action, providing the code generated above in the Code input.
    gmail

  15. This will return a JSON result with a "credentials" key. Copy the value of this key, which is a base64-encoded string JSON credential we will use in the next and final step.
    gmail

  16. Paste the base64 string in the "Credentials" field of the Integration Resource created in step 7. Save and close the resource window.

  17. You can test that the integration credentials are working by running the "Get Labels" action (no inputs are needed). If successful, it will return a JSON result of mail labels.
    gmail

External Libraries​

Configure Gmail in Automation Service and Cloud SOAR​

Before you can use this automation integration, you must configure its authentication settings so that the product you're integrating with can communicate with Sumo Logic. For general guidance, see Configure Authentication for Automation Integrations.

How to open the integration's configuration dialog
  1. Access App Central and install the integration. (You can configure at installation, or after installation with the following steps.)
  2. Go to the Integrations page.
    Classic UI. In the main Sumo Logic menu, select Automation and then select Integrations in the left nav bar.
    New UI. In the main Sumo Logic menu, select Automation > Integrations. You can also click the Go To... menu at the top of the screen and select Integrations.
  3. Select the installed integration.
  4. Hover over the resource name and click the Edit button that appears.
    Edit a resource

In the configuration dialog, enter information from the product you're integrating with. When done, click TEST to test the configuration, and click SAVE to save the configuration:

  • Label. Enter the name you want to use for the resource.

  • Client ID. Enter the client ID copied earlier.

  • Client Secret Key. Enter the secret for the client ID.

  • Credentials. Enter the credentials retrieved from the "Confirm DO NOT USE IN PLAYBOOK" action above.

  • Developer API Key. Enter your developer API key. This is only used in the "Search Engine" action.

  • Custom Search Engine ID. Enter your search ending ID. This is only used in the "Search Engine" action.

  • Cloud SOAR API URL. Enter your Sumo Logic API URL (for example, https://api.us2.sumologic.com). Enter the API endpoint URL for your region.

  • Access ID. Enter the access ID for your Sumo Logic access key. Select Default as the scope when generating access keys.

  • Access Key. Enter the access key corresponding to your Sumo Logic access ID.

  • Automation Engine. Select Cloud execution for this certified integration. Select a bridge option only for a custom integration. See Cloud or Bridge execution.

  • Proxy Options. Select whether to use a proxy. (Applies only if the automation engine uses a bridge instead of cloud execution.)

    • Use no proxy. Communication runs on the bridge and does not use a proxy.
    • Use default proxy. Use the default proxy for the bridge set up as described in Using a proxy.
    • Use different proxy. Use your own proxy service. Provide the proxy URL and port number.
Gmail configuration

For information about the Gmail API, see Gmail API documentation.

Change Log​

VersionDateDescription
v1.5June 26, 2024The Send Email action now supports the new Cloud SOAR API, letting you send incident attachments directly through the email action.
v1.4October 26, 2023
  • Add Filter: changed the action type to Containment; changed the field type to tag for Add Label IDs and Remove Label IDs; changed the field type to textarea for Subject, Query, and Negated Query; changed the field type to list for Size Comparison; and enabled the Incident Artifacts feature flag for Add Label IDs, Remove Label IDs, From, and To.
  • Delete Mail: enabled the Incident Artifacts feature flag for Message ID.
  • Get Attachment: enabled the Incident Artifacts feature flag for Message ID and Attachment ID, and changed the output path size to type text.
  • List Filters (formerly Get Filters): renamed the action from Get Filters to List Filters, added a table view, and extended output mappings.
  • List Labels (formerly Get Labels): renamed the action from Get Labels to List Labels and added a table view.
  • Get Mail: enabled the Incident Artifacts feature flag for Message ID, added a table view, and extended output mappings.
  • Get Thread: enabled the Incident Artifacts feature flag for Thread ID, added a table view, and extended output mappings.
  • Gmail Daemon: extended the table view for action results.
  • Move Mail: enabled the Incident Artifacts feature flag for Message ID, Add Label IDs, and Remove Label IDs; changed the field type to tag for Add Label IDs and Remove Label IDs; added a table view; and extended output mappings.
  • Search Mail: added support for viewing a list of emails without providing a search keyword, changed the label from Search (Query) to Search, and extended output mappings.
  • Send Email: enabled the Incident Artifacts feature flag for From and Final Report ID, added a table view, and added output mappings.
  • Send Email V2: enabled the Incident Artifacts feature flag for From, added a table view, and added output mappings.
  • Refactored the code.
v1.2August 18, 2023Refactored the integration.
March 10, 2022Updated the logo.
June 19, 2020Added a Gmail daemon.
September 6, 2019Added a link to the Gmail external libraries.
February 28, 2019First upload.
Status
Legal
Privacy Statement
Terms of Use
CA Privacy Notice

Copyright © 2026 by Sumo Logic, Inc.