Document toolboxDocument toolbox

IMAP

[ 1 Connect IMAP with Devo SOAR ] [ 2 Actions for IMAP ] [ 2.1 Read Emails ] [ 2.1.1 Input Field ] [ 2.1.2 Output ] [ 2.2 Remove Labels ] [ 2.2.1 Input Field ] [ 2.2.2 Output ] [ 2.3 Move Email ] [ 2.3.1 Input Field ] [ 2.3.2 Output ] [ 3 Release Notes ]

Internet Message Access Protocol is a standard protocol used by e-mail clients to retrieve messages from a mail server over a TCP/IP connection. IMAP is defined by RFC 3501.

Connect IMAP with Devo SOAR

  1. Navigate to Automations > Integrations.

  2. Search for IMAP.

  3. Click Details, then the + icon. Enter the required information in the following fields.

  4. Label: Enter a connection name.

  5. Reference Values: Define variables here to templatize integration connections and actions. For example, you can use https://www.{{hostname}}.com where, hostname is a variable defined in this input. For more information on how to add data, see 'Add Data' Input Type for Integrations.

  6. Verify SSL: Select option to verify connecting server's SSL certificate (Default is Verify SSL Certificate).

  7. Remote Agent: Run this integration using the Devo SOAR Remote Agent.

  8. IMAP Server Name: Server name for your IMAP connection.

  9. IMAP Server Port (Usually 993): Server port for your IMAP connection.

  10. Email Address/Username: Username for IMAP.

  11. Password: Password to log in with.

  12. After you've entered all the details, click Connect.

Actions for IMAP

Read Emails

Reads emails using IMAP.

Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

Input Name

Description

Required

Input Name

Description

Required

Mailbox Name

Mailbox name of a specific mailbox. For example: Inbox.

 

If using IMAP for gmail, for Inbox and custom labels use 'Inbox', 'labelName' and for other folders like Sent, Drafts use '[Gmail]/Sent Mail', '[Gmail]/Drafts', '[Gmail]/Important', '[Gmail]/Spam', '[Gmail]/Trash'

Required

 

All or Unread

Whether to read ALL emails or UNREAD emails.

Required

Mark Read

Automatically mark messages read when they are pulled by Devo SOAR (default is 'True' to mark read).

Required

Download Attachments

Automatically download attachments. Doing so may significantly increase processing time. (Default is 'True' to get attachment).

Required

Filtering Maximum Message Age

Filter messages based on maximum age (in seconds) since message receipt time (default is to retrieve all messages).

Required

Filtering Message Limit

Limit the number of messages to pull at once (default is 100 messages).

Required

Output

Provides the details of an email.

