Email in Actions
Use email apps when an Action needs to start from an incoming mailbox message or send an email as part of an Action Flow.
Studio supports two email app types:
- Microsoft Exchange for receiving email from Exchange Online mailboxes and sending email through Microsoft Graph.
- Azure Communication Services for sending email through Azure Communication Services Email.
Choose the Email App Type
Create email apps from Tenant Admin > Apps > New. Select the app type that matches the email provider you want the Action to use.
Use Microsoft Exchange when the Action Flow needs to react to inbound mailbox messages, read message details, read attachments, send from an Exchange mailbox, or update an Exchange message after processing.
Use Azure Communication Services when the Action Flow only needs to send email from a verified ACS Email sender address.
Set Up Microsoft Exchange
Microsoft Exchange apps use app-only Service Principal credentials with Microsoft Graph application permissions.
Before adding the app in Studio, prepare these values in Microsoft Entra ID:
- Application (client) ID for the app registration.
- Client secret value for the app registration.
- Directory (tenant) ID for the Microsoft 365 tenant.
- Microsoft Graph application permissions that allow the app to read and send mailbox messages, for example permissions for mail read and mail send scenarios.
- Admin consent for the required Microsoft Graph application permissions.
- The mailbox address the Action should use by default, for example
ap@contoso.com.
Create the app in Studio:
- Go to Tenant Admin > Apps.
- Select New.
- Choose Microsoft Exchange.
- Enter a clear app name, such as
Microsoft Exchange - Accounts Payable. - Enter the default Exchange mailbox address.
- Save the app.
Then configure credentials:
- Open the Exchange app.
- Select Configure Credentials.
- Keep Authentication Type as Service Principal.
- Enter Client ID, Client Secret, and Azure Tenant ID.
- Optionally enter a scope if your environment requires one. Otherwise leave it empty for the default Microsoft Graph token behavior.
- Save credentials.
After the app is saved, Studio adds Exchange resources for Actions. The Exchange app provides a New email arrived trigger, email-reading inputs, and email tools.
Use Exchange as an Email Trigger
Use the New email arrived trigger when an Action should run for new messages in an Exchange mailbox folder.
- Open the Action.
- Select the trigger node at the start of the Action Flow.
- Choose New email arrived from the Microsoft Exchange app.
- Set Mailbox to the mailbox to poll. Leave it aligned with the app mailbox unless this Action should use another mailbox.
- Set Folder, usually
Inbox. - Keep Include body preview in trigger payload enabled if later steps need short body text from the message.
- Optionally set filters for Sender, Email Title, and Email Body.
- Save the trigger.
Filters are combined with AND logic. Leave all filters empty to accept every new email in the configured folder.
The trigger payload includes mailbox and message identifiers that Exchange inputs and tools can use. Common references are:
{{input.triggerPayload.mailbox}}{{input.triggerPayload.messageId}}
Read Email Content and Attachments
For Exchange-triggered Actions, add Exchange inputs to the steps that need email data:
- Get_Email_Details reads the full Exchange message details for the trigger message.
- List_Email_Attachments lists attachment metadata for the trigger message.
- Get_Email_Attachment reads a selected file attachment and makes it available as runtime file content.
The first two inputs are preconfigured to use the trigger payload mailbox and message ID. For Get_Email_Attachment, provide the attachmentId, usually from a previous List_Email_Attachments result.
Example attachment input configuration:
{
"mailbox": "{{input.triggerPayload.mailbox}}",
"messageId": "{{input.triggerPayload.messageId}}",
"attachmentId": "{{List_Email_Attachments.value.0.id}}"
}
Use these inputs before OCR, LLM, Agent, or Code steps when the Action Flow needs the message body or attached files.
Send Email with Microsoft Exchange
Use the Exchange Send_Email tool when email should be sent from an Exchange mailbox.
Add the tool to an Agent step, or add a Tool Call Step and choose the Exchange Send_Email tool. Configure these parameters:
mailbox: Optional sender mailbox. If omitted, Studio uses the Exchange mailbox configured on the app.to: Recipient email address, or comma/semicolon-separated addresses.cc: Optional CC recipients.bcc: Optional BCC recipients.subject: Email subject.body: Email body.bodyContentType:TextorHTML.attachmentFileName: Optional generated attachment file name.attachmentContent: Optional generated text attachment content.attachmentContentType: Optional attachment content type, such astext/csv,application/json, ortext/plain.
Example Tool Call parameters:
{
"to": "{{Get_Email_Details.from.emailAddress.address}}",
"subject": "We received your invoice",
"body": "Thank you. Your invoice has been received and is being processed.",
"bodyContentType": "Text"
}
Exchange also provides tools for follow-up processing:
- Archive_Email moves a message to the Archive folder or another destination folder.
- Mark_Email_As_Read marks the trigger message as read.
- Flag_Email flags the message for follow-up.
- Get_Email_Details, List_Email_Attachments, and Get_Email_Attachment are also available as tools when an Agent or Tool Call step should fetch email data on demand.
Set Up Azure Communication Services Email
Azure Communication Services apps use a connection string. They support outbound email through ACS Email and do not provide an inbound email trigger.
Before adding the app in Studio, prepare these values in Azure:
- An Azure Communication Services resource.
- A connected and verified Email domain.
- A sender address from that verified domain, for example
DoNotReply@contoso.com. - The ACS resource connection string containing
endpointandaccesskey.
Create the app in Studio:
- Go to Tenant Admin > Apps.
- Select New.
- Choose Azure Communication Services.
- Enter a clear app name, such as
Azure Communication Services - Notifications. - Save the app.
Then configure credentials:
- Open the Azure Communication Services app.
- Select Configure Credentials.
- Keep Authentication Type as Connection String.
- Paste the ACS connection string.
- Save credentials.
Send Email with Azure Communication Services
Use the Azure Communication Services Send_Email tool when the Action should send from a verified ACS Email sender address.
Add the tool to an Agent step, or add a Tool Call Step and choose the ACS Send_Email tool. Configure these parameters:
from: Required sender email address from a verified ACS Email domain.to: Recipient email address, or comma/semicolon-separated addresses.cc: Optional CC recipients.bcc: Optional BCC recipients.subject: Email subject.body: Email body.bodyContentType:TextorHTML.
Example Tool Call parameters:
{
"from": "DoNotReply@contoso.com",
"to": "finance-team@contoso.com",
"subject": "Invoice received",
"body": "A new invoice email was received and queued for processing.",
"bodyContentType": "Text"
}
Common Patterns
- Inbound invoice mailbox: Use Microsoft Exchange New email arrived, read attachments with List_Email_Attachments and Get_Email_Attachment, run OCR, then archive or mark the message as read.
- Reply to sender: Use Microsoft Exchange Get_Email_Details to read the sender, then use Exchange Send_Email to send from the same mailbox.
- Notification-only Action Flow: Use Azure Communication Services Send_Email from a scheduled, manual, Dooap, or data-triggered Action.
- Mixed Action Flow: Use Microsoft Exchange to receive and process a mailbox message, then use Azure Communication Services to send standardized notifications from an ACS Email domain.
Things to Know
- Microsoft Exchange inbound email uses polling. Save trigger changes before running a manual poll.
- Microsoft Exchange mailbox values can be set on the app, trigger, input, or tool. More specific configuration overrides the app default.
- Azure Communication Services can send email only from verified ACS Email sender addresses.
- Store credentials in the app credentials dialog, not in Action prompts, step parameters, or raw configuration.