Hi,
is it possible to write a flow which creates an email but doesn't send it.
Sometimes I want to edit the template emails I create with a flow so I want the template to open ready for editing before I send it?
Thanks
Phil
Solved! Go to Solution.
There is no "out of the box" action that will allow you to create an email and save it as a draft.
If you can accomplish this, it would involve calling an Ofice 365/Exchange web service via an HTTP action.
If this addresses your issue, please mark you post as Solved.
Scott
Has this been resolved ? It would be great to run a flow and have it give me the option to approve the template that's about to be sent and edit it instead of automatically sending it. Otherwise I have to hard code 16 different types of emails depending on their characteristics
Thank you for replying Scott.
@ScottShearer wrote:
There is no "out of the box" action that will allow you to create an email and save it as a draft.
If you can accomplish this, it would involve calling an Ofice 365/Exchange web service via an HTTP action.
Are you saying a solution would be to call an Office 365/Exchange web service via an HTTP action? If so can you point me in the right direction to learn how to do that please?
Thanks Phil
Here is a link to the API documentation for Outlook mail.
Here is a link to documentation for the HTTP action
Hi @Hepworthnot ,
you can do that using MS GRAPH API (premium action 'Invoke an HTTP request').
Here is the info how to create a message using GRAPH:
https://docs.microsoft.com/en-us/graph/api/user-post-messages?view=graph-rest-1.0&tabs=http
Curious if anyone has tried this? When I run the "Invoke HTTP" action from Flow using one of their examples, I get an odd error message stating:
Could you show your flow?
Sorry I can't reproduce the problem - it works just fine for me.
Good to know that I'm not completely off-base with this approach. Curious, when you setup the Invoke HTTP Connector what did you use for the Base Resource URL and the Azure AD Resource URI (Application ID URI)?
I think I used "https://graph.microsoft.com" for both fields based on what I saw in another post, but I have no idea if that is correct.
Hi @rjhale,
yes, correct. "https://graph.microsoft.com" for both fields.
Ok. I figured it out. For anyone else who might be attempting this the body has to look like this:
{
"Subject": "Test Subject",
"Body": {
"contentType": "Text",
"content": "Testing the body of this message"
},
"ToRecipients": [{
"EmailAddress": {
"address": "test-whatever@contoso.com"
}
}],
}
@VictorIvanidze Do you happen to know if it's possible to use a similar approach to create draft messages within a shared mailbox?
Nevermind. I think I got it worked out. You can just treat it like any other user:
https://graph.microsoft.com/v1.0/users/sharedmailboxaddress/messages
Hi,
thanks for the help above. I can create the draft as above.
I am struggling to add dynamic content though. I get this error message for example:
The input body for trigger 'manual' of type 'Request@ did not match its schema definition. Error details: 'Invalid type. Expected String bu got Null.'
Can you help please?
Thanks
Phil
Hi @Hepworthnot, where do you see this error?
In PowerApps studio. After trying to run the flow using the button in PowerApps I see an error message on the button.
Please show your flow.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Learn from the top Power BI, Power Apps, Power Automate & Power Virtual Agents experts!
User | Count |
---|---|
23 | |
11 | |
10 | |
9 | |
8 |
User | Count |
---|---|
33 | |
24 | |
20 | |
16 | |
15 |