``` {json}{ "Attachment Count": 0, "Attachments": [], "CC": "", "Date": "Thu, 19 Apr 2018 08:18:49 +0000 (UTC)", "From": "Google no-reply@accounts.google.com", "Message Body": "Access for less secure apps has been turned on\r\n\r\n\r\n\r\nHi vera,\r\nYou recently changed your security settings so that your Google Account\r\ntestvera004@gmail.com is no longer protected by modern security standards.\r\n\r\nPlease be aware that it is now easier for an attacker to break into your\r\naccount. You can make your account safer again by undoing this change here\r\nhttps://myaccount.google.com/lesssecureapps, then switching to apps made\r\nby Google such as Gmail to access your account.\r\n\r\nDon't recognize this activity?\r\nReview your recently used devices\r\nhttps://accounts.google.com/AccountChooser?Email=testvera004@gmail.com&continue=https://myaccount.google.com/device-activity?rfn%3D28%26rfnc%3D1%26eid%3D3547500692519305078%26et%3D0%26asae%3D2\r\nnow.\r\nThe Google Accounts team\r\n\r\n\r\n\r\nThis email can't receive replies. For more information, visit the Google\r\nAccounts Help Center https://support.google.com/accounts/answer/6010255.\r\n\r\n\r\n\r\nYou received this mandatory email service announcement to update you about\r\nimportant changes to your Google product or account.\r\n\r\n© 2018 Google Inc., 1600 Amphitheatre Parkway, Mountain View, CA 94043, USA\r\net:28", "Message Headers": { "ARC-Authentication-Results": "i=1; mx.google.com;\r\n dkim=pass header.i=@accounts.google.com header.s=20161025 header.b=xKUZxOEX;\r\n spf=pass (google.com: domain of 36ldywggtc8k23-6t40dprr39287.v33v0t.r318t78at6pffjv1px0.r31@gaia.bounces.google.com designates 209.85.220.69 as permitted sender) smtp.mailfrom=36lDYWggTC8k23-6t40Dprr39287.v33v0t.r318t78At6pFFJv1px0.r31@gaia.bounces.google.com;\r\n dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=accounts.google.com", "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;\r\n h=to:from:subject:message-id:feedback-id:date:mime-version\r\n :dkim-signature:arc-authentication-results;\r\n bh=SaU2wjwURHUqMwAeURA0YVsZG1qNFDHjgb7KjnN8oZ8=;\r\n b=T5t2Du81T14npMk5SvaMQ5IlV4lrZTGPF/coHTqK1P9qrPZvXhBvkPrC4GGb/fInqK\r\n 7USnfBDypCTyJ5tApHvlq20dsNyLSx9YPGo43ky52ouSN5TNZ6oyzIolU0zk9DWHBajY\r\n UthEPh6Aw5V/vvfq+du1jpnj3ARj/KokFkgxEbN/PcdywWTNHDXB1Of4zcZxIzsOEdsv\r\n QfxbI29cMpA0SrmiyoSaZyXamMhiMrB/fV2YIswWsPKuYUNgOUDZ8ZfTsr8JNh/Wc1i6\r\n lY2EYVVJgq5BTLr99fKhnTPk/SJn3Rh7zFEiQLkix29PjuKbEdC232UDFZnepCewzaMI\r\n 3G/Q==", "ARC-Seal": "i=1; a=rsa-sha256; t=1524125930; cv=none;\r\n d=google.com; s=arc-20160816;\r\n b=pw8gOhrtEu+yfyK3JZsM9kR5luXK/0vnhVE8JcxG1I2Vym8p2+2e7IFp99baGPQvkp\r\n LZkPeg5tzYnjDbYFobsTsBhwGIEe0O65XBT9BpJEo99fLHeB9rw1ABMwce3Ry5hoD8dh\r\n K4iC+I9M5UarIHuabKMyUWsXN27+D2J84U32Qrm6R+pNvRBBIP5NOjUJD3tvmgRqFB46\r\n j6xOzt5uzHhZlcLqJeGpQG9hLG1QWFzyeinM1T+2nGfXmDPsbRSfsgHDCw+UvYqqiZXs\r\n tee4D5hMKI4+2pwZMiq5//Ol4lq3el86A3GMDdIprXB6VeSWJl3UeXKc8GicIJhyXAQO\r\n UIQg==", "Authentication-Results": "mx.google.com;\r\n dkim=pass header.i=@accounts.google.com header.s=20161025 header.b=xKUZxOEX;\r\n spf=pass (google.com: domain of 36ldywggtc8k23-6t40dprr39287.v33v0t.r318t78at6pffjv1px0.r31@gaia.bounces.google.com designates 209.85.220.69 as permitted sender) smtp.mailfrom=36lDYWggTC8k23-6t40Dprr39287.v33v0t.r318t78At6pFFJv1px0.r31@gaia.bounces.google.com;\r\n dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=accounts.google.com", "Content-Type": "multipart/alternative; boundary=\"000000000000a7bd7a056a2f384d\"", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\r\n d=accounts.google.com; s=20161025;\r\n h=mime-version:date:feedback-id:message-id:subject:from:to;\r\n bh=SaU2wjwURHUqMwAeURA0YVsZG1qNFDHjgb7KjnN8oZ8=;\r\n b=xKUZxOEXHPwVCnPWORHLo4bPDJnbeC0scJwjxmLeHddcDMvgc8kd9ohi6mHlNuEB2U\r\n TWOA+46TaA7611z/r0PHIABrasIc8JRtMNgoXrfctHrYApe42tOAmDJ+CeCYBFDCWss/\r\n tLBgajJ3XhQWKEdUTjU3IaCvfd7BtoagZC9uWZZmD8ycf2dLQrLGbY/LivfQd53L1G7r\r\n 0LfYTlzMqD7ZnnagJyktqyWg7jQ0YGlnBRoSR7wQQFus5pbFitR7W+qw4fS7tfds5TAP\r\n r5HFhbCDsLq6IRNpEFf0pMLgBdQQ++eXz0ZelMab82V1Lc1o1CqVqVfFsMfYNQcZDLop\r\n ViHw==", "Date": "Thu, 19 Apr 2018 08:18:49 +0000 (UTC)", "Delivered-To": "testvera004@gmail.com", "Feedback-ID": "28:account-notifier", "From": "Google no-reply@accounts.google.com", "MIME-Version": "1.0", "Message-ID": "drzRs2GQrLyLT6lYgr9pJg.0@notifications.google.com", "Received": "from mail-sor-f69.google.com (mail-sor-f69.google.com. [209.85.220.69])\r\n by mx.google.com with SMTPS id f11-v6sor2556685qth.9.2018.04.19.01.18.50\r\n for testvera004@gmail.com\r\n (Google Transport Security);\r\n Thu, 19 Apr 2018 01:18:50 -0700 (PDT)", "Received-SPF": "pass (google.com: domain of 36ldywggtc8k23-6t40dprr39287.v33v0t.r318t78at6pffjv1px0.r31@gaia.bounces.google.com designates 209.85.220.69 as permitted sender) client-ip=209.85.220.69;", "Return-Path": "36lDYWggTC8k23-6t40Dprr39287.v33v0t.r318t78At6pFFJv1px0.r31@gaia.bounces.google.com", "Subject": "Access for less secure apps has been turned on", "To": "testvera004@gmail.com", "X-Account-Notification-Type": "28", "X-Gm-Message-State": "ALQs6tCOs9zQpkLD2+zDyVVsttjXEUEydiakTy5TMcLOmsYqaVaenhR4\r\n\tyXT9+WYlEn3EFbunw7y5jSQehPvaLU3b", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\r\n d=1e100.net; s=20161025;\r\n h=x-gm-message-state:mime-version:date:feedback-id:message-id:subject\r\n :from:to;\r\n bh=SaU2wjwURHUqMwAeURA0YVsZG1qNFDHjgb7KjnN8oZ8=;\r\n b=fw7jnwc8FxVepAllz005c5MZ57WcR0/SnVI9xjOxwS7ifhfcL2/4RX372/fECEZaEe\r\n ACXL1npTY9nbL5E9ok4o2EYFlglgKbBDiWvWHnhEL267oJdgtu2HRL/tgYF81gMwFKvh\r\n baUUYyBn44gkcGKqiduPDSKSOZQFI5H+hPI1YVaWvQzAcRvAd2+kl1RIqA6z5UTNA9bR\r\n NnbFSRStE6yq/1yapOOUI75g5iluP/JuNMXvFG3FvSZWIJEMSkAaxzpr17dNRUem4ghg\r\n nB0kfJkznfJjYiNsM990Ucy/4T35Gce9/E1/N1nvmLu4ovHrWfRBCxFSazs+fr1NUoL6\r\n 084w==", "X-Google-Smtp-Source": "AB8JxZrt6CBPpXT807lllNMqevBXSnV1XYj4e1zGigx7wNDtzunynJxg1PRolTWHUtkp+vUiUA7b17nrAryKiVzZ9lwPrg==", "X-Notifications": "880253ae5a000000", "X-Received": "by 2002:aed:2128:: with SMTP id 37-v6mr3178025qtc.7.1524125930077;\r\n Thu, 19 Apr 2018 01:18:50 -0700 (PDT)" }, "Message-ID": "drzRs2GQrLyLT6lYgr9pJg.0@notifications.google.com", "Subject": "Access for less secure apps has been turned on", "To": "testvera004@gmail.com", "UID": "2", "URL Counts": 3, "URLs": [ "https://myaccount.google.com/lesssecureapps", "https://support.google.com/accounts/answer/6010255", "https://accounts.google.com/AccountChooser?Email=testvera004@gmail.com&continue=https://myaccount.google.com/device-activity?rfn%3D28%26rfnc%3D1%26eid%3D3547500692519305078%26et%3D0%26asae%3D2" ], "error": null, "has_error": false }

## Add Labels Adds labels to an email in Gmail. ### Input Field Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection. | Input Name | Description | Required | | :----------- | :------------------------------------------------------------------------------------------------------------------------------------ | :------- | | Mailbox Name | [Jinja-templated](doc:jinja-template) text containing name of the mailbox to which UID belongs. For example: {{Inbox}}. | Required | | Email UID | Column name having UID of email. | Required | | Email Labels | [Jinja-templated](doc:jinja-template) text containing Comma separated list of labels to be added to email. e.g {{label1}},{{label2}}. | Required | ### Output A JSON object containing multiple rows of result: - has_error: True/False - error: message/null ``` {json}{ "has_error": true, "error": "UID of email is not defined" }

