When using the Office 365 Mail connector Send Email card in a workflow, it may return an error similar to the following:
{
"_error": true,
"retry_count": 0,
"flo": "cb5d2459-1c26-4bac-86f2-83a724a358bd",
"method": "ZYgi7gY7b",
"execution": "d95601f4-a119-46b0-9669-80fc1928b7d7",
"module": "office365mail.sendEmail2",
"kind": "HTTP Request Error",
"statusCode": 500,
"headers": null,
"body": null,
"message": "Your Email may not be saved to your Sent Items yet. Please manually check the URL in Sent Items for the Message ID.",
"code": 500,
"description": "HTTP Request Error",
"steps": 4,
"operator": "is empty",
"right-operand": "",
"left-operand": {},
"source": {
"flo": "office365mail:1.2.86:sendEmail2",
"method": "8pLey1N7jehv",
"execution": "13ce98fa-1e16-45c4-936d-4b46fa85b276",
"module": "control.throwIf"
},
"_fatal": null
}
- Okta Workflows
- Office 365 Mail connector
- Send Email action card
The Message ID is an output on the Send Mail card. If the Message cannot be saved in the user's O365 send mailbox (on the MSFT side) in a timely manner, an error will occur; however, the email has been sent successfully. The Message ID is not used by workflows and is only used if the user needs to search for the message later.
Use an If Error card in the workflow to catch the error and continue the workflow. Move the Send Email card into the Try block of the If Error card:
In the If Error block, add a Return Error If card to continue the flow if the Send Email card throws the error: Your Email may not be saved to your Sent Items yet. Please manually check the URL in Sent Items for the Message ID.:
