4.2.4.2. Email IMAP client Gateway In
This new gateway allows the customer to connect his own mailbox to Babelway, and Babelway poll in a folder of the mailbox. We use the IMAP protocol to connect and fetch mail.
The messages are processed as soon as they arrive.
The specific settings are:
Email provider |
The email provider that will allow the system to fetch the mails from |
|
Connection type |
The authentication type that will allow the system to connect the customer mail |
|
Host |
The email provider host |
|
Username |
The username of the customer’s email |
|
Password |
The password of the customer’s email in case you are using the credentials connection type |
|
Folder to fetch |
The folder that will allow the system to fetch the mails from |
|
OAuth2 provider |
In case the OAuth2 connection type, you should select the Microsoft or the Custom |
|
Authorization code URL |
The URL of the OAuth2 provider |
|
Access token URl |
The URL of the access token |
|
Application ID |
The client ID for the access token |
|
Client secret |
The secret of the client ID to get the access token |
|
Process all files |
By default, we will process all files received. Unselect this box if you wish to define a specific rule. |
|
File name pattern |
Pattern (regular expression) for the file name in the email of the file that will become your input message. First match is used. |
|
Other files to save |
Allows you to save other files of the email for future use. For every file that you want to save, you have to specify the pattern of the file name in the email and the name of the metadata in which you want to save the content. If one pattern matches multiple files, it is possible to save them all if you guarantee to generate a different metadata name for each. This can be achieved by using the capturing groups of the regex in the metadata names. Ex: if your pattern is (.*\.csv) and your metadata name is attachment-$1, processing with files file1.csv and file2.csv will result in two metadata as follows attachment-file1.csv and attachment-file2.csv . |
|
Here are the steps to configure such gateway.
Firstly, you should select to use the IMAP mail client and select the mail provider either to be Microsoft or custom mail as seen below:
Then you can connect with your credentials directly in Babelway OR via OAuth2 with an access_token.
And in case you select the mail provider to be “Custom”, you should fill the required fields like the host, port, username and the folder to fetch the mails from as seen below:
For the Microsoft mail provider, the fields should be filled as seen below:
If you change “CONNECTION TYPE” by credentials instead of oauth2, you need to put you email and password as seen below: