Hi All,
I am trying to add a prefix to an email and then move it to a new folder in the same mailbox. I do not want to forward to email as it is in the correct mailbox.
I can understand if I use MS Graph I can manipulate the message using the HTTP action to call the graph message api
https://graph.microsoft.com/v1.0/users/[UserID]/messages/[Message id]
I am not a developer and could use a little assistance in getting this to work.
If I initiate a variable and concat the subejct of the orginal email then update this via graph I am hoping this will work.
concat('PreFix',triggerOutputs()?['body/subject'])
Is my Expression correct?
{ "subject":[ "@{variables('MessageSubject')}" ] }
Solved! Go to Solution.
This works for me:
Try to do the same.
The question is can this be done?
I am not even sure you can minipulate the subject line of an email in Graph?
https://docs.microsoft.com/en-us/graph/api/message-update?view=graph-rest-1.0&tabs=http
The subject of the message. Updatable only if isDraft = true.
Has anyone found a solution to changing the subject of incoming emails. The business case for this is we need to add a PreFix to incoming emails so they can be handled in our ticketing system.
Hi @myatix,
you can add a prefix using an Exchange online transport rule.
Are you sure you have to do that using Power Automate?
@VictorIvanidze Thanks for the response! Yes we could use a transport rule but we are currently using Power Automate to move Invoices from a shared mailbox junk folder to the correct folder in the same mailbox so it would have been nice to have it all included in the same Power Automate flow.
But I can see this isn't possible...
MS documentation is wrong.
I've just done a quick test and in fact you can change the Subject of ingoing message.
Request body I've used is
{
"subject": "blabla"
}
@VictorIvanidze
Thanks for the response ... But
I get a 405 error stating:
What action you are using to execute a request?
Try to use "Send an HTTP request" from "Office 365 Groups" connector.
@VictorIvanidze I was using the standard HTTP action as shown in my first post.
I get the same issue with the Office 365 Group connector?
As well as the same error in the "Outlook - Send an HTTP Request" connector.
This works for me:
Try to do the same.
@VictorIvanidze Thanks for the help! The reason it wasn't working was that my Graph API call was miss formed. I read another community post which helped me solved the issue for a shared mailbox.
https://powerusers.microsoft.com/t5/Using-Connectors/Item-Id-doesn-t-belong-to-the-current-mailbox/m...
User | Count |
---|---|
101 | |
36 | |
29 | |
25 | |
16 |
User | Count |
---|---|
133 | |
54 | |
53 | |
36 | |
26 |