--- title: "Mail Poller" slug: "mail-poller" updated: 2025-07-11T16:46:14Z published: 2025-07-11T16:46:14Z canonical: "documentation.decisions.com/mail-poller" --- > ## Documentation Index > Fetch the complete documentation index at: https://documentation.decisions.com/llms.txt > Use this file to discover all available pages before exploring further. # Mail Poller This Accelerator gives users an email handling toolkit that fetches, reads, and routes emails based on the user's custom rule set. --- ## Key Features - Email can be routed according to the rule logic set. - Users can customize their email handling process. --- ## Considerations - Users should have the [Error Handling Accelerator](https://documentation.decisions.com/projects/docs/error-handling) installed before utilizing this Accelerator. Once the project is installed, the user needs to set up the constant input data for the **Email, Count, Password, Port, Server, Username** or **Mail Poller Email Handler Flow ID** if available. ### Setting Up Email Passwords 1. Users must navigate to their **Email Account > Security > 2-Step Verification > App Passwords**. 2. Give a name to the application being used and generate the app passwords. 3. For more details, visit this [link.](https://support.google.com/accounts/answer/185833?hl=en) ### Setting Up Email Port and Server for the IMAP - The incoming connection for the IMAP will be: - **Email Server**: [imap.gmail.com](//imap.gmail.com) - **Email Port**: 993 - For more information, visit this [link.](https://developers.google.com/gmail/imap/imap-smtp) --- ## Main Flows There are a few key Flows in this build. They are listed below: ### Mail Poller Logic This is the main Flow. In this logic, the user's email will be connected to the server in order to access the email headers and email details. A check is performed to determine if it is a Decisions email. If it is a Decisions email, this email will be skipped. Otherwise, the Flow will direct to the **Runtime Async Flow** and the email will be marked as read. ### Create Email Router This Flow routes emails according to the Rule Sets given in the logic, which is used to identify the internal or external email based on its "from" address. The Flow then outputs the resulting emails. ### [Runtime] Mail Poller Email Handler Async This Flow will run when the **Email Router Sub-flow** goes in the "Done" path, the emails are coming from external sources other than Decisions, and the **Runtime Flow** will be triggered. It will run the target Flow attached. --- ## How to Use Mail Poller Once the **Password** and **Server** on the input data is given to the main Flow: - Users need to provide the number of **Email Accounts** they want to call from the inbox. - The username also needs to be entered in the input data. - If there is an existing **Mail Poller Email Handler Flow ID**, the Flow ID can be given here or the user can leave it blank. This is also a target ID for the runtime select, so the users can create the target Flow ID as per their requirement. - When everything is set up, the user can debug the main Flow and look for the required outputs.