# Notify me on Slack when an email is received in Gmail

> **Summary**: When an email is received in Gmail, notify me through a message in Slack.

**Summary**: When an email is received in Gmail, notify me through a message in Slack.

**Applications**: Gmail, Slack

**Description**: This example explains how to create a workflow that automatically send you a notification on Slack when a new email arrives in your Gmail. This example uses a Google Workspace trigger activity, [Email Received](https://docs.uipath.com/activities/other/latest/productivity/google-workspace-trigger-new-email-received), and a Slack activity, [Send message to user](https://docs.uipath.com/activities/other/latest/integration-service/uipath-salesforce-slack-send-message-to-user).

## Workflow

:::note
A [Studio Web template](https://cloud.uipath.com/portal_/cloudrpa?redirectPath=studio_/templates/f37eb6a4-31ea-4f82-b7a3-f8d2c988c38d) is available for this use case.
:::

1. Open Studio Web and create a new project.
2. For **How to start the automation** select **Event based**, then select the Google Workspace [Email Received](https://docs.uipath.com/activities/other/latest/productivity/google-workspace-trigger-new-email-received)
3. In the trigger activity:
   1. Set up your Gmail connection.
   2. Choose your Email folder.
   3. Set up any additional filters. For example, you can choose to filter only for emails with a certain subject or from a specific sender.
   4. Set up additional options, if needed.

![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-298588-2f718c44.webp)
4. Next, add a Slack [Send message to user](https://docs.uipath.com/activities/other/latest/integration-service/uipath-salesforce-slack-send-message-to-user) activity.
   1. Start by setting up your Slack connection.
   1. Next, select the Slack **User** to send a message to. To receive a message yourself, select `USLACKBOT`. from the dropdown list.
   2. Configure the **Message** field. For example, you can add the following text: *New email received from `ReceivedEmail.From.DisplayName` about `RecievedEmail.Subject`*. To use variables, select the output variable of the trigger activity and drill down to its `From.DisplayName` and `Subject` properties.

![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-298592-634378d1.webp)
5. You're done and ready to run your project!
