Activities
latest
false
Banner background image
Integration Service Activities
Last updated Apr 23, 2024

Post a message to a Team channel when a new email arrives via Outlook

Applications Used: Microsoft Outlook and Microsoft Teams

Description:Often, email is the preferred mode of communication for important announcements, ticket updates, etc. This means a user has to manually browse through emails in order to ensure nothing important is missed. Another problem that users face is regular spams from advertisers of products. The aim of this automation is to reduce this manual toil by posting a message to a team channel whenever a new email arrives in order to ensure the user is aware of all the important emails without leaving their collaboration tool.

The workflow uses Microsoft Teams activities Get Team by Name, Get Channel by Name and Send Channel Message along with Microsoft Office 365 event Email Received.

Building the workflow

Note: This is a tutorial explaining how to build the Post a message to a Team channel when a new email arrives via Outlook template from Studio Web. You can use the already existing template right away when creating a new project in Studio Web.
  1. Open Studio Web and create a new project. In the How to start the automation field, select Event based. You are presented with a window that enables you to search for the trigger you want to start the automation with. Navigate to Microsoft 365 > Email Received.
  2. Configure the Email Received trigger as follows:
    1. Set up your Microsoft Outlook 365 connection.
    2. Add any additional filter, if needed.
    3. If applicable, rename the trigger activity to any name that suits your use case.

    docs image
  3. Add a Get Team by Name activity to your workflow. At this step, you want to configure the team name as an input for retrieving the Team ID. Configure the activity as follows:
    1. Set up your Microsoft Teams connection.
    2. Configure the Name input parameter by selecting the respective team from the drop-down menu.
      docs image
  4. Add a Get Channel by Name activity:
    1. Configure the Team property by selecting the respective team from the drop-down menu.
    2. Configure the Name property and type the respective channel name or select it from the dropdown.

    docs image
  5. Next, add a Send Channel Message activity to the canvas. At this step, you want to pass the Team ID from the output of Get Team by Name the, Channel ID from the output of Get Channel by Name and BodyPreview from the output of the Email Received event trigger. To do this, configure the activity as follows:
    1. Use a variable for the Team property field by navigating to See More > Use variable. Select Team ID under Get Team by Name.
    2. Use a variable for the Channel property field by navigating to See More > Use variable. Select Channel ID under Get Channel by Name.
    3. In the Message body and Email Received property fields, search for BodyPreview and select it.
      docs image
  6. You are now ready to publish or run the project. For publishing, use the Publish button at the top of the workflow and configurethe details. The version will be automatically loaded for the automation.

docs image
  • Building the workflow

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.