Emails can be sent & received directly from Foxtrot RPA, so there is no need to interact with a third party email client, such as Outlook or Gmail. Doing so requires certain e-mail settings to be configured. This article aims to introduce you to the email functionality of Foxtrot and help you get started receiving and sending emails in your Foxtrot projects. Obviously, the use of the email actions are different from each project, but you can basically do anything you need in terms of automating your email flows using Foxtrot.
First, we will go through the process of adding your email account, first by adding your email credentials, hereafter, we will introduce the concept of sending and receiving emails.
Prior to using the different e-mail actions, Foxtrot RPA will require you to know:
- The SMTP server name
- The IMAP server name
- The connection ports
- Your email credentials (username and password) for your account
Add Email Credentials
Start by adding your Email credentials in the project pane (Click the big + on the right, under the ‘Account’ menu).
Need to connect to a shared email inbox? Read this article.
Adding an Email Connection
After creating your email credentials, you will need to add the email Connection to your project. This will allow you to work with emails stored in your email box.
- Click the big +on the right, under the ‘Account’ menu.
- Find the Email If you do not see it in this list, change to Expert mode.
- In the Email field, you get to select from a dropdown menu one of the created credentials. Once it is done - fill in the required information.
- Choose the purpose: Send Only, Receive Only, Send & Receive.
- Enter a Name which is the name that will appear in the ‘From” field of an email (Optional).
- Provide the proper SMTP Server. If you don’t know your SMTP Server name, please contact your IT department. We have a list of common SMTP servers & ports in this support article.
- Define a Port to use when connecting.
- SSL: select Yes to send emails using SSL (Secure Socket Layer).
- Provide the proper IMAP Server. If you don’t know your IMAP server information, please contact your IT department. We have a list of common IMAP servers & ports in this support article.
- Define a Port to use when connecting.
- SSL: select Yes to send emails using SSL (Secure Socket Layer).
- After filling out the information, you can click “Test Settings” to make sure everything is in line.
- Click OK to save your connection.
You can click on Test Settings to make sure that everything works properly. Be aware that it might take some time depending on your internet connection.
Sending Emails
If you have your SMTP information properly configured, Foxtrot can send emails. Begin by selecting the Send Email from the Actions list. This action is located in the Email category.
Choosing a message to send is as simple as it looks. Recipients and attachments may be separated by a comma. Clicking on More displays the following:
- A CC field
- A BCC field
- A Reply To field
- A Priority option for emails that should be flagged as 'High' or 'Low' priority
- A Format option — this will allow for Plain Text (default) or HTML for advanced users
Note: Because Foxtrot uses SMTP, unless the server is set up to do it, emails will not appear in the Sent folder of your email client. If you wish to keep a log of emails Foxtrot has sent, we recommend adding yourself to the CC or BCC field.
Let us take a look at a concrete example. First, we click on "More" to see the additional options of the action.
For the sake of the example, we below do some different things. We send an email to a specified emali address and add ourselves BCC. Then, we also add some attachments. Notice that we use tokens and can add multiple attachments by separating them with a comma. Also, in the body of the email, we use a different tokens for today's date:
Here is the email received in the gmail inbox:
And here is the same email received in the Outlook inbox (the sender account BCC'd):
Receiving Emails
If you’ve got your IMAP settings properly configured, Foxtrot can receive and work with emails. Begin by selecting the Get Email from the Actions list. This action is located in the Email category.
Select the Folder which you want to retrieve the emails from. You can type, use Tokens, or select the folder from the drop-down. The Retrieve drop-down allows you to select All Messages, Unread Messages, Read Messages, or Custom. Selecting ‘Custom’ will allow you to configure filters to select which emails you want to retrieve. You can also Limit the number of messages you retrieve at a time. Click the checkbox and set the limit number, either by type or through a Token.
After creating the Get Email action, you will need a Loop Email action to iterate through the list of emails that were generated. Without this, any Email actions you create will apply to all emails in Foxtrot’s inbox.
Inside the loop, you can then do whatever you would like to do with the retrieved emails. You can Forward them, Move Email, Delete Email etc. This loop works almost exactly as a Files & Folders Loop does. It will cycle through each email, executing each action between the Loop Email and End Loop actions. Within this Loop, you will also have access to special Tokens, again similar to a Files & Folders List Loop. There are tokens to access the email’s subject, To field, From field, CC field, date/time sent, and much more.
Example
The following is a very basic example of retrieving some emails, making a Loop Email action and accessing the email tokens. First, we make the Get Email action.
Hereafter, we create the Loop Email action.
Now, inside the loop, here is where you can use all the email actions to work with either the current email of the loop or all emails retrieved with the Get Email action. As an example, below we simply create a variable storing the current email subject.
Make sure that your loop is "activated" in order to be able to access the email tokens.
That is the basic concept of working with emails in Foxtrot.
Comments
0 comments
Please sign in to leave a comment.