Using Connect action in Email package

Use the Connect action in the Email package to establish a connection with an email server. This is the first action you must use to automate an email-related task.

Prerequisites

You can use OAuth 2.0 to authenticate with the email server for email automation. Based on your email service provider, perform the relevant steps:
  • Outlook/Office 365
    • If you use Client credentials flow authentication mode, then perform the following steps:
      1. Log in to the Microsoft Azure portal.
      2. Register an application with the Microsoft identity platform to obtain the client ID and tenant ID. See Register an application.
      3. Add a Client secret.

        See Add a client secret

      4. Based on the mail server you connect to, perform the relevant steps:
    • If you use the Authorization code with PKCE authentication mode, then perform the following steps:
      1. Log in to the Microsoft Azure portal.
      2. Register an application with the Microsoft identity platform to obtain the client ID and tenant ID. See Register an application.
      3. When registering the application, set the redirect URI to http://localhost:9999/callback.
      4. Add permissions with type delegated for IMAP, POP3, and SMTP and grant the application the required permission for Microsoft Graph to the application.

    The videos in the following playlist provides information about configuring and using OAuth 2.0 authentication in the Email Connect action:

    Note: If the mailbox is used inside a Loop action, ensure that you register the user who is assigned to perform the automation. For more information , see Manage users and groups assignment to an application.
  • Gmail
    To authorize your application with Gmail using the Authorization code with PKCE authentication method, perform the following steps:
    1. Configure the OAuth 2.0 settings in the Google Cloud Platform (GCP) and retrieve the necessary credentials to connect Automation 360 with your G Suite applications.
    2. Ensure you create a project.

      See create a project.

    3. Generate the Client ID and Client secret.

      See Setting up OAuth 2.0.

      Note:
      • Select the Web application option.
      • Add this authorized redirect URI: http://localhost:8888/Callback.
    4. Complete the steps to set up user consent for the username that you will use to connect to the Automation 360.
    Note:
    • Client Credentials flow does not support Gmail.
    • The Client Credentials and Authorization code with PKCE authentication modes do not support Yahoo and MSN mail servers.
Important: If you want to use both the authentication modes (Client credentials and Authorization code with PKCE), you must register on two separate applications.
Note: When you connect to an Exchange Web Services server, multi-factor authentication (MFA) must be disabled, including in all organizational level security policies where MFA might be enabled. If MFA is not disabled completely, users can encounter connection or authorization errors. However, if you still want to use MFA, review the information in this article (be aware that a successful connection is not guaranteed:

Multi-factor authentication for Azure EWS (A-people login required)

This action enables you to provide the email server credentials and details, and associate this information with a session name. Use this same session name for the other Email actions, so you only have to provide the server information once.

Procedure

To establish a connection with an email server, follow these steps:

  1. In the Actions palette, double-click or drag the Connect action from the Email package.
  2. Enter a session name.
  3. In the Outlook,Email server, or EWS option, specify whether you want to establish a connection with Microsoft Outlook or a mail server.
    When you establish a connection with Microsoft Outlook, email messages are processed from the shared mailbox. Ensure that you have set up the shared mailbox in your Outlook application.
    Note:
    • This feature is supported only for Outlook.
    • You can select only one mailbox from the list of mailboxes in the shared mailbox.
    • The meeting invitation is not read in Outlook because the bot does not select calendar invites as email objects. This feature is not currently supported.
    • If you have selected the Outlook option, you do not need to provide any additional details.
    • If you have selected the Email server option, complete the following fields:
      Note: For information about the host and port to be used for the various mail servers, see Email server settings.
    • If you have selected the EWS option, complete the following fields:
      • Exchange Version: Select the version that your organization is using:
        • Exchange Server 2013
        • Exchange2010_SP2
        • Exchange2010_SP1
        • Exchange2010
        • Exchange2007_SP1
      • Azure cloud: Select the product that your organization is using:
        • Azure Global: For customers of Microsoft 365 Commercial version (login.microsoftonline.com)
        • Azure US GCC High: For customers of Microsoft 365 Government version (login.microsoftonline.us)
      • Optional: Domain name:
        • If you are a Microsoft 365 customer and you leave this field blank, Automation Workspace uses smtp.office365.com to connect to the server.
        • If you are an Microsoft 365 customer and you have entered a domain name in the username field, you must enter smtp.office365.com in this field.
        • If you are not an Microsoft 365 customer, enter the domain name of your organization. Otherwise, Automation Workspace uses the domain name you provided in the Username field.
      • Authentication mode: Choose from the following authentication modes:
        Note: From Automation 360v.27 or later, the authorization type OAuth2-Silent authentication mode is renamed to OAuth2-ROPC, and the OAuth2-Interactive authentication mode is renamed to OAuth2-Implicit.

        If you have trouble connecting to shared mailbox using EWS, see Unable to connect to shared mailbox using EWS error (A-People login required).

        Depending on the authentication mode that you selected, you must specify the details in the following fields as applicable.
        • Username: Enter the username that you want to use to access the mail server.

          For example, john.smith@myCompanyName.com

        • Password: Enter the password for the username you provided.
        • For Client ID, Tenant ID, Redirect URI, and Client secret fields, enter the information that is provided for your account on your Azure portal.
        • Test connection: Click Test connection to sign in to your account, accept the permissions requested to authenticate, and establish a connection with the server.
          Note:
          • When you perform a desktop operation and click Test connection, variables such as (Credential, Credential variable, or Sting variables) are currently not supported.
          • When you perform desktop operation and click Test connection to sign in to your account, then add this redirect URI: https://outlook.office365.com
        For Username, Password, Tenant ID, Client ID, and Client secret fields, choose from Credential, Variable, or Insecure string tab:
        • Credential: Use a value available in the credential vault.
        • Variable: Use a user-defined variable that stores the values.
        • Insecure string: Manually enter a value.
  4. Click Save.