Auto-detect actionable emails with OpenAI & get alert message on Teams via flow
What It Does This workflow automatically runs when a new email is received in the user's Gmail account. It sends the email content to OpenAI (GPT-4.1-mini), which intelligently determines whether the message requires ...
Template notes
What It Does This workflow automatically runs when a new email is received in the user's Gmail account. It sends the email content to OpenAI (GPT-4.1-mini), which intelligently determines whether the message requires action. If the email is identified as actionable, the workflow sends a structured alert message to the user in Microsoft Teams. This keeps the user informed of high-priority emails in real time without the need to manually check every message. The workflow does not log any execution data, ensuring that email content remains secure and unreadable by others.
How It Works - Trigger on New Email: The workflow is triggered automatically when a new email is received in the user's Gmail account. - Email Evaluation with OpenAI: The email content is sent to GPT-4.1-MINI, which evaluates whether the message requires user action. - Filter Actionable Emails: Only emails identified as actionable by the AI are allowed to proceed through the rest of the workflow. - Send Notification to Teams: For actionable emails, the workflow sends a structured alert message to the user in Microsoft Teams chat via a Power Automate webhook.
Prerequisites - Gmail IMAP Credentials - OpenAI API Key - Microsoft Teams Webhook URL - Power Automate Flow to send message to Teams chat
How to Set It Up
1. Set Up Power Automate Workflow
1.1 Open Workflow Power Automate in Microsoft Teams - Open the Workflow app from Microsoft Teams. - If it's not already added, go to Apps → search "Workflow" → click Add → open it.
1.2 Create a New Flow - Click New Flow → select Create from blank.
1.3 Add a Trigger: When a Teams webhook request is received - In the trigger setup, set Who can trigger the flow? to Anyone. - After saving the flow, a webhook URL will be generated — this URL will be used in n8n workflow.