Skip to main content

Filter and Forward Emails

Manually sorting and forwarding emails can be time-consuming and repetitive. This automation monitors your inbox, identifies specific emails based on their subject line, and automatically redirects them to the appropriate recipient.

This is particularly useful for support desks or administrative roles where incoming messages must be routed to specific departments or team members without manual intervention.

The "Filter and Forward" flow consists of three primary stages that automate the handling of incoming mail.

  1. Watch incoming emails: The flow begins by monitoring a specific mail account. This module acts as the trigger for the entire automation.

  2. Apply subject filter: Before forwarding, the flow uses a filter to ensure only relevant emails are processed (e.g., specific business documents like "Invoices").

  3. Forward the email: Once an email passes the filter, the system generates a new message to the designated recipient.

Example of Filter and Forward Emails snippet with two modules: Watch incoming Emails and Forward Emails.

Below you will find the step-by-step guide for configuring each module of the above Action Flow.

Connection: connect to your mail account and grant Celonis the permission to read and write emails.

Folder: choose the INBOX

Criteria: All emails

Sender email address (optional): only the emails of the sender defined here are selected, if no sender is defined, all emails are chosen

Phrase (optional): one could also filter here for a phrase which the email has to contain. This filter is case sensitive so INVOICE and invoice are different things here. That's why we chose to filter between the modules in this template.

Maximum number of results

Set the maximum number of results that Celonis will work with during one cycle (the number of repetitions per scenario run). If the value is set too high, the connection may be interrupted on the side of the given third-party service (timeout). Celonis has no influence on this. We recommend that you set a lower value and either define a higher value for the maximum number of cycles or run the scenario more frequently.

60358753.png

Configuration:

Action Flows Module: Email

Action: Watch Email

60358752.png

Connection: Use the same connection as in the module before

To: define the recipient you want to forward the emails to

Subject: take the subject item from the mail before and add the sender email address to show from whom the original email was

Content Type: HTML (to get the same styling as the original email)

Content: HTML content item from the previous model

Attachments: activate the 'map' toggle and put in the Attachments item to make sure alle attachments are copied in the new email.

60358722.png

Configuration:

Action Flows Module: Email

Action: Send an EMail

60358751.png

To not just take all emails from a specific recipient we filter on a subject, in this example invoices. This searches for the phrase invoice within the subject of the email (case insensitiv, so Invoice with a capital letter would pass the filter as well as invoice). We filter in this additional Filter outside the email module to be able to use 'contains' and the case insensitivity.

60358724.png

Related topics