- 30 Nov 2022
- 1 Minute to read
- DarkLight
IMAP
- Updated on 30 Nov 2022
- 1 Minute to read
- DarkLight
Monitor folders in an IMAP mailbox for new emails. This article explains how to set up the IMAP integration using either Gmail or Microsoft 365 (Outlook).
Gmail
If you want to set up a Gmail account for the IMAP integration in Torq, you'll need to provide a username and password. The username is the email address of the account, but the password is not the regular account password. You'll need to create an app password for that account. To learn how to create an app password, see here.
- In contrast to the Google documentation which says that you do not need to remember the app password, MAKE A COPY of it. You'll need this when setting up the IMAP integration.
- The app password consists of four groups of four characters without the shown spaces between the groups.
Create an IMAP integration
- Go to Integrations > Triggers, and locate the IMAP card.
- Configure the IMAP integration and click Add.
- Integration name: a meaningful name for the integration. For our example, we use outlook_imap.
- Server:
outlook.office365.com:993
. - User: The email address of the account to be monitored.
- Password: The password for the email address.
- Interval: The monitoring interval for incoming emails. It can be entered in minutes, hours, or days. For example, 1m for 1 minute, 2h for 2 hours, and 1d for 1 day.
- Folder: You can use the shaded default, INBOX. The folder name is case-blind, so INBOX and Inbox are the same.
Here is the outcome for our example:
The IMAP integrations list is displayed:
- Click the top right x to return to Integrations.
Using the IMAP integration
To validate the integration, we create a triggered workflow:
- Open Create a Workflow and enter a name, for example
imap_test_outlook_365
, select Integrations. - Click Pick Integration. The following window is displayed:
- Click IMAP. In the displayed window, choose the
outlook_imap
integration we just created. - Click the IMAP (Envelope) icon.
- Open another browser tab and from a local mail account, send an email to the monitored Outlook account.
- Wait for at least one wait interval (one minute here).
- Open the Event log to view the event JSON that triggered the workflow. Click the icon to see the full JSON output.