Skip to main content

Search in mailboxes Gmail (Loop) with polling

This Playbook is part of the Gmail Pack.#

Supported versions

Supported Cortex XSOAR versions: 6.5.0 and later.

This playbook should only run as a sub-playbook for the Search-all-mailboxes - Gmail playbook, it should not run alone.

Dependencies#

This playbook uses the following sub-playbooks, integrations, and scripts.

Sub-playbooks#

This playbook does not use any sub-playbooks.

Integrations#

Gmail

Scripts#

  • Set
  • DeleteContext

Commands#

gmail-search-all-mailboxes

Playbook Inputs#


NameDescriptionDefault ValueRequired
afterSearch for messages sent after a specific date. For example, 2018/05/06Optional
beforeSearch for messages sent before a specific date. For example, 2018/05/09Optional
fieldsEnables partial responses to be retrieved in a comma-separated list. For more information, see https://developers.google.com/gdata/docs/2.0/basics\#PartialResponse.Optional
filenameAttachments with a certain name or file type. For example, "pdf" or "report.pdf"Optional
fromSpecifies the sender. For example, "john"Optional
toSpecifies the receiver. For example, "john"Optional
has-attachmentsWhether to search for messages sent with attachments.Optional
inMessages in any folder, including Spam and Trash. For example, shoppingOptional
include-spam-trashIncludes messages from SPAM and TRASH in the results. (Default: false)Optional
labels-idsReturns messages with labels that match all of the specified label IDs in a comma-separated list.Optional
page-tokenThis argument is not usableOptional
queryReturns 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
subjectWords in the subject line. For example, "alert"Optional
searching_accountsUsed to track a search's progressOptional

Playbook Outputs#


PathDescriptionType
Gmail.MailboxesThe Gmail mailbox.unknown
Gmail.IDThe inner ID of the Gmail message.unknown
Gmail.ThreadIdThe thread ID.unknown
Gmail.FormatThe MIME type of the email.unknown
Gmail.LabelsThe labels of a specific email.unknown
Gmail.ToThe email address of the receiver.unknown
Gmail.FromThe email address of the sender.unknown
Gmail.CcThe additional recipient email address (CC).unknown
Gmail.BccThe additional recipient email address (BCC).unknown
Gmail.SubjectThe subject of the specific email.unknown
Gmail.BodyThe content of the email.unknown
Gmail.AttachmentsThe attachments of the email. IDs are separated by commas.unknown
Gmail.HeadersAll headers of specific mail (list).unknown
Email.Attachments.entryIDEmail Attachments. IDs are separated by commas.unknown
NewPageTokenIn the next iteration, additional accounts will be imported using this output.unknown
StopThe result of this output causes the loop to end.unknown
SearchFromAccountIndexA search is performed from an account index (Enables the search process to be followed).unknown
SearchToAccountIndexA search is performed to an account index (Enables the search process to be followed).unknown

Playbook Image#


Search in mailboxes Gmail (Loop) with polling