MICROSOFT GRAPH Send mail function

The MICROSOFT GRAPH Send mail function in RPA.

Help CentreFunctions & 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:

  1. Navigate to the process where you would like to add the function
  2. Click on the green button’s drop-down (right side of the green button labelled “Process”)
  3. On the menu that appears, click on the “+ Activity” item
  4. From here you can select the MICROSOFT 365 Send mail option
  5. Click "Add" once you are done

Input parameters

ParameterRequiredTypeDefaultDescription
ConnectorYesSelect-Select the Microsoft Graph connector to use
ToYesText-Recipient email(s), comma-separated
SubjectYesText-Email subject line
BodyYesTextarea-Email body (HTML supported)
CCNoText-CC recipient email(s), comma-separated
Save to Sent ItemsNoSelecttrueWhether to save a copy in Sent Items
VariableYesText-Variable to store the result

Output variables

VariableTypeDescription
VariableObjectAPI 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

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.