Gmail
Gmail Pack.#
This Integration is part of theUse the Gmail integration to search and process emails in your organization's Gmail mailboxes.
This integration replaces the Gmail functionality in the GoogleApps API and G Suite integration.
#
PrerequisitesYou need to do the following in Google before configuring your integration instance in Cortex XSOAR.
- Get a New Private Key
- Enable APIs
- Delegate Domain-wide Authority to Your Service Account
- Get an Immutable Google Apps ID
#
Get a New Private KeyAccess your Google Service Account.
In the IAM & admin section select Service accounts.
If you need to create a new project, click CREATE PROJECT and do the following:
- In the New Project window, type a project name, select an organization from the drop-down list, and then select a location.
- Click CREATE.
In the Service accounts section, click + CREATE SERVICE ACCOUNT.
In the Create service account dialog, type a name for the service account, add a description, and then click CREATE AND CONTINUE.
In the Grant this service account access to project section,click Continue.
In the Grant users access to this service account section, click DONE.
In the Actions column for the newly created service account, click the verticle elipses, then click Manage keys.
Click the ADD KEY dropdown, and select Create new key.
Select Key type JSON and click CREATE.
This will generate a json Private key file that will be downloaded and saved locally.Click CLOSE to close the dialog.
Navigate to DETAILS -> Advanced Settings. Copy the Client ID.
#
Enable APIsBoth the Gmail API and the Admin SDK API are required to use this integration.
- From the main Navigation Menu hamburger icon, navigate to APIs & Services -> Library.
- In Search for APIs & Services, search for gmail.
- Click Gmail API, then click ENABLE.
- Repeat steps 2 & 3 for Admin SDK API.
#
Delegate Domain-wide Authority to Your Service Account- In the Google Administrator Console, navigate to Security -> Access and data control -> API Controls.
- Click MANAGE DOMAIN WIDE DELEGATION.
- Click Add new to open the Add a new client ID dialog.
- Complete the dialog using the Client ID copied in Step 12 above, and the OAuth scopes noted below, then click AUTHORIZE to close the dialog.
https://www.googleapis.com/auth/gmail.settings.basic,https://www.googleapis.com/auth/admin.directory.user,https://www.googleapis.com/auth/admin.directory.device.mobile.action,https://www.googleapis.com/auth/admin.directory.device.mobile.readonly,https://www.googleapis.com/auth/gmail.modify,https://www.googleapis.com/auth/gmail.settings.sharing,https://www.googleapis.com/auth/gmail.send,https://www.googleapis.com/auth/gmail.modify,https://www.googleapis.com/auth/admin.directory.device.chromeos,https://www.googleapis.com/auth/admin.directory.user.readonly,https://www.googleapis.com/auth/admin.directory.user.security,https://www.googleapis.com/auth/admin.directory.rolemanagement,https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly,https://www.googleapis.com/auth/gmail.readonly,https://mail.google.com,https://www.googleapis.com/auth/gmail.compose
#
Get an Immutable Google Apps IDTo revoke or fetch a user role, you need an Immutable Google Apps ID.
- Continue within the Google Administrator Console from the previous step.
- Navigate to Security -> Authentication -> SSO with SAML applications.
- Copy the idpid value from the SSO URL, this is the Immutable Google Apps ID.
#
Required Scopes#
Configure Gmail in Cortex XSOARNavigate to Settings > Integrations > Instances.
Search for Gmail.
Click Add instance to create and configure a new integration instance.
Parameter Description Required adminEmail The email of the user with admin privileges (the Password refers to the content of the Service Account file). True gappsID The immutable Google Apps ID. False query The events search query (for example, "from:example@demisto.com") Used for searching emails in the inbox. The query language follows the Gmail query specification example: "from:someuser@example.com rfc822msgid:somemsgid@example.com is:unread". For more information, read the Gmail Query Language documentation. False queryUserKey Events user key (for example, example@demisto.com) Use this to specify the email account to search for messages. By default, the integration uses the email address specified in the admin instance. False isFetch Whether to fetch incidents. False insecure Whether to trust any certificate. (not secure) False proxy Whether to use system proxy settings. False incidentType The incident type to map incoming events to. False fetch_time The first fetch timestamp, in days. False Click Test to validate the URLs, token, and connection.
#
Use Cases- Monitors a mailbox by using the integration fetch incident capability to monitor a mailbox and create incidents for new filtered emails.
- Searches a mailbox for emails with PDF attachments by using the following command.
gmail-search user-id=admin@demisto.com filename=โpdfโ after=โ2018/05/10โ.
- Deletes emails by using the following command.
!gmail-delete-mail user-id=admin@demisto.com message-id=164d2110e0152660
#
Fetched Incidents Data- Incident Name
- Occurred
- Owner
- Type
- Severity
- Email From
- Email Message ID
- Email Subject
- Email To
- Attachment Extension
- Attachment Name
- Email Body
- Email Body Format
#
CommandsYou can execute these commands from the Cortex XSOAR CLI as part of an automation or in a playbook. After you successfully execute a command, a DBot message appears in the War Room with the command details.
- gmail-delete-user: Deletes a Gmail user.
- gmail-get-tokens-for-user: Gets tokens for a user.
- gmail-get-user: Gets information for a Google user.
- gmail-get-user-roles: Gets all available Google roles.
- gmail-get-attachments: Gets Gmail message attachments.
- gmail-get-mail: Gets a Gmail message.
- gmail-search: Searches a user's Gmail records.
- gmail-search-all-mailboxes: Searches in all Gmail mailboxes.
- gmail-list-users: Lists all Google users.
- gmail-list-labels: Lists all labels for a given user.
- gmail-revoke-user-role: Revokes a Google user's role.
- gmail-create-user: Creates a new user.
- gmail-delete-mail: Deletes mail from a mailbox.
- gmail-get-thread: Gets the message in an email thread.
- gmail-move-mail: Moves an email to a different folder.
- gmail-move-mail-to-mailbox: Moves an email to a different mailbox.
- gmail-add-delete-filter: Adds a rule to delete an email.
- gmail-add-filter: Adds a new filter.
- gmail-list-filter: Gets a list of filters in a mailbox.
- gmail-remove-filter: Removes a filter from an email.
- gmail-hide-user-in-directory: Hides a user's information.
- gmail-set-password: Sets a password.
- gmail-get-autoreply: Gets an auto reply message for the user.
- gmail-set-autoreply: Sets an auto-reply for the user.
- gmail-delegate-user-mailbox: Adds a delegate user to a mailbox.
- send-mail: Sends an email using Gmail.
- reply-mail: Replies to an email using Gmail.
- gmail-remove-delegated-mailbox: Removes a delegate user from a mailbox.
- gmail-get-role: Gets details of a specific role.
- gmail-forwarding-address-add: Creates a forwarding address.
- gmail-forwarding-address-update: Updates the disposition in a forwarding address.
- gmail-forwarding-address-list: Gets a list of forwarding addresses.
- gmail-forwarding-address-get: Gets a forwarding address.
- gmail-forwarding-address-remove: Removes a forwarding address.
- gmail-send-as-add: Creates a custom "from" send-as alias.
#
gmail-delete-userDeletes a Gmail user.
#
Base Commandgmail-delete-user
#
InputArgument Name | Description | Required |
---|---|---|
user-id | The user's email address. The "me" special value can be used to indicate the authenticated user. | Required |
#
Context OutputThere is no context output for this command.
#
Command Example!gmail-delete-user user-id=user1@domain.io
#
Human Readable OutputUser user1@domain.io have been deleted.
#
gmail-get-tokens-for-userLists all tokens associated with a specified user.
#
Base Commandgmail-get-tokens-for-user
#
InputArgument Name | Description | Required |
---|---|---|
user-id | The user's email address. The "me" special value can be used to indicate the authenticated user. | Required |
#
Command Example!gmail-get-tokens-for-user user-id=user@domain.io
#
Context Example#
Human Readable Output#
Tokens:
DisplayText ClientId Kind Scopes UserKey Google APIs Explorer 292824132082.apps.googleusercontent.com admin#directory#token openid, https://www.googleapis.com/auth/calendar
123456789 Go Phish! 422358954086-4fvv287aojmge1qaqe9m5mmgmbuhg1hj.apps.googleusercontent.com admin#directory#token https://www.googleapis.com/auth/gmail.addons.current.message.readonly
,
https://www.googleapis.com/auth/script.send_mail
,
https://www.googleapis.com/auth/userinfo.email
,
openid,
https://www.googleapis.com/auth/script.storage
,
https://www.googleapis.com/auth/gmail.addons.execute
,
https://www.googleapis.com/auth/admin.directory.user.readonly
123456789 Demisto KMS DEV 950822307886-oiv25bpm32dtp21eabn2k5lf1ba7koum.apps.googleusercontent.com admin#directory#token https://www.googleapis.com/auth/cloud-platform
123456789 Google Data Studio 371237729773-oj8m98u7esgqep8snt9aold136opo3fi.apps.googleusercontent.com admin#directory#token https://www.googleapis.com/auth/bigquery.readonly
123456789 Postman 805864674475-3abs2rivkn7kreou30b8ru8esnti4oih.apps.googleusercontent.com admin#directory#token https://www.googleapis.com/auth/userinfo.profile
,
https://www.googleapis.com/auth/userinfo.email
123456789
#
gmail-get-userGets information for a specified user.
#
Base Commandgmail-get-user
#
InputArgument Name | Description | Required |
---|---|---|
user-id | The user's email address. The "me" special value can be used to indicate the authenticated user. | Required |
projection | The subset of fields to fetch for the user. Can be: "basic": Do not include any custom fields for the user (default), "custom": Includes custom fields from schemas requested in custom-field-mask, "full": Includes all fields associated with the user. Possible values are: basic, custom, full. Default is basic. | Optional |
view-type-public-domain | Whether to fetch the administrator or public view of the user. Can be admin_view (default), which includes both administrator and domain-public fields; or "domain_public", which includes user fields that are publicly visible to other users in the domain. Possible values are: admin_view, domain_public. Default is admin_view. | Optional |
custom-field-mask | A comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
Account.Type | String | The account type. For example, "AD", "LocalOS", "Google", "AppleID", and so on. |
Account.ID | String | The unique ID for the account (integration specific). For AD accounts this is the Distinguished Name (DN). |
Account.DisplayName | string | The display name. |
Account.Gmail.Address | string | The email assigned with the current account. |
Account.Email.Address | String | The email address of the account. |
Account.Domain | String | The domain of the account. |
Account.Username | String | The account username in the relevant system. |
Account.OrganizationUnit | String | The Organization Unit (OU) of the account. |
Account.Group | String | Groups to which the account belongs (integration specific). For example, for AD, these are the groups in which the account is a member. |
Account.VisibleInDirectory | Boolean | Whether the account is visible in the directory. |
Account.CustomerId | String | The customer unique ID. |
#
Command Example!gmail-get-user user-id=user@domain.io
#
Context Example#
Human Readable Outputuser@domain.io:#
User
Type ID Username DisplayName Groups CustomerId Domain VisibleInDirectory 115824619743385532879 user user user admin#directory#user C03puekhd domain.io Address: user@domain.io true
#
gmail-get-user-rolesRetrieves a list of all Google roles for a specified user.
#
Base Commandgmail-get-user-roles
#
InputArgument Name | Description | Required |
---|---|---|
user-id | The user's email address. The "me" special value can be used to indicate the authenticated user. | Required |
#
Context OutputPath | Type | Description |
---|---|---|
Gmail.Role.RoleAssignmentId | String | The unique ID of the role assignment. |
Gmail.Role.ScopeType | String | The scope type of the role. |
Gmail.Role.Kind | String | The kind of the Role. |
Gmail.Role.OrgUnitId | String | The organization the user was assigned to. |
Gmail.Role.ID | String | The inner role ID. |
Gmail.Role.AssignedTo | String | The user ID who was assigned to the role. |
#
Command Example!gmail-get-user-roles user-id=user@domain.io
#
Context Example#
Human Readable Outputuser@domain.io:#
User Roles of
ID RoleAssignmentId ScopeType Kind OrgUnitId 13801188331880449 13801188331880456 CUSTOMER admin#directory#roleAssignment 13801188331880463 13801188331880489 CUSTOMER admin#directory#roleAssignment 13801188331880469 13801188331880492 ORG_UNIT admin#directory#roleAssignment 03ph8a2z3tho209
#
gmail-get-attachmentsRetrieves attachments from a sent Gmail message.
#
Base Commandgmail-get-attachments
#
InputArgument Name | Description | Required |
---|---|---|
message-id | The ID of the email to retrieve. You can get the ID by running the gmail-search command, or by fetching mails and copy the incident.labels.Email/ID value from the fetched incident context. | Required |
user-id | The user's email address. The "me" special value can be used to indicate the authenticated user. | Required |
#
Context OutputPath | Type | Description |
---|---|---|
File.Name | String | The file name. |
File.MD5 | String | The MD5 hash of the file. |
File.SHA1 | String | The SHA1 hash of the file. |
File.SHA256 | String | The SHA256 hash of the file. |
File.Type | String | The file type, as determined by libmagic (same as displayed in file entries). |
File.Size | Number | The size of the file in bytes. |
File.SSDeep | String | The SSDeep hash of the file (same as displayed in file entries). |
File.EntryID | String | The EntryID of the file. |
File.Extension | String | The file extension. For example: "xls". |
#
Command Example!gmail-get-attachments message-id=16d4316a25a332e4 user-id=admin@demistodev.com
#
gmail-get-mailRetrieves the Gmail message sent to a specified user.
#
Base Commandgmail-get-mail
#
InputArgument Name | Description | Required |
---|---|---|
user-id | The user's email address. The "me" special value can be used to indicate the authenticated user. | Required |
message-id | The ID of the email to retrieve. You can get the ID by running the gmail-search command, or by fetching mails and copy the incident.labels.Email/ID value from the fetched incident context. | Required |
format | The format to return the message. Can be: "full": Returns the full email message data with body content parsed in the payload field; the raw field is not used. (default) / "metadata": Returns only the email message ID, labels, and email headers / "minimal": Returns only the email message ID and labels; does not return the email headers, body, or payload / "raw": Returns the full email message data with body content in the raw field as a base64url encoded string; the payload field is not used. Possible values are: full, metadata, minimal, raw. Default is full. | Optional |
include-attachments | Whether to include the attachment entries in the result or not. Possible values are: False, True. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
Gmail.ID | String | The inner ID of the Gmail message. |
Gmail.ThreadId | string | The thread ID. |
Gmail.Format | string | The MIME type of email. |
Gmail.Labels | string | The labels of the specific email. |
Gmail.To | String | The email address of the receiver. |
Gmail.From | String | The email address of the sender. |
Gmail.Cc | string | Additional recipient email address (CC). |
Gmail.Bcc | string | Additional recipient email address (BCC). |
Gmail.Subject | string | The subject of the email. |
Gmail.Body | string | The content of the email. |
Gmail.Attachments.ID | String | The email attachment ID (as appear in gmail). |
Gmail.Attachments.Name | String | The email attachment name. |
Gmail.Headers | unknown | All headers of the specific email (list). |
Gmail.Mailbox | string | The email mailbox. |
Email.To | String | The recipient of the email. |
Email.From | String | The sender of the email. |
Email.CC | String | Additional recipient email address (CC). |
Email.BCC | String | Additional recipient email address (BCC). |
Email.Format | String | The format of the email. |
Email.Body/HTML | String | The HTML version of the email. |
Email.Body/Text | String | The plain-text version of the email. |
Email.Subject | String | The subject of the email. |
Email.Headers | String | The headers of the email. |
Email.Attachments.ID | String | The email attachment ID (as appear in gmail). |
Email.Attachments.Name | String | The email attachment name. |
Email.Date | String | The date the email was received. |
File.Name | String | Relevant only when include-attachments is set to True. The file name. |
File.MD5 | String | Relevant only when include-attachments is set to True. The MD5 hash of the file. |
File.SHA1 | String | Relevant only when include-attachments is set to True. The SHA1 hash of the file. |
File.SHA256 | String | Relevant only when include-attachments is set to True. The SHA256 hash of the file. |
File.Type | String | Relevant only when include-attachments is set to True. The file type, as determined by libmagic (same as displayed in file entries). |
File.Size | Number | Relevant only when include-attachments is set to True. The size of the file in bytes. |
File.SSDeep | String | Relevant only when include-attachments is set to True. The SSDeep hash of the file (same as displayed in file entries). |
File.EntryID | string | The EntryID of the file. |
File.Extension | String | The file extension. For example: "xls". |
#
Command Example!gmail-get-mail user-id=user@domain.io message-id=175276e027a9aab9
#
Context Example#
Human Readable Output#
Email:
Mailbox ID Subject From To Labels Format Body user@domain.io 175276e027a9aab9 Your G Suite data transfer was successful for test user to newaccount newdemo The G Suite Team gsuite-noreply@google.com user@domain.io UNREAD, CATEGORY_UPDATES, INBOX multipart/alternative From: "The G Suite Team" [gsuite-noreply@google.com]
Subject: Your G Suite data transfer was successful for test user to
newaccount newdemo
Hello Admin,
Gรย Suite recently processed a request from test user (user@domain.io)
to transfer data for test user (user@domain.io) to newaccount
newdemo (demo@domain.io).
The data transfer was successful.
Sincerely,
The Gรย Suite Team
[Google Cloud]
(c) 2020 Google LLC 1600 Amphitheatre Parkway, Mountain View, CA 94043
Google Ireland Ltd, Gordon House, Barrow Street, Dublin 4, Ireland Google
Asia Pacific Pte. Ltd., 8 Marina View, #30-01, Asia Square 1, Singapore
018960
You're receiving this mandatory email service announcement to update you
about important changes to your Google Cloud product or account.
#
gmail-searchSearches for Gmail records for a specific Google user.
#
Base Commandgmail-search
#
InputArgument Name | Description | Required |
---|---|---|
user-id | The user's email address. The "me" special value can be used to indicate the authenticated user. | Required |
query | Returns messages matching the specified query. Supports the same query format as the Gmail search box. For example, "from:someuser@example.com rfc822msgid: is:unread". For more syntax information see "https://support.google.com/mail/answer/7190?hl=en". | Optional |
max-results | The maximum number of results to return. Default is 100. Maximum is 500. Can be 1 to 500, inclusive. Default is 100. | Optional |
fields | Enables partial responses to be retrieved, separated by commas. Valid fields are only from the following list: Type, Mailbox, ThreadId, Labels, Headers, Attachments, RawData, Format, Subject, From, To, Body, Cc, Bcc, Date, Html, Attachment Names. | Optional |
labels-ids | Returns messages with labels that match all of the specified label IDs in a comma-separated list. | Optional |
page-token | Page token to retrieve a specific page of results in the list. | Optional |
include-spam-trash | Include messages from SPAM and TRASH in the results. (Default: false). Possible values are: False, True. Default is False. | Optional |
from | Specifies the sender. For example, "john". | Optional |
to | Specifies the receiver. For example, "john". | Optional |
subject | Words in the subject line. For example, "alert". | Optional |
filename | Attachments with a certain name or file type. For example, "pdf" or "report.pdf". | Optional |
in | Messages in any folder, including Spam and Trash. For example: shopping. | Optional |
after | Search for messages sent after a specific date. For example: 2018/05/06. | Optional |
before | Search for messages sent before a specific date. for example: 2018/05/09. | Optional |
has-attachments | Whether to search for messages sent with attachments. Possible values are: True, False. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
Gmail.ID | string | The inner ID of the Gmail message. |
Gmail.ThreadId | string | The thread ID. |
Gmail.Format | string | The MIME type of email. |
Gmail.Labels | string | The labels of the specific email. |
Gmail.To | string | The email address of the receiver. |
Gmail.From | string | The email address of the sender. |
Gmail.Cc | string | The additional recipient email address (CC). |
Gmail.Bcc | string | The additional recipient email address (BCC). |
Gmail.Subject | string | The subject of the specific email. |
Gmail.Body | string | The content of the email. |
Gmail.Attachments | unknown | Attachment details. Attachments IDs are separated by commas. |
Gmail.Headers | unknown | All headers of a specific email (list). |
Gmail.Mailbox | string | The email mailbox. |
Email.To | String | The recipient of the email. |
Email.From | String | The sender of the email. |
Email.CC | String | The additional recipient email address (CC). |
Email.BCC | String | The additional recipient email address (BCC). |
Email.Format | String | The format of the email. |
Email.Body/HTML | String | The HTML version of the email. |
Email.Body/Text | String | The plain-text version of the email. |
Email.Subject | String | The subject of the email. |
Email.Headers | String | The headers of the email. |
Email.Attachments.entryID | Unknown | Comma-separated email attachment IDs. |
Email.Date | String | The date the email was received. |
#
Command Example!gmail-search user-id=user@domain.io after=2020/03/20 before=2021/04/01 query=access max-results=2
#
Context Example#
Human Readable Outputuser@domain.io:#
Search in
query: "after:2020/03/20 before:2021/04/01 access" |Mailbox|ID|Subject|From|To|Labels|Format|Body| |---|---|---|---|---|---|---|---| | user@domain.io | 17503a0adab4557e | A new editing experience from Grammarly | Grammarly info@send.grammarly.com | user@domain.io | CATEGORY_PROMOTIONS, UNREAD, INBOX | multipart/alternative | Grammarly
https://click.send.grammarly.com/?qs=63b8bce6088947298e58f6b209acbedec627da2c5a9e6db63c25d7a91cc5d033f20b5e98474ae6c26955d5953c80e198718e7c642c683f08
https://click.send.grammarly.com/?qs=63b8bce608894729a31f23d448c10aacac177bc32d35281412289bdeaee77e6d71237bba943365135f276dd3a216a98afc38539bcc342bd0
Your Guide to Great Writing
When youโre polishing an important message, thereโs a lot to consider. To better guide you through the editing process, weโve given Grammarly's browser extension a sleek new look. With suggestions organized by importance and theme, plus easy access to Grammarlyโs tone detector, itโs never been easier to quickly and thoroughly improve your writing before sending it out into the world.
Want to check it out for yourself?
Next time youโre writing online, open Grammarly by clicking the green G in the lower right corner of your text field.
https://click.send.grammarly.com/?qs=63b8bce608894729a31f23d448c10aacac177bc32d35281412289bdeaee77e6d71237bba943365135f276dd3a216a98afc38539bcc342bd0
Learn More
https://click.send.grammarly.com/?qs=63b8bce608894729a31f23d448c10aacac177bc32d35281412289bdeaee77e6d71237bba943365135f276dd3a216a98afc38539bcc342bd0
Floating sidebar
Now you can see all of Grammarlyรขโฌโขs feedbackรขโฌโincluding suggestions about wordinessรขโฌโin a compact sidebar that you can position anywhere on your screen.
https://click.send.grammarly.com/?qs=63b8bce608894729a31f23d448c10aacac177bc32d35281412289bdeaee77e6d71237bba943365135f276dd3a216a98afc38539bcc342bd0
Organized feedback
Instead of one long list of fixes, Grammarly now groups suggestions by theme, so you can tackle issues in an order that makes sense to you.
https://click.send.grammarly.com/?qs=63b8bce60889472968c8fbdddda67d5ffe4e3e9510c3d039f51c5e6384a0dbf7f50df926ac0c45cffcc37d987e90c2db8d5a605ae2bf3c4a
What's new in Premium?
If youรขโฌโขre considering an upgrade to Grammarly Premium, nowรขโฌโขs a fantastic time. Youรขโฌโขll get full access to Grammarlyรขโฌโขs tone suggestions and some all-new suggestions, including full-sentence clarity rewrites. For multilingual speakers, weรขโฌโขve added tailored suggestions to help you write more fluently with natural phrasing and word choice.
https://click.send.grammarly.com/?qs=63b8bce60889472968c8fbdddda67d5ffe4e3e9510c3d039f51c5e6384a0dbf7f50df926ac0c45cffcc37d987e90c2db8d5a605ae2bf3c4a
Upgrade to Premium
https://click.send.grammarly.com/?qs=63b8bce6088947298205de4bc6f5baa6942035a27347bed70f376eb641988ce13553a98df548d5334c710496da40d701ea7f0747436cb35e
https://click.send.grammarly.com/?qs=63b8bce60889472909674b9e1b80086f2f8a55a758ec0ff5422c7e418731df78a536f03419e5467ea3cdc46cfe13a7219c9c76aa43c18353
https://click.send.grammarly.com/?qs=63b8bce60889472978abf8c16e483cf9963720144e7eedea2b7fae9baca38d9f366a74bfaa6a9c55bb716d0eb437e2b13b0e0b9aa03f956a
https://click.send.grammarly.com/?qs=63b8bce608894729cd424fff00db5cfde8a9258b354120767b238dc40dc183b9789fa2f900ff0e57c8d9a6bc77ad2ef68d26c422e5e3e9c0
https://view.send.grammarly.com/?qs=09877178720a4d39668e7a44fdd78d68f8393fb23acee0b64eff0a606379ca046d45856dfefd80f8302eadc8f7dec1dae314e6f038bafd98a388c93dc5a7bdddd160a54982f69a8f21b74bd31a5adbcf567ca0583163d53d
View Web Version .
https://click.send.grammarly.com/?qs=63b8bce608894729304de51e86d38d53940d8ee74804fd68ba82bccecdc473489f3ae530efe098cb4fad4d7796657104acd6cd72a37bcb4319ef4ac52472d689
Email Preferences .
https://click.send.grammarly.com/?qs=63b8bce608894729304de51e86d38d53940d8ee74804fd68ba82bccecdc473489f3ae530efe098cb4fad4d7796657104acd6cd72a37bcb4319ef4ac52472d689
Unsubscribe
You received this email because you are signed up to receive product update emails. If you would no longer like to receive these, please update your email preferences by visiting the link above.
(c) 2020 Grammarly, Inc. 548 Market St. #35410, San Francisco, CA 94104
| | user@domain.io | 174dfdee81fa8346 | Write like a pro. Here's 20% off Grammarly Premium! | Grammarly info@send.grammarly.com | user@domain.io | CATEGORY_PROMOTIONS, UNREAD, INBOX | multipart/alternative | Grammarly Premium August 2019 Promo
https://click.send.grammarly.com/?qs=7d3ab28cc69aa23344f507f25b9d65dc197b1db732e9723c9d03738396344f15d971c8232f3f859821a9ed07612787ae8952a52df6c3e3e7f288747e04e4537f
Get 20% off Premium โ
https://click.send.grammarly.com/?qs=7d3ab28cc69aa23344f507f25b9d65dc197b1db732e9723c9d03738396344f15d971c8232f3f859821a9ed07612787ae8952a52df6c3e3e7f288747e04e4537f
Are you ready to level up? Grammarly Premium empowers you to put your best foot forward through exclusive access to features like vocabulary enhancement and suggestions for improving style and tone.
Upgrade in the next 48 hours to receive 20% OFF and start writing compelling, effective content with greater confidence.
https://click.send.grammarly.com/?qs=7d3ab28cc69aa23344f507f25b9d65dc197b1db732e9723c9d03738396344f15d971c8232f3f859821a9ed07612787ae8952a52df6c3e3e7f288747e04e4537f
Get 20% Off Premium
https://click.send.grammarly.com/?qs=7d3ab28cc69aa23344f507f25b9d65dc197b1db732e9723c9d03738396344f15d971c8232f3f859821a9ed07612787ae8952a52df6c3e3e7f288747e04e4537f
https://click.send.grammarly.com/?qs=2a35c60cf790245dace2796a031670f49219f3c4a00cae25d2dab59f72e6be49671fdecec1ca6d0285eac535168d7d98d0174ae389750a82
https://click.send.grammarly.com/?qs=a5f2bccb158ea90a0f6327f16256b045f7045b3ad3b9888cb4403400459f0be6bd90d7662bd64b837e1407368baedc62b0a80ca05f11d285
https://click.send.grammarly.com/?qs=a8de5e2a924b74c72a9cab9ac340987e51210dfea60c966334c7fe8354d11d0ee4824a49abaf38276f8a4f57fe26b84881b2f518ca4e5c44
https://click.send.grammarly.com/?qs=31d75588096fc8f0ecf301e89b11f8e90f5ea6e5283bd15266a2bbc89e4bec07c0a70213de591dfb18a0d88647f8a091eb0b527f013b4087
https://view.send.grammarly.com/?qs=04bdbe912f831db4355d68715de8fcc8bc879738444c98c65c7026b05760cc2e72cb475a3fcefe9843d4d8a929dbb99cca13e0eff2ed2b7693c950a77831230ebcc2421322e1194ee01f317d8b9ddb58e33dde99eb0db358
View Web Version รยท
https://click.send.grammarly.com/?qs=19dd9fb895689c3f0dd49d01ba845db6ad830f8fea7e18f4f49ced631c9a973533f91f93115ca5afaf96b7e3a9d092eaa29d1a417ad1c7975ab94c6b36607509
Email Preferences รยท
https://click.send.grammarly.com/?qs=19dd9fb895689c3f0dd49d01ba845db6ad830f8fea7e18f4f49ced631c9a973533f91f93115ca5afaf96b7e3a9d092eaa29d1a417ad1c7975ab94c6b36607509
Unsubscribe
You received this offer for Grammarly Premium because you are currently opted in to receive them via your preference settings. You may adjust your preferences at any time by clicking the link above.
รยฉ 2020 Grammarly, Inc., 548 Market St. #35410, San Francisco, CA 94104
|
#
gmail-search-all-mailboxesSearches the Gmail records for all Google users.
#
TroubleshootingThe command iterates over all available accounts, and downloads messages matching the query for each account. For organizations with many accounts, this can take longer than the default 5 minutes. To overcome this issue increase the execution-timeout from 300 to a higher value. To determine what value should be used, take a look at the logs after a failed execution of the command. The command prints to the logs info messages detailing the status of the search for every 100 accounts it successfully searched.
Inspecting these messages should allow you to determine what percent the search was able to finish before timing out. Take the given timeout and divide it with the last percent you see in the logs - the new timeout value should be greater than this. Fine tune the correct execution-timeout.
#
Base Commandgmail-search-all-mailboxes
#
InputArgument Name | Description | Required |
---|---|---|
query | Returns messages matching the specified query. Supports the same query format as the Gmail search box. For example, "from:someuser@example.com rfc822msgid: is:unread". For more syntax information,see "https://support.google.com/mail/answer/7190?hl=en". | Optional |
max-results | The maximum number of results to return. Default is 100. Maximum is 500. Can be 1 to 500, inclusive. Default is 100. | Optional |
fields | Enables partial responses to be retrieved, separated by commas. Valid fields are only from the following list: Type, Mailbox, ThreadId, Labels, Headers, Attachments, RawData, Format, Subject, From, To, Body, Cc, Bcc, Date, Html, Attachment Names. | Optional |
labels-ids | Returns messages with labels that match all of the specified label IDs in a comma-separated list. | Optional |
page-token | Page token to retrieve a specific page of results in the list. | Optional |
include-spam-trash | Includes messages from SPAM and TRASH in the results. (Default: false). Possible values are: False, True. Default is False. | Optional |
from | Specifies the sender. For example, "john". | Optional |
to | Specifies the receiver. For example, "john". | Optional |
subject | Words in the subject line. For example, "alert". | Optional |
filename | Attachments with a certain name or file type. For example, "pdf" or "report.pdf". | Optional |
in | Messages in any folder, including Spam and Trash. For example, shopping. | Optional |
after | Search for messages sent after a specific date. For example, 2018/05/06. | Optional |
before | Search for messages sent before a specific date. For example, 2018/05/09. | Optional |
has-attachments | Whether to search for messages sent with attachments. Possible values are: False, True. | Optional |
show-only-mailboxes | Whether to return only mailboxes which contain the email. Default is "True". Possible values are: false, true. Default is True. | Optional |
list_accounts | Accounts to search in. | Optional |
search_from | Used to track search progress. | Optional |
search_to | Used to track search progress. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
Gmail.ID | string | The inner ID of the Gmail message. |
Gmail.ThreadId | string | The thread ID. |
Gmail.Format | string | The MIME type of the email. |
Gmail.Labels | string | The labels of a specific email. |
Gmail.To | string | The email address of the receiver. |
Gmail.From | string | The email address of the sender. |
Gmail.Cc | string | The additional recipient email address (CC). |
Gmail.Bcc | string | The additional recipient email address (BCC). |
Gmail.Subject | string | The subject of the specific email. |
Gmail.Body | string | The content of the email. |
Gmail.Attachments | unknown | The attachments of the email. IDs are separated by commas. |
Gmail.Headers | unknown | All headers of a specific mail (list). |
Gmail.Mailboxes | String | The Gmail mailboxes in which emails matching the query were found. |
Gmail.UnsearchedAcounts | String | A list of accounts that were not searched due to an error accessing them. |
PageToken.NextPageToken | String | Fetches the next list of accounts that will be searched. |
SearchFromAccountIndex | String | A search is performed from an account index (Enables the search process to be followed). |
SearchToAccountIndex | String | A search is performed to an account index (Enables the search process to be followed). |
Email.To | String | The recipient of the email. |
Email.From | String | The sender of the email. |
Email.CC | String | The additional recipient email address (CC). |
Email.BCC | String | The additional recipient email address (BCC). |
Email.Format | String | The format of the email. |
Email.Body/HTML | String | The HTML version of the email. |
Email.Body/Text | String | The plain-text version of the email. |
Email.Subject | String | The subject of the email. |
Email.Headers | String | The headers of the email. |
Email.Attachments.entryID | Unknown | Email Attachments. IDs are separated by commas. |
Email.Date | String | The date the email was received. |
#
Command Example!gmail-search-all-mailboxes after=2019/04/10 max-results=1 before=2021/04/15
#
Context Example#
Human Readable OutputSearch completed
#
gmail-list-usersLists all Google users in a domain.
#
Base Commandgmail-list-users
#
InputArgument Name | Description | Required |
---|---|---|
projection | The subset of fields to fetch for the user. Can be "basic": Do not include any custom fields for the user. (default), "custom": Include custom fields from schemas requested in customFieldMask, "full": Include all fields associated with this user. Possible values are: basic, custom, full. | Optional |
domain | The domain name. Use this field to get fields from only one domain. To return all domains for a customer account, use the customer query parameter. | Optional |
customer | The unique ID for the customer's Google account. Default is the value specified in the integration configuration. For a multi-domain account, to fetch all groups for a customer, use this field instead of domain. | Optional |
max-results | Maximum number of results to return. Default is 100. Maximum is 500. Can be 1 to 500, inclusive. | Optional |
custom-field-mask | A comma-separated list of schema names. All fields from these schemas are fetched. Must be set when projection=custom. | Optional |
query | Query string search. Should be of the form "". Complete documentation is at https://developers.google.com/admin-sdk/directory/v1/guides/search-users. | Optional |
show-deleted | If true, retrieves the list of deleted users. Default is false. Possible values are: False, True. | Optional |
sort-order | How to sort the results. Can be ASCENDING/DESCENDING. Possible values are: ASCENDING, DESCENDING. | Optional |
token | Token to authorize and authenticate the action. | Optional |
view-type-public-domain | Whether to fetch either the administrator or public view of the user. Can be admin_view (default), which includes both administrator and domain-public fields or "domain_public"(includes fields for the user that are publicly visible to other users in the domain). Possible values are: admin_view, domain_public. Default is admin_view. | Optional |
page-token | Token to specify next page in the list. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
Account.Type | String | The account type. For example, "AD", "LocalOS", "Google", or "AppleID". |
Account.ID | String | The unique ID for the account (integration specific). For AD accounts this is the Distinguished Name (DN). |
Account.DisplayName | String | The display name. |
Account.Gmail.Address | string | The email assigned with the current account. |
Account.Email.Adderss | String | The email address of the account. |
Account.Groups | String | Groups to which the account belongs (integration specific). For example, for AD these are the groups in which the account is member. |
Account.Domain | String | The domain of the account. |
Account.Username | String | The username of the account. |
Account.OrganizationUnit | String | The Organization Unit (OU) of the account. |
#
Command Example!gmail-list-users query=user show-deleted=False
#
Context Example#
Human Readable Output#
Users:
Type ID Username DisplayName Groups CustomerId Domain VisibleInDirectory 113493660192005193453 user user test admin#directory#user C03puekhd domain.io Address: user@domain.io true
#
gmail-list-labelsLists all labels in the user's mailbox.
#
Base Commandgmail-list-labels
#
InputArgument Name | Description | Required |
---|---|---|
user-id | The user's email address. The "me" special value can be used to indicate the authenticated user. | Required |
#
Context OutputPath | Type | Description |
---|---|---|
GmailLabel.UserID | String | The UserID the label belongs to. |
GmailLabel.Name | String | The name of the label. |
GmailLabel.ID | String | The label ID. |
GmailLabel.Type | String | The label type. |
GmailLabel.MessageListVisibility | String | The label message list visibility. |
GmailLabel.LabelListVisibility | String | The label list visibility. |
#
Command Example!gmail-list-labels user-id=me
#
Context Example#
Human Readable Output#
Labels for UserID me:
Name ID Type MessageListVisibility LabelListVisibility INBOX INBOX system SPAM SPAM system hide labelShowIfUnread
#
gmail-revoke-user-roleRevokes a role for a specified Google user.
#
Base Commandgmail-revoke-user-role
#
InputArgument Name | Description | Required |
---|---|---|
user-id | The user's email address. The special value me can be used to indicate the authenticated user. | Optional |
role-assignment-id | The immutable ID of the role assignment. | Required |
#
Context OutputThere is no context output for this command.
#
Command Example!gmail-revoke-user-role role-assignment-id=role1
#
Human Readable OutputRole has been deleted.
#
gmail-create-userCreates a new Gmail user.
#
Base Commandgmail-create-user
#
InputArgument Name | Description | Required |
---|---|---|
The user's primary email address. The primary email address must be unique and cannot be an alias of another user. | Required | |
first-name | The user's first name. | Required |
family-name | The user's last name. | Required |
password | Stores the password for the user account. A password can contain any combination of ASCII characters. A minimum of 8 characters is required. The maximum length is 100 characters. | Required |
#
Context OutputPath | Type | Description |
---|---|---|
Account.Type | String | The account type. For example, "AD", "LocalOS", "Google", or "AppleID". |
Account.ID | String | The unique ID for the account (integration specific). For AD accounts this is the Distinguished Name (DN). |
Account.DisplayName | string | The display name. |
Account.Gmail.Address | string | The email assigned with the current account. |
Account.Email.Address | String | The email address of the account. |
Account.Username | String | The username of the account. |
Account.Groups | String | Groups to which the account belongs (integration specific). For example, for AD these are groups in which the account is a member. |
Account.Domain | String | The domain of the account. |
Account.OrganizationUnit | String | The Organization Unit (OU) of the account. |
#
Command Example!gmail-create-user email=user1@domain.io first-name=John family-name=Snow password=WinterIsComing
#
Context Example#
Human Readable Output#
New User:
Type ID Username DisplayName Groups CustomerId Domain 103470368646956060577 John John Snow admin#directory#user C03puekhd domain.io Address: user1@domain.io
#
gmail-delete-mailDeletes an email in the user's mailbox.
#
Base Commandgmail-delete-mail
#
InputArgument Name | Description | Required |
---|---|---|
user-id | The user's email address. The special value me can be used to indicate the authenticated user. | Required |
message-id | The ID of the email to delete. You can get the ID by running the gmail-search command, or by fetching mails and copy the incident.labels.Email/ID value from the fetched incident context. | Required |
permanent | Whether to delete the email permanently or move it to trash (default). Possible values are: False, True. | Optional |
#
Context OutputThere is no context output for this command.
#
Command Example!gmail-delete-mail user-id=admin@demistodev.com message-id=16d4316a25a332e4
#
Human Readable OutputEmail has been successfully moved to trash.
#
gmail-get-threadReturns all messages in a thread.
#
Base Commandgmail-get-thread
#
InputArgument Name | Description | Required |
---|---|---|
user-id | The user's email address. The special value me can be used to indicate the authenticated user. | Required |
thread-id | The ID of the thread to retrieve. | Required |
format | The format in which to return the message. Can be: "full": Returns the full email message data with body content parsed in the payload field; the raw field is not used. (default) / "metadata": Returns only email message ID, labels, and email headers / "minimal": Returns only email message ID and labels; does not return the email headers, body, or payload / "raw": Returns the full email message data with body content in the raw field as a base64url encoded string; the payload field is not used. Possible values are: full, metadata, minimal, raw. Default is full. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
Gmail.ID | string | The inner ID of the Gmail message. |
Gmail.ThreadId | string | The thread ID. |
Gmail.Format | string | The MIME type of email. |
Gmail.Labels | string | The labels of the specific email. |
Gmail.To | string | The email address of the receiver. |
Gmail.From | string | The email address of the sender. |
Gmail.Cc | string | The additional recipient email address (CC). |
Gmail.Bcc | string | The additional recipient email address (BCC). |
Gmail.Subject | string | The subject of a specific email. |
Gmail.Body | string | The content of the email. |
Gmail.Attachments | unknown | The attachments of the email. IDs are separated by commas. |
Gmail.Headers | unknown | All headers of the specific email (list). |
Gmail.Mailbox | string | The Gmail mailbox. |
Email.To | String | The recipient of the email. |
Email.From | String | The sender of the email. |
Email.CC | String | The additional recipient email address (CC). |
Email.BCC | String | The additional recipient email address (BCC). |
Email.Format | String | The format of the email. |
Email.Body/HTML | String | The HTML version of the email. |
Email.Body/Text | String | The plain-text version of the email. |
Email.Subject | String | The subject of the email. |
Email.Headers | String | The headers of the email. |
Email.Attachments.entryID | Unknown | Email Attachments. IDs are separated by commas. |
Email.Date | String | The date the email was received. |
#
Command Example!gmail-get-thread user-id=user@domain.io thread-id=1756d926adcca849
#
Context Example#
Human Readable Output#
Emails of Thread:
Mailbox ID Subject From To Labels Format Body user@domain.io 1756d926adcca849 hello Re: Untitled document - @user@domain.io @user@domain... user1 test1 user@domain.io 3d_qYXxAPBdI0CAA2BHG-BCF2D9M1C0G.4CC492.0CA12Jy9B6Az921yHy.6C@docos.bounces.google.com SENT text/plain
#
gmail-move-mailMoves an email to a different folder.
#
Base Commandgmail-move-mail
#
InputArgument Name | Description | Required |
---|---|---|
user-id | The user's email address. The "me" special value can be used to indicate the authenticated user. | Required |
message-id | The ID of the emaill to retrieve. You can get the ID by running the gmail-search command, or by fetching mails and copy the incident.labels.Email/ID value from the fetched incident context. | Required |
add-labels | A comma-separated list of labels to add to the email. | Optional |
remove-labels | A comma-separated list of labels to remove from the email. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
Gmail.ID | string | The inner ID of the Gmail message. |
Gmail.ThreadId | string | The thread ID. |
Gmail.Format | string | The MIME type of email. |
Gmail.Labels | string | The labels of the specific email. |
Gmail.To | string | The Gmail address of the receiver. |
Gmail.From | string | The Gmail address of the sender. |
Gmail.Cc | string | The additional recipient email address (CC). |
Gmail.Bcc | string | The additional recipient email address (BCC). |
Gmail.Subject | string | The subject of the specific email. |
Gmail.Body | string | The content of the email. |
Gmail.Attachments | unknown | The attachments of the email. IDs are separated by commas. |
Gmail.Headers | unknown | All headers of the specific email (list). |
Gmail.Mailbox | string | The Gmail mailbox. |
Email.To | String | The recipient of the email. |
Email.From | String | The sender of the email. |
Email.CC | Unknown | The additional recipient email address (CC). |
Email.BCC | Unknown | The additional recipient email address (BCC). |
Email.Format | String | The format of the email. |
Email.Body/HTML | String | The HTML version of the email. |
Email.Body/Text | String | The plain-text version of the email. |
Email.Subject | String | The subject of the email. |
Email.Headers | String | The headers of the email. |
Email.Attachments.entryID | Unknown | Email attachments. IDs are separated by commas. |
Email.Date | String | The date the email was received. |
#
Command Example!gmail-move-mail user-id=user@domain.io message-id=1756ad6c1dc2956a add-labels=INBOX remove-labels=TRASH
#
Context Example#
Human Readable Output#
Email:
Mailbox ID Labels user@domain.io 1756ad6c1dc2956a SENT, INBOX
#
gmail-move-mail-to-mailboxMoves an email to a different mailbox.
#
Base Commandgmail-move-mail-to-mailbox
#
InputArgument Name | Description | Required |
---|---|---|
src-user-id | The source user's email address. The "me" special value can be used to indicate the authenticated user. | Required |
message-id | The ID of the email to retrieve. You can get the ID by running the gmail-search command, or by fetching mails and copy the incident.labels.Email/ID value from the fetched incident context. | Required |
dst-user-id | The destination user's email address. The "me" special value can be used to indicate the authenticated user. | Required |
#
Context OutputPath | Type | Description |
---|---|---|
Gmail.ID | string | The inner ID of the Gmail message. |
Gmail.ThreadId | string | The thread ID. |
Gmail.Format | string | The MIME type of email. |
Gmail.Labels | string | The labels of the specific email. |
Gmail.To | string | The Gmail address of the receiver. |
Gmail.From | string | The Gmail address of the sender. |
Gmail.Cc | string | The additional recipient email address (CC). |
Gmail.Bcc | string | The additional recipient email address (BCC). |
Gmail.Subject | string | The subject of the specific email. |
Gmail.Body | string | The content of the email. |
Gmail.Attachments | unknown | The attachments of the email. IDs are separated by commas. |
Gmail.Headers | unknown | All headers of specific the email (list). |
Gmail.Mailbox | string | The Gmail mailbox. |
Email.To | String | The recipient of the email. |
Email.From | String | The sender of the email. |
Email.CC | String | The additional recipient email address (CC). |
Email.BCC | String | The additional recipient email address (BCC). |
Email.Format | String | The format of the email. |
Email.Body/HTML | String | The HTML version of the email. |
Email.Body/Text | String | The plain-text version of the email. |
Email.Subject | String | The subject of the email. |
Email.Headers | String | The headers of the email. |
Email.Attachments.entryID | Unknown | Emails attachments. IDs are separated by commas. |
Email.Date | String | The date the email was received. |
#
Command Example!gmail-move-mail-to-mailbox src-user-id="test.user@domain.com" message-id="1756acd6df2a9793" dst-user-id="user1@domain.io"
#
Context Example#
Human Readable Output#
Email:
Mailbox ID Subject From To Format Body user1@domain.io 1756acc058c19cdb Re: user1 user1@domain.io test.user@domain.com text/plain Body
#
gmail-add-delete-filterAdds a rule for email deletion by address.
#
Base Commandgmail-add-delete-filter
#
InputArgument Name | Description | Required |
---|---|---|
user-id | The user's email address. The "me" special value can be used to indicate the authenticated user. | Required |
email-address | The email address to block messages. | Required |
#
Command Example!gmail-add-delete-filter user-id="user@domain.io" email-address="user1@domain.io"
#
Context Example#
Human Readable Output#
New filter:
ID Criteria Action ANe1BmjeWtVj1i4t6dCiDJ8F54cAlqebm2k3rQ from: user1@domain.io addLabelIds: TRASH
#
gmail-add-filterAdds a new filter.
#
Base Commandgmail-add-filter
#
InputArgument Name | Description | Required |
---|---|---|
user-id | The user's email address. The "me" special value can be used to indicate the authenticated user. | Required |
from | The sender's display name or email address. | Optional |
to | The recipient's display name or email address. Includes recipients in the "to", "cc", and "bcc" header fields. You can use the local part of the email address. For example, "example" and "example@" both match "example@gmail.com". This field is case-insensitive. | Optional |
subject | The email subject. | Optional |
query | Returns messages matching the specified query. Supports the same query format as the Gmail search box. For example, "from:someuser@example.com is:unread". | Optional |
has-attachments | Whether the message has any attachments. | Optional |
size | The size of the entire RFC822 message in bytes, including all headers and attachments. | Optional |
add-labels | A comma-separated list of labels to add to the message. | Optional |
remove-labels | A comma-separated list of labels to remove from the message. | Optional |
forward | The email address that the message is to be forwarded to. The email needs to be configured as a forwarding address, see https://support.google.com/mail/answer/10957?hl=en#null. | Optional |
size-comparison | The message size in bytes compared to the size field. Possible values are: larger, smaller. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
Gmail.Filter.ID | String | The filter ID. |
Gmail.Filter.Mailbox | String | The mailbox containing the filter. |
Gmail.Filter.Criteria | Unknown | The filter criteria. |
Gmail.Filter.Action | Unknown | The filter action. |
#
Command Example!gmail-add-filter user-id=admin@demistodev.com has-attachments=true forward=test@demistodev.com subject=phishing
#
Context Example#
Human Readable Output#
New filter:
ID Criteria Action ANe1BmjTS0eUGRX96ncj1FZmbPKrXrJvVG05Pg hasAttachment: true
subject: Scamforward: test@demistodev.com
#
gmail-list-filtersLists all filters in a user's mailbox.
#
Base Commandgmail-list-filters
#
InputArgument Name | Description | Required |
---|---|---|
user-id | The user's email address. The "me" special value can be used to indicate the authenticated user. | Required |
limit | The limit of the results list. Default is 100. | Optional |
address | The list filters associated with the email address. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
Gmail.Filter.ID | String | The filter ID. |
Gmail.Filter.Mailbox | String | The mailbox containing the filter. |
Gmail.Filter.Criteria | Unknown | The filter criteria. |
Gmail.Filter.Action | Unknown | The filter action. |
#
Command Example!gmail-list-filters user-id=user@domain.io
#
Context Example#
Human Readable Output#
filters:
ID Criteria Action ANe1BmiEVq9vNXrutJQzaEKFaK2odmTyfG29RA from: user@domain.io addLabelIds: TRASH
#
gmail-remove-filterRemoves a Filter.
#
Base Commandgmail-remove-filter
#
InputArgument Name | Description | Required |
---|---|---|
user-id | The user's email address. The "me" special value can be used to indicate the authenticated user. | Required |
filter_ids | A comma-separated list of filter IDs (can be retrieve using gmail-list-filters command). | Required |
#
Context OutputThere is no context output for this command.
#
Command Example!gmail-remove-filter user-id=admin@demistodev.com filter_ids=id1
#
Human Readable Outputfilters were removed successfully.
#
gmail-hide-user-in-directoryHides a user's contact information in the Global Directory, for example email address and profile information.
#
Base Commandgmail-hide-user-in-directory
#
InputArgument Name | Description | Required |
---|---|---|
user-id | The user's email address. The "me" special value can be used to indicate the authenticated user. | Required |
visible-globally | Whether to hide the user's visibility in the Global Directory. Can be true to show the user in the directory (default) or false to hide the user. Possible values are: true, false. Default is true. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
Account.Type | String | The account type. For example, "AD", "LocalOS", "Google", "AppleID", and so on. |
Account.ID | String | The unique ID for the account (integration specific). For AD accounts this is the Distinguished Name (DN). |
Account.DisplayName | String | The display name. |
Account.Email.Address | String | The email address of the account. |
Account.Gmail.Address | Unknown | The email assigned with current account. |
Account.Domain | String | The domain of the account. |
Account.Username | String | The username of the account. |
Account.OrganizationUnit | String | The Organization Unit (OU) of the account. |
Account.VisibleInDirectory | Boolean | Whether the account is visible in the Global Directory. |
Account.Groups | String | Groups in which the account belongs (integration specific). For example, for AD these are groups of which the account is memberOf. |
#
Command Example!gmail-hide-user-in-directory user-id=user@domain.io visible-globally=false
#
Context Example#
Human Readable Outputuser@domain.io:#
User
Type ID Username DisplayName Groups CustomerId Domain VisibleInDirectory 118105533760233960163 user1 user1 test1 admin#directory#user C03puekhd domain.io Address: user@domain.io false
#
gmail-set-passwordSets the password for the user.
#
Base Commandgmail-set-password
#
InputArgument Name | Description | Required |
---|---|---|
user-id | The user's email address. The "me" special value can be used to indicate the authenticated user. | Required |
password | A string formatted password for the user. Depends on the password policy of the organization. | Required |
#
Context OutputThere is no context output for this command.
#
Command Example!gmail-set-password user-id=user@domain.io password=user@1234
#
Human Readable OutputUser user@domain.io password has been set.
#
gmail-get-autoreplyReturns the auto-reply message set for the user-account.
#
Base Commandgmail-get-autoreply
#
InputArgument Name | Description | Required |
---|---|---|
user-id | The user's email address. The "me" special value can be used to indicate the authenticated user. | Required |
#
Context OutputPath | Type | Description |
---|---|---|
Account.Gmail.AutoReply.EnableAutoReply | Boolean | A flag that controls whether Gmail automatically replies to messages. |
Account.Gmail.AutoReply.ResponseBody | String | Response body in plain text format. |
Account.Gmail.AutoReply.ResponseSubject | String | Optional text to add to the subject line in vacation responses. To enable auto-replies, the response subject or the response body must not be empty. |
Account.Gmail.AutoReply.RestrictToContact | String | A flag that determines whether responses are sent to recipients who are not in the user's list of contacts. |
Account.Gmail.AutoReply.RestrictToDomain | String | A flag that determines whether responses are sent to recipients who are outside of the user's domain. This feature is only available for G Suite users. |
Account.Gmail.Address | String | Email assigned with the current account. |
#
Command Example!gmail-get-autoreply user-id=user@domain.io
#
Context Example#
Human Readable Outputuser@domain.io:#
User
EnableAutoReply ResponseBody ResponseSubject RestrictToContact RestrictToDomain EnableAutoReply false body_test subject_test false false false
#
gmail-set-autoreplySets the auto-reply for the user. Note: If the body is not set, the current body will be deleted.
#
Base Commandgmail-set-autoreply
#
InputArgument Name | Description | Required |
---|---|---|
user-id | The user's email address. The "me" special value me can be used to indicate the authenticated user. | Required |
enable-autoReply | Whether Gmail automatically replies to messages. Set to true to automatically reply (default). Possible values are: true, false. Default is true. | Optional |
response-subject | Optional text to add to the subject line in vacation responses. To enable auto-replies, either the response subject or the response body must not be empty. | Optional |
response-body | Response body in plain text format. | Optional |
response-body-entry-id | Sets the away/vacation message by passing a War Room entryID of the file for the given user. | Optional |
start-time | Sets a start date for the vacation message to be enabled for the given user. The valid format is YYYY-MM-DD or Epoch time in milliseconds. | Optional |
end-time | Sets an end date for the vacation message to be enabled for the given user. The valid format is YYYY-MM-DD or Epoch time in milliseconds. | Optional |
contacts-only | Whether to send away/vacation messages to users in the contact list when set to true. Possible values are: true, false. Default is false. | Optional |
domain-only | Whether to prevent sending away/vacation messages to recipients who are outside of the user's domain when set to true. Possible values are: true, false. Default is false. | Optional |
response-body-type | Whether message response body type is text or HTML. Possible values are: HTML, Text. Default is Text. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
Account.Gmail.AutoReply.EnableAutoReply | Boolean | A flag that controls whether Gmail automatically replies to messages. |
Account.Gmail.AutoReply.ResponseBody | String | Response body in plain text format. |
Account.Gmail.AutoReply.ResponseSubject | String | Optional text to add to the subject line in vacation responses. To enable auto-replies, either the response subject or the response body must not be empty. |
Account.Gmail.AutoReply.RestrictToContact | String | Determines whether responses are sent to recipients who are not in the user's list of contacts. |
Account.Gmail.AutoReply.RestrictToDomain | String | Determines whether responses are sent to recipients who are outside of the user's domain. This feature is only available for G Suite users. |
Account.Gmail.Address | String | Email assigned with the current account. |
Account.Gmail.AutoReply.ResponseBodyHtml | String | Response body in HTML format. |
Account.Gmail.AutoReply.StartTime | Number | Start time for sending auto-replies. |
Account.Gmail.AutoReply.EndTime | Number | End time for sending auto-replies. |
#
Command Example!gmail-set-autoreply user-id=user@domain.io enable-autoReply=false response-body=body_test response-subject=subject_test
#
Context Example#
Human Readable Outputuser@domain.io:#
User
EnableAutoReply ResponseBody ResponseSubject RestrictToContact RestrictToDomain EnableAutoReply false body_test subject_test false false false
#
gmail-delegate-user-mailboxAdds a delegate to the mailbox, without sending any verification email. The delegate user must be a member of the same G Suite organization as the delegator user and must be added using their primary email address, and not an email alias.
#
Base Commandgmail-delegate-user-mailbox
#
InputArgument Name | Description | Required |
---|---|---|
user-id | The user's email address. The "me" special value can be used to indicate the authenticated user. | Required |
delegate-email | The email address of the delegate. | Required |
#
Context OutputThere is no context output for this command.
#
Command Example !gmail-delegate-user-mailbox delegate-email=shai@demistodev.com user-id=admin@demistodev.com
#
Human Readable OutputEmail shai@demistodev.com has been delegated
#
send-mailSends mail using Gmail.
#
Base Commandsend-mail
#
InputArgument Name | Description | Required |
---|---|---|
to | The email addresses of the receiver. | Required |
from | The email address of the sender. | Optional |
senderDisplayName | The sender Name that appears on the receiver side. | Optional |
body | The content (body) of the email to be sent in plain text. | Optional |
subject | The subject for the email to be sent. | Required |
attachIDs | A comma-separated list of IDs of War Room entries that contain the files that need be attached to the email. | Optional |
cc | The additional recipient email address (CC). | Optional |
bcc | The additional recipient email address (BCC). | Optional |
htmlBody | The content (body) of the email to be sent in HTML format. | Optional |
force_handle_htmlBody | Choose true if you wish to handle html body as MimeMultipart. Possible values are: False, True. Default is False. | Optional |
replyTo | The address that needs to be used to reply to the message. | Optional |
attachNames | A comma-separated list of new names to rename attachments corresponding to the order that they were attached to the email. Examples - To rename first and third file attachNames=new_fileName1,,new_fileName3 To rename second and fifth files attachNames=,new_fileName2,,,new_fileName5. | Optional |
attachCIDs | A comma-separated list of CID images to embed attachments inside the email. | Optional |
transientFile | Textual name for an attached file. Multiple files are supported as a comma-separated list. For example, transientFile="t1.txt,temp.txt,t3.txt" transientFileContent="test 2,temporary file content,third file content" transientFileCID="t1.txt@xxx.yyy,t2.txt@xxx.zzz"). | Optional |
transientFileContent | Content for the attached file. Multiple files are supported as a comma-separated list. For example, transientFile="t1.txt,temp.txt,t3.txt" transientFileContent="test 2,temporary file content,third file content" transientFileCID="t1.txt@xxx.yyy,t2.txt@xxx.zzz"). | Optional |
transientFileCID | CID image for an attached file to include within the email body. Multiple files are supported as a comma-separated list. (e.g. transientFile="t1.txt,temp.txt,t3.txt" transientFileContent="test 2,temporary file content,third file content" transientFileCID="t1.txt@xxx.yyy,t2.txt@xxx.zzz"). | Optional |
additionalHeader | A CSV list of additional headers in the format: headerName=headerValue. For example: "headerName1=headerValue1,headerName2=headerValue2". | Optional |
templateParams | 'Replaces {varname} variables with values from this parameter. Expected values are in the form of a JSON document. For example, {"varname" :{"value" "some value", "key": "context key"}}. Each var name can either be provided with the value or a context key to retrieve the value. Note that only context data is accessible for this argument, while incident fields are not.'. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
Gmail.SentMail.ID | String | The immutable ID of the message. |
Gmail.SentMail.Labels | String | The list of IDs of labels applied to this message. |
Gmail.SentMail.ThreadId | String | The ID of the thread in which the message belongs. |
Gmail.SentMail.To | String | The recipient of the email. |
Gmail.SentMail.From | Unknown | The sender of the email. |
Gmail.SentMail.Cc | String | The additional recipient email address (CC). |
Gmail.SentMail.Bcc | String | The additional recipient email address (BCC). |
Gmail.SentMail.Subject | String | The subject of the email. |
Gmail.SentMail.Body | Unknown | The plain-text version of the email. |
Gmail.SentMail.MailBox | String | The mailbox from which the mail was sent. |
#
Command Example!send-mail subject="this is the subject" to=test@demistodev.com body="this is the body"
#
Context Example#
Human Readable Output#
Email sent:
Type ID To From Subject Body Labels ThreadId Gmail 16d43287fc29b71a test@demistodev.com admin@demistodev.com this is the subject this is the body SENT 16d43287fc29b71a
#
reply-mailReplies to a mail using Gmail.
#
Base Commandreply-mail
#
InputArgument Name | Description | Required |
---|---|---|
to | The email addresses of the recipients. | Required |
from | The email address of the sender. | Optional |
body | The contents (body) of the email to be sent in plain text. | Optional |
subject | The subject of the email to be sent. Should be the same as the subject of the email you are replying to in order for the reply to be a part of the same conversation. | Required |
inReplyTo | A comma-separated list of message IDs to reply to. | Required |
references | A comma-separated list of message IDs to refer to. | Optional |
attachIDs | A comma-separated list of IDs of War Room entries that contain the files that need to be attached to the email. | Optional |
cc | The additional recipient email addresses (CC). | Optional |
bcc | The additional recipient email addresses (BCC). | Optional |
htmlBody | The content (body) of the email to be sent in HTML format. | Optional |
replyTo | The address that needs to be used to reply to the message. | Optional |
attachNames | A comma-separated list of new names used to rename attachments corresponding to the order in which they were attached to the email. Examples - To rename the first and third file: attachNames=new_fileName1,,new_fileName3 To rename the second and fifth files: attachNames=,new_fileName2,,,new_fileName5. | Optional |
attachCIDs | A comma-separated list of CID images to embed as attachments inside the email. | Optional |
transientFile | Textual name for an attached file. Multiple files are supported as a comma-separated list. For example, transientFile="t1.txt,temp.txt,t3.txt" transientFileContent="test2,temporary file content,third file content" transientFileCID="t1.txt@xxx.yyy,t2.txt@xxx.zzz"). | Optional |
transientFileContent | Content for the attached file. Multiple files are supported as a comma-separated list. For example, transientFile="t1.txt,temp.txt,t3.txt" transientFileContent="test2,temporary file content,third file content" transientFileCID="t1.txt@xxx.yyy,t2.txt@xxx.zzz"). | Optional |
transientFileCID | CID image for an attached file to include within the email body. Multiple files are supported as a comma-separated list. (e.g. transientFile="t1.txt,temp.txt,t3.txt" transientFileContent="test 2,temporary file content,third file content" transientFileCID="t1.txt@xxx.yyy,t2.txt@xxx.zzz"). | Optional |
additionalHeader | A comma-separated list of additional headers in the format: headerName=headerValue. For example: "headerName1=headerValue1,headerName2=headerValue2". | Optional |
templateParams | 'Replaces {varname} variables with values from this parameter. Expected values are in the form of a JSON document. For example, {"varname" :{"value" "some value", "key": "context key"}}. Each var name can either be provided with the value or a context key to retrieve the value. Note that only context data is accessible for this argument, while incident fields are not.'. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
Gmail.SentMail.ID | String | The immutable ID of the message. |
Gmail.SentMail.Labels | String | The list of IDs of the labels applied to this message. |
Gmail.SentMail.ThreadId | String | The ID of the thread in which the message belongs. |
Gmail.SentMail.To | String | The recipients of the email. |
Gmail.SentMail.From | Unknown | The sender of the email. |
Gmail.SentMail.Cc | String | The additional recipient email addresses (CC). |
Gmail.SentMail.Bcc | String | The additional recipient email addresses (BCC). |
Gmail.SentMail.Subject | String | The subject of the email. |
Gmail.SentMail.Body | Unknown | The plain-text version of the email. |
Gmail.SentMail.MailBox | String | The mailbox from which the mail was sent. |
#
Command Example !reply-mail subject="this is the subject" to=test@demistodev.com replyTo=test@demistodev.com body="this is the body" inReplyTo=<CAEvnzx+zEeFJ1U5g4FOfHKeWe-H3hU7kGiKaK7q0F0A@mail.gmail.com> references=<CAEvnzx+zEeFJ1U5g4FOfHKeWe-H3hU7kGiKaK7q0F0A@mail.gmail.com>
#
Context Example#
Human Readable Output#
Email sent:
Type ID To From Subject Body Labels ThreadId Gmail 16d43287fc29b71a test@demistodev.com admin@demistodev.com this is the subject this is the body SENT 16d43287fc29b71a
#
gmail-remove-delegated-mailboxRemoves a delegate from the mailbox without sending any verification email. The delegate user must be a member of the same G Suite organization as the delegator user using their primary email address, and not an email alias.
#
Base Commandgmail-remove-delegated-mailbox
#
InputArgument Name | Description | Required |
---|---|---|
user-id | The user's email address. The "me" special value can be used to indicate the authenticated user. | Required |
removed-mail | The email address to remove from delegation. | Required |
#
Context OutputThere is no context output for this command.
#
Command Example!gmail-remove-delegated-mailbox removed-mail=shai@demistodev.com user-id=admin@demistodev.com
#
Human Readable OutputEmail shai@demistodev.com has been removed from delegation
#
gmail-get-roleGets details of a specific role.
#
Base Commandgmail-get-role
#
InputArgument Name | Description | Required |
---|---|---|
role-id | The ID of the role. Can be retrieved using the get-user-roles command. | Required |
customer-id | The immutable Google Apps ID. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
Gmail.Role.ETag | String | The ETag of the resource. |
Gmail.Role.IsSuperAdminRole | Boolean | Indicates whether the role is a super admin role. |
Gmail.Role.IsSystemRole | Boolean | Indicates whether the role is a pre-defined system role. |
Gmail.Role.Kind | String | The kind of the role. |
Gmail.Role.Description | String | The description of the role. |
Gmail.Role.ID | String | The ID of the role. |
Gmail.Role.Name | String | The name of the role. |
Gmail.Role.Privilege.ServiceID | String | The ID of the service this privilege is for. |
Gmail.Role.Privilege.Name | String | The name of the privilege. |
#
Command Example!gmail-get-role role-id=13801188331880449 customer-id=C03puekhd
#
Context Example#
Human Readable Output#
Role 13801188331880449 details:
ETag IsSuperAdminRole IsSystemRole Kind Description ID Name HKDSgTnCxrWl3RtRnlZSCPY3NjdWJxz53nrhwSz7ob4/Y2lKFcwh-5YCBqMXBNWR3Ezo8ik true true admin#directory#role Google Apps Administrator Seed Role 13801188331880449 _SEED_ADMIN_ROLE
#
Role 13801188331880449 privileges:
ServiceID Name 01ci93xb3tmzyin SUPER_ADMIN 01664s550kmxmin ROOT_APP_ADMIN 03j2qqm31d4j55e ROOT_APP_ADMIN 0319y80a15kueje ROOT_APP_ADMIN 03znysh70xi7xn7 ROOT_APP_ADMIN 03fwokq01e2ht7x ROOT_APP_ADMIN 00haapch16h1ysv ROOT_APP_ADMIN 037m2jsg3ckz96v ROOT_APP_ADMIN 03cqmetx3hnlpuf ROOT_APP_ADMIN 03hv69ve4bjwe54 ROOT_APP_ADMIN 01tuee744837sjz ROOT_APP_ADMIN 02afmg282jiquyg ROOT_APP_ADMIN 02w5ecyt3pkeyqi ROOT_APP_ADMIN 00vx122734tbite ROOT_APP_ADMIN 03dy6vkm2sk0pzo ROOT_APP_ADMIN 02pta16n3efhw69 ROOT_APP_ADMIN 01ksv4uv2d2noaq ROOT_APP_ADMIN 0279ka651l5iy5q ROOT_APP_ADMIN 01yyy98l4k9lq4l ROOT_APP_ADMIN 02zbgiuw2wdxo5p ROOT_APP_ADMIN 03whwml44f3n4vd ROOT_APP_ADMIN 039kk8xu49mji9t ROOT_APP_ADMIN 02afmg283v5nmx6 ROOT_APP_ADMIN 02bn6wsx379ol8g ROOT_APP_ADMIN 00tyjcwt49hs5nq ROOT_APP_ADMIN 00meukdy0whjvor ROOT_APP_ADMIN
#
gmail-send-as-addCreates a custom "from" send-as alias. If an SMTP MSA is specified, Gmail will attempt to connect to the SMTP service to validate the configuration before creating the alias. If ownership verification is required for the alias, a message will be sent to the email address and the resource's verification status will be set to pending; otherwise, the resource will be created with verification status set to accepted. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias.
This command is only available to service account clients who have been delegated domain-wide authority.
#
Base Commandgmail-send-as-add
#
InputArgument Name | Description | Required |
---|---|---|
user_id | The user's email address. | Required |
send_as_email | The email address that appears in the "From:" header for email sent using this alias. | Required |
display_name | The name that appears in the "From:" header for mail sent using this alias. For custom "from" addresses, when this is empty, Gmail will populate the "From:" header with the name that is used for the primary address associated with the account. If the admin disabled the ability for users to update their name format, requests to update this field for the primary login will silently fail. | Optional |
signature | An optional HTML signature that is included in messages composed with this alias in the Gmail web UI. | Optional |
reply_to_address | An optional email address that is included in a "Reply-To:" header for email sent using this alias. If this is empty, Gmail will not generate a "Reply-To:" header. | Optional |
is_default | Whether this address is selected as the default "From:" address in situations such as composing a new message or sending a vacation auto-reply. Every Gmail account has exactly one default send-as address, so the only legal value that clients may write to this field is true. Changing this from false to true for an address will result in this field becoming false for the other previous default address. Default is "false". Possible values are: true, false. Default is false. | Optional |
treat_as_alias | Whether Gmail should treat this address as an alias for the user's primary email address. This setting only applies to custom "from" aliases. Default is "false". Possible values are: true, false. Default is false. | Optional |
smtp_host | The hostname of the SMTP service. Required for SMTP configuration. | Optional |
smtp_port | The port of the SMTP service. Required for SMTP configuration. | Optional |
smtp_username | The username that will be used for authentication with the SMTP service. This is a write-only field that can be specified in requests to create or update SendAs settings. | Optional |
smtp_password | The password that will be used for authentication with the SMTP service. This is a write-only field that can be specified in requests to create or update SendAs settings. | Optional |
smtp_securitymode | The protocol that will be used to secure communication with the SMTP service. Required for SMTP configuration. Available Options: SECURITY_MODE_UNSPECIFIED - Unspecified security mode. NONE - Communication with the remote SMTP service is unsecured. Requires port 25. SSL - Communication with the remote SMTP service is secured using SSL. STARTTLS - Communication with the remote SMTP service is secured using STARTTLS. Possible values are: SECURITY_MODE_UNSPECIFIED, NONE, SSL, STARTTLS. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
Gmail.SendAs.userId | String | The user's email address. |
Gmail.SendAs.sendAsEmail | String | The updated send-as alias. |
Gmail.SendAs.signature | String | An optional HTML signature that is included in messages composed with this alias in the Gmail web UI. |
Gmail.SendAs.isPrimary | Boolean | Whether this address is the primary address used to login to the account. |
Gmail.SendAs.isDefault | Boolean | Whether this address is selected as the default "From:" address in situations. |
Gmail.SendAs.treatAsAlias | Boolean | Whether Gmail should treat this address as an alias for the user's primary email address. |
Gmail.SendAs.smtpMsaHost | String | The hostname of the SMTP service. |
Gmail.SendAs.smtpMsaPort | String | The port of the SMTP service. |
Gmail.SendAs.smtpMsaSecurityMode | String | The protocol that will be used to secure communication with the SMTP service. |
Gmail.SendAs.verificationStatus | String | Indicates whether this address has been verified for use as a send-as alias. |
Gmail.SendAs.replyToAddress | String | A name that appears in the "From:" header for email sent using this alias. |
#
Command Example!gmail-send-as-add send_as_email=user2@domain.io user_id=user1@domain.io
#
context Example#
Human Readable Outputuser2@domain.io" send-as alias created for "user1@domain.io".#
A custom "
Send As Email Treat As Alias user2@domain.io false
#
gmail-forwarding-address-addCreates a forwarding address. If ownership verification is required, a message will be sent to the recipient and the resource's verification status will be set to pending; otherwise, the resource will be created with verification status set to accepted. This method is only available to service account clients that have been delegated domain-wide authority. The special value "me" can be used to indicate the authenticated user.
#
Base Commandgmail-forwarding-address-add
#
InputArgument Name | Description | Required |
---|---|---|
forwarding_email | A comma-separated list of email addresses to which messages can be forwarded. | Required |
user_id | The user email address or the user ID, use the !gmail-list-users command, in order to get the user ID. | Required |
#
Context OutputPath | Type | Description |
---|---|---|
Gmail.ForwardingAddress.forwardingEmail | String | An email address to which messages can be forwarded. |
Gmail.ForwardingAddress.userId | String | The user's email address. |
Gmail.ForwardingAddress.verificationStatus | String | Indicates whether this address has been verified and is usable for forwarding. |
#
Command example!gmail-forwarding-address-add forwarding_email="test@gmail.com" user_id="me"
#
Context Example#
Human Readable Output#
Forwarding addresses results for "me":
forwardingEmail userId verificationStatus test@gmail.com me accepted
#
gmail-forwarding-address-updateUpdates the auto-forwarding setting for the specified account. A verified forwarding address must be specified when auto-forwarding is enabled.
#
Base Commandgmail-forwarding-address-update
#
InputArgument Name | Description | Required |
---|---|---|
disposition | The state that a message should be left in after it has been forwarded. Possible values are: archive, leaveInInbox, markRead, trash. | Optional |
forwarding_email | A comma-separated list of emails addresses to which messages can be forwarded. | Required |
user_id | The user email address or the user ID, use the !gmail-list-users command, in order to get the user ID. | Required |
#
Context OutputPath | Type | Description |
---|---|---|
Gmail.ForwardingAddress.forwardingEmail | String | An email address to which messages can be forwarded. |
Gmail.ForwardingAddress.userId | String | The user's email address. |
Gmail.ForwardingAddress.Disposition | String | The state that a message should be left in after it has been forwarded. |
Gmail.ForwardingAddress.Enabled | Boolean | Indicates whether all incoming mail is automatically forwarded to another address. |
#
Command example!gmail-forwarding-address-update forwarding_email="test@gmail.com" user_id="me" disposition="archive"
#
Context Example#
Human Readable Output#
Forwarding addresses update results for "me":
forwardingEmail userId disposition enabled test@gmail.com me archive true
#
gmail-forwarding-address-getGets the specified forwarding address or a list of the forwarding addresses for the specified account.
#
Base Commandgmail-forwarding-address-get
#
InputArgument Name | Description | Required |
---|---|---|
user_id | The user email address or the user ID, use the !gmail-list-users command, in order to get the user ID. | Required |
forwarding_email | The forwarding address to be retrieved. | Required |
#
Context OutputPath | Type | Description |
---|---|---|
Gmail.ForwardingAddress.userId | String | The user email address or the user ID, use the !gmail-list-users command, in order to get the user ID. |
Gmail.ForwardingAddress.forwardingEmail | String | An email address to which messages can be forwarded. |
#
Command example!gmail-forwarding-address-get forwarding_email="test@gmail.com" user_id="me"
#
Context Example#
Human Readable Output#
Get forwarding address for: "me"
forwardingEmail verificationStatus test@gmail.com accepted
#
gmail-forwarding-address-removeDeletes the specified forwarding address and revokes any verification that may have been required. This method is only available to service account clients that have been delegated domain-wide authority.
#
Base Commandgmail-forwarding-address-remove
#
InputArgument Name | Description | Required |
---|---|---|
user_id | The user email address or the user ID, use the !gmail-list-users command, in order to get the user ID. | Required |
forwarding_email | The forwarding address to be retrieved. | Required |
#
Context OutputThere is no context output for this command.
#
Command example!gmail-forwarding-address-remove forwarding_email="test@gmail.com" user_id="me"
#
Human Readable OutputForwarding address "test@gmail.com" for "me" was deleted successfully .
#
gmail-forwarding-address-listLists the forwarding addresses for the specified account.
#
Base Commandgmail-forwarding-address-list
#
InputArgument Name | Description | Required |
---|---|---|
user_id | The user email address or the user ID, use the !gmail-list-users command, in order to get the user ID. The special value "me" can be used to indicate the authenticated user. | Required |
limit | The maximum number of addresses to return. The default value is 50. | Optional |
#
Context OutputPath | Type | Description |
---|---|---|
Gmail.ForwardingAddress.forwardingEmail | String | An email address to which messages can be forwarded. |
Gmail.ForwardingAddress.verificationStatus | String | Indicates whether this address has been verified and is usable for forwarding. |
#
Command example!gmail-forwarding-address-list user_id="me"
#
Context Example#
Human Readable Output#
Forwarding addresses list for: "me"
forwardingEmail verificationStatus test@gmail.com accepted test1@gmail.com accepted test2@gmail.com accepted test3@gmail.com accepted