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
-
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...)
-
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.
-
-
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.
-
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.
-
-
(Optional) Test your email account settings.
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 Nintex 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).
Read more about Working with Microsoft 365 Exchange and Modern Authentication.
IMAP/POP3 servers
-
Enter the settings for your email server.
-
Email server login credentials:
-
Enter from the Nintex credentials vault; or
-
Enter a credential by variable; or
-
Enter manually
-
-
(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 capabilities
-
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
-
-
POP3 servers do not support the following commands within the Get Email Messages command:
Get messages tab
-
(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 isMike Smith <mikesmith@yahoo.com>
, enterMike Smith
) -
Enter the name of the variable into which you'd like place the result (the number of messages matching the filter criteria).
-
Indicate if you would like retry the search until at least one message is found and, if applicable, specify retry settings.
-
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:
-
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.