cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Creating but not sending an email

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

14 REPLIES 14
Highlighted
Super User III
Super User III

Re: Creating but not sending an email

@Hepworthnot:

 

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

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Highlighted
Frequent Visitor

Re: Creating but not sending an email

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 

Highlighted
Helper I
Helper I

Re: Creating but not sending an email

Thank you for replying Scott.

 


@ScottShearer wrote:

@Hepworthnot:

 

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

Highlighted
Helper I
Helper I

Re: Creating but not sending an email


@miketondu wrote:

Has this been resolved ?  


No, not yet.

Highlighted
Super User III
Super User III

Re: Creating but not sending an email

@Hepworthnot 

Here is a link to the API documentation for Outlook mail.

Here is a link to documentation for the HTTP action

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Highlighted
Post Prodigy
Post Prodigy

Re: Creating but not sending an email

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

 

Highlighted
Advocate III
Advocate III

Re: Creating but not sending an email

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:

 

"code": "UnableToDeserializePostBody",
"message": "were unable to deserialize ",
 
I get the same thing in Graph Explorer, and this doesn't seem to be a permissions issue.  Any ideas how to fix this?
Highlighted
Post Prodigy
Post Prodigy

Re: Creating but not sending an email

Could  you show your flow?

Highlighted
Advocate III
Advocate III

Re: Creating but not sending an email

Invoke HTTP Request.png

Highlighted
Post Prodigy
Post Prodigy

Re: Creating but not sending an email

Sorry I can't reproduce the problem - it works just fine for me.

Highlighted
Advocate III
Advocate III

Re: Creating but not sending an email

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.  

Highlighted
Post Prodigy
Post Prodigy

Re: Creating but not sending an email

Hi @rjhale,

 

yes, correct. "https://graph.microsoft.com" for both fields. 

Highlighted
Advocate III
Advocate III

Re: Creating but not sending an email

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? 

Highlighted
Advocate III
Advocate III

Re: Creating but not sending an email

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

Helpful resources

Announcements
secondImage

August 2020 CYST Winners!

Check out the winners of the recent 'Can You Solve These?' community challenge!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Users online (4,749)