Help Centre › Functions & Formulas
This article describes the RPA Microsoft Graph connector function to send an email.
For a full list of available functions, please read MICROSOFT GRAPH functions.
Description
The Send mail function sends an email via the Microsoft Graph API. The email is sent from the authenticated user’s mailbox and supports HTML body, multiple recipients, CC, and optional save to Sent Items.
Setting it up
To use the Send mail function, follow these instructions:
{{popups:rpas/add:action=microsoft-graph-send-mail}}
Once on a process map:
- Navigate to the process where you would like to add the function
- Click on the green button’s drop-down (right side of the green button labelled “Process”)
- On the menu that appears, click on the “+ Activity” item
- From here you can select the MICROSOFT 365 Send mail option
- Click "Add" once you are done
Input parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| Connector | Yes | Select | - | Select the Microsoft Graph connector to use |
| To | Yes | Text | - | Recipient email(s), comma-separated |
| Subject | Yes | Text | - | Email subject line |
| Body | Yes | Textarea | - | Email body (HTML supported) |
| CC | No | Text | - | CC recipient email(s), comma-separated |
| Save to Sent Items | No | Select | true | Whether to save a copy in Sent Items |
| Variable | Yes | Text | - | Variable to store the result |
Output variables
| Variable | Type | Description |
|---|---|---|
| Variable | Object | API response confirming the email was sent |
Errors
- Authentication failed – the connector token has expired or is invalid
- Invalid recipient – one or more email addresses are invalid
- Insufficient permissions – the application lacks Mail.Send permission
Tips
- Use variables in the subject and body fields, e.g. {customer_name}
- HTML is supported in the body – use <b>, <br>, <table> tags for formatting
- For multiple recipients, separate emails with commas: alice@example.com,bob@example.com
Related functions
- Reply to mail – Reply to an existing email
- List messages – List inbox messages
- Search messages – Search messages by keyword