Get Email Messages

Identify all email messages matching a specified filter or a single message matching a key for the purpose of performing a sequence of actions on the message(s).

Step 1: Identify the messages

The first step in using the GET EMAIL Messages command is to identify the messages on which the specified actions will be performed.

The settings available on the Email account tab vary for Exchange and IMAP/POP3 servers.

Exchange servers

  1. Enter the settings for your email server.

    If you are using Microsoft 365 Exchange online, make sure to enter the correct server domain (https://outlook.office365.com/EWS/Exchange.asmx...)

  2. Email server login credentials:

    • Enter from the Nintex credentials vault; or

    • Enter a credential by variable; or

    • Enter manually

      To select a credential from the credentials vault: Select From vault. Select a credential from the list.

  3. Working with Microsoft Office 365 new authentication method?

    You can set the Application ID and Tenant/Object ID directly into the Credentials Vault settings in the Admin Tool.

    Read more about Working with Microsoft 365 Exchange and Modern Authentication

    ;or

    Enter manually.

    For Microsoft Office 365 new authentication method: Insert the Tenant ID and Application ID of the Microsoft Exchange (retrieve from Microsoft Azure > Email application).

    • Tenant ID (Objec tID) is a sensitive information and is encrypted

    • Application ID is not sensitive information isn't encrypted

    • Once IDs are entered, they cannot be removed - only edited. To remove the IDs, you need to delete the trigger and re-create it.

    • Read more about Working with Microsoft 365 Exchange and Modern Authentication

  4. Mailbox:

    Choose whether to retrieve the messages from the user's default mailbox (as entered in 2 above) or a shared mailbox.

    • For a shared mailbox, enter the mailbox address.

  5. (Optional) Test your email account settings.

IMAP/POP3 servers

  1. Enter the settings for your email server.

  2. Email server login credentials:

    • Enter from the Nintex credentials vault; or

    • Enter a credential by variable; or

    • Enter manually

  3. (Optional) Test your email account settings.

IMAP and POP3 servers don't send mail!

IMAP and POP3 are internet mail protocols designed for retrieving emails, not for sending. As a result, if your Email Server Type is set to IMAP or POP3, the following commands are not supported within the Get Email Messages command:

POP3 servers don't support all of Nintex RPA's capabilities

  1. When defining the filter for the specific mail messages that will be retrieved, POP3 servers do not support searching by the following fields:

    • Message contains

    • Status

    • Folder

  2. POP3 servers do not support the following commands within the Get Email Messages command:

Get messages tab

  1. (a) Define the filter by which the messages will be identified and retrieved; or

    (b) Enter the name of the variable into which you have set an email key. (For more information, see Get Email Trigger Input.)

    To define search From, enter the email address (for example, gilgolan@yahoo.com). To define search To, enter the display name only. (for example, if the complete email is Mike Smith <mikesmith@yahoo.com>, enter Mike Smith)

  2. Enter the name of the variable into which you'd like place the result (the number of messages matching the filter criteria).

  3. Indicate if you would like retry the search until at least one message is found and, if applicable, specify retry settings.

  4. Instruct the wizard how to handle any errors encountered. Read more about error handling.

Step 2 - Define the actions

Upon adding the get email messages command to your wizard, you will notice that it becomes an empty "container" within the Editor Pane, waiting for you to fill it with instructions:

  1. Enter the action(s) the wizard should take on each matching email message

    • You can do this by dragging the required Advanced Command(s) directly into the container

Loop-the-loop

The wizard performs the actions defined within the container by looping through each retrieved message (i.e., it will perform the complete sequence of actions on a single message, then move on to perform the sequence on each remaining message in turn).

No limits

You can use any available Advanced Command within the Get Email Messages container (i.e., don't feel limited to using just the Email commands!)

Break that loop!

Under certain conditions, you may want to break and/or restart the loop created by the Get Email Messages container. Make this happen by using the Loop: Break and/or the Loop: Restart command (usually within an If Else command).

Using Credentials by Variable:

The Credential by Variable functionality allows you to create a dynamic connection to the credentials vault. The credential variable is associated with credential display name(s).

Since the credential variables are dynamic, if you export a wizard to another environment, make sure that the credentials associated with the variable are defined in the new environment's credential vault.