Remove Labels

Remove labels from an email in Gmail.

Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

Input Name

Description

Required

Input Name

Description

Required

Mailbox Name

Jinja-templated text containing name of the mailbox to which UID belongs. For example: {{Inbox}}.

Required

Email UID

Column name having UID of email.

Required

Email Labels

Jinja-templated text containing Comma separated list of labels to be added to email. e.g {{label1}},{{label2}}.

Required

Output

A JSON object containing multiple rows of result:

  • has_error: True/False

  • error: message/null

``` {json}{ "has_error": true, "error": "UID of email is not defined" }

## Replace Labels Replace labels in an email in Gmail. ### Input Field Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection. | Input Name | Description | Required | | :----------- | :------------------------------------------------------------------------------------------------------------------------------------ | :------- | | Mailbox Name | [Jinja-templated](doc:jinja-template) text containing name of the mailbox to which UID belongs. For example: {{Inbox}}. | Required | | Email UID | Column name having UID of email. | Required | | Email Labels | [Jinja-templated](doc:jinja-template) text containing Comma separated list of labels to be added to email. e.g {{label1}},{{label2}}. | Required | ### Output A JSON object containing multiple rows of result: - has_error: True/False - error: message/null ``` {json}{ "has_error": true, "error": "UID of email is not defined" }

Move Email

Move email to a folder in Gmail.

Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

Input Name

Description

Required

Input Name

Description

Required

Mailbox Name

Jinja-templated text containing name of the mailbox to which UID belongs. For example: {{Inbox}}.

Required

Email UID

Column name having UID of email.

Required

Folder Name

Name of the folder in which email will be moved to.

Required

Output

A JSON object containing multiple rows of result:

  • has_error: True/False

  • error: message/null

``` {json}{ "has_error": true, "error": "UID of email is not defined" }

## Delete Email Delete an email in Gmail. ### Input Field Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection. | Input Name | Description | Required | | :----------- | :--------------------------------------------------------------------------------------------------------------------- | :------- | | Mailbox Name | [Jinja-templated](doc:jinja-template) text containing name of the mailbox to which UID belongs. For example: {{Inbox}} | Required | | Email UID | Column name having UID of email. | Required | ### Output A JSON object containing multiple rows of result: - has_error: True/False - error: message/null ``` {json}{ "has_error": true, "error": "UID of email is not defined" }

Release Notes

  • v3.0.0 - Updated architecture to support IO via filesystem

  • v2.0.4 - Added documentation link in the automation library.

  • v2.0.5 - Increased the size limit of fetching emails.