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.
Wrong URL. See https://docs.microsoft.com/en-us/graph/api/user-sendmail?view=graph-rest-1.0&tabs=http
Thanks @VictorIvanidze but I am trying to create a draft email for editing before sending.
The link you referred me to sends the email.
Phil
Hi @Hepworthnot , my bad, sorry.
Please check if you have populated the header:
Content-type Application/json
@Hepworthnot if you are using CDS connector for sure you can do this by creating a new email message, then you can edit in CDS and then send
Hi,
Header is populated. Still get error.
Thanks but not using a CDS connector
Have you tried wrapping the variable in your subject in quotes? Is that variable populating correctly? That error would suggest that it may be a null value, and you can't call the API with a null subject.
Lastly, I this post touches a bit on that error you're receiving:
It might be a good idea to try running the Flow normally without using the test button. Hopefully, that helps to uncover what may be going on.
Hi,
thanks for your help.
I have tried wrapping the variable in single, double, and {} quotes. I have also tried this via the powerapps end.
The variable in powerapps is rendering and is not null.
Has anybody been able to get this to work? Is it just one of things powerapps can't do and I'm wasting everyone's time?
OK,
this seems to work ...
@rjhale Thank you so much for posting back your modified body, it has helped me get mine working. One small thing though, when I tried yours I got an error about malformed json at position 219. When I looked at that, position 219 is the closing brace. However just before that it appears you have a rogue comma:
... "EmailAddress": {
"address": "test-whatever@contoso.com"
}
}],
}
when I removed that comma the code works perfectly for me. So, the syntax which worked for me finally is:
{
"Subject": "Test Subject",
"Body": {
"contentType": "Text",
"content": "Testing the body of this message"
},
"ToRecipients": [{
"EmailAddress": {
"address": "test-whatever@contoso.com"
}
}]
}
May I ask how did you authenticate the request?
@Anonymous did you work this out? Authentication would be done via the module connections I believe:
My example here is not for the same request as the thread but it just shows the connections.
No, I haven't.
This action (Send an HTTP request to SharePoint) is a different one than what was mentioned in the thread so far (Invoke an HTTP Request, now renamed to just HTTP I believe).
Also as far as I know ones inbox is not tied to any SharePoint site. I did try it with a random site though unsuccessfully.
For anyone that came looking for a solution to this problem and are actually using a Power App to trigger the flow I found a solution that worked for me where instead of using a Flow, you can use a Launch command from Power Apps that will utilize a mailto: link to populate the email subject and body in the users preferred/default email client.
The user can then edit the email before sending.
I realize that this is more of a Power Apps solution but since in my research I landed here I hope leaving this comment will help point someone else in the right direction!
More info can be found here:
https://www.c-sharpcorner.com/article/compose-outlook-email-using-mailto-inside-power-apps-form/
https://www.youtube.com/watch?v=OGcofeqPFlc
This is at first an attractive option until you realise you can not format the body of the email and you lose your email signature.
An html input box would be great if Outlook didn't just output it in raw html code.
Has anybody got a solution?
User | Count |
---|---|
27 | |
16 | |
15 | |
12 | |
10 |
User | Count |
---|---|
43 | |
29 | |
27 | |
24 | |
23 |