UiPath Documentation
maestro
latest
false
Important :
La localisation du contenu nouvellement publié peut prendre 1 à 2 semaines avant d’être disponible.

Guide de l'utilisateur de Maestro

Process incoming emails

What you'll build: A workflow that fires automatically when a new email arrives, extracts key fields from the message, and routes it to the right downstream action based on the content — for example, logging support requests to a ticketing system or escalating urgent messages to a Slack channel.

Éléments requis

  • A UiPath Automation Cloud account with access to Maestro Flow.
  • A mailbox connected via Integration Service (UiPath's connector platform). Supported providers include Microsoft 365 and Gmail. To set up a connection, go to Integration Service in the UiPath Platform and configure the connector for your email provider.

Nodes used

  • Email integration trigger — fires when a new email arrives in the connected mailbox
  • Data Transform — extracts sender, subject, and body from the email payload
  • Decision — routes the email based on content
  • Terminate — ends the workflow cleanly if the payload is malformed

Étapes

1. Create a new Flow and add an email trigger

  1. Open MaestroFlow and create a new workflow.
  2. In the node panel, open Integration nodes and find your email connector (Microsoft 365 or Gmail).
  3. Drag the Email received trigger onto the canvas.
  4. In the configuration panel, select the Connection to use and configure any filters (for example, a specific inbox folder).

2. Extract fields from the email

  1. Drag a Data Transform node onto the canvas and connect it to the trigger.
  2. Map the fields you need from the trigger's output payload:
    • trigger.body.fromsenderEmail
    • trigger.body.subjectemailSubject
    • trigger.body.body.contentemailBody

The exact field names vary by connector — check the trigger's output schema in the configuration panel.

3. Route based on content

  1. Drag a Decision node onto the canvas and connect it to the Data Transform node.
  2. Set the condition to evaluate the email content. For example, to catch urgent messages: $vars.emailSubject.toLowerCase().includes("urgent").
  3. Connect the True branch to a high-priority action (for example, a Slack notification node).
  4. Connect the False branch to a standard action (for example, creating a ticket in your support system).

4. Handle malformed payloads

Not every email will have the fields you expect. Guard against malformed payloads before they break the workflow:

  1. Add a Decision node after the Data Transform and check that required fields are present — for example, $vars.senderEmail != null.
  2. Connect the valid branch to the routing Decision from step 3.
  3. Connect the invalid branch to a Script node that logs the problem.
  4. Connect the Script node to a Terminate node set to Failed.

For any node that exposes an error handle, you can also connect it to the same error path. See Error handling.

5. Test and debug

To test without waiting for a real email:

  1. Add a Manual Trigger alongside the email trigger temporarily.
  2. Configure it with a sample input schema that matches the email payload shape.
  3. Run the test with sample values and verify the routing logic in the execution trace.
  4. Remove the Manual Trigger before publishing.

Résultat

Your workflow fires automatically when a new email arrives, extracts the sender, subject, and body, and routes the message to the correct downstream action. Malformed payloads terminate cleanly on the error path rather than breaking the workflow.

Extend this workflow

  • Invoke an AI agent — Before the Decision node, add an Agent node to classify the email with AI rather than a keyword match.
  • Loop over attachments — If the email has attachments, add a Loop node to process each one.
  • Reply to the sender — After routing, add an email integration action node to send a confirmation reply to {{ $vars.senderEmail }}.

Cette page vous a-t-elle été utile ?

Connecter

Besoin d'aide ? Assistance

Vous souhaitez apprendre ? UiPath Academy

Vous avez des questions ? UiPath Forum

Rester à jour