We are moving to Echange Online and have an onprem Notes-based legacy application that analyzes incoming emails coming to a spesific mailbox, then redirects the email untouched to different mailboxes based on several conditions in the mail body.
We have tried to replicate this in Flow, but it seems that Flow lacks the ability to redirect an email without altering the From-field. It can forward - but we need to preserve the original mail-header, especially the from-field.
Does anyone know if this is possible to achieve, or if this function in Flow is something that is requested by others?
I'm afraid the function that redirecting an email without altering the From-field is not supported in Microsoft flow currently.
You could post your idea in the Flow Ideas forum, so it might be considered for future releases.
Yeah, I can do it in a mail flow rule, but it seems really weird I can't do it in a Power Automate flow rule. I need to make a call-out before I decide if I need to redirect it. That's why I need it in Power Automate since I can't do a call out in a mail flow rule.
I'm making an API call-out to a database to see if a record exists. If it does I need to move the email message to a different mailbox.
Is it possible to maybe flag the email or move it to a folder, and then run a mailbox rule on that folder or for that flag and then redirect it that way?
I see the following possible way:
1) first transport rule selects the messages that have to be analyzed and executes "Forward the message for approval to..." a shared mailbox action
2) a flow linked with the shared mailbox analyzes the messages and mark somehow those that have to be redirected
3) second transport rule redirects the marked messages
>1. How could I flag it?
As you like. Add an X-header, for example
>2. How do you run transport rules a second time?
Transport rules are working continuously - there are no first or second time of execution at all.
When you say transport rules, I'm thinking mail flow rules. Is that correct? I thought when an email comes in, the mail flow rules run and finish, and then when it hits the mailbox, the power automate flow rule would run. Is this incorrect?
It says: "mail flow rules take action on messages while they're in transit, and not after the message is delivered to the mailbox."
So wouldn't it stop running when it hits the shared mailbox?
Not yet. I'm still trying to figure out how to tie it all together and get the mail flow rules to run after the power automate rule.
So flow should look like this, right?
1. mail flow rule moves email to shared mailbox for approval.
2. power automate rule runs on shared mailbox making a call-out to the database.
3. power automate flags the header (basically a true or false. if true go to a specific mailbox, if false continue to the original recipient).
4. email gets approved in order to continue?
5. mail flow rule sees flag in header and moves message to specific mailbox if flag is true.
6. message goes to original recipient if flag in header is false.
If the email gets approved does it just continue on to the original recipient, and do the mail flow rules just keep running (do they start over or just pause and then continue on)? Do i do the approval in the power automate rule (how?)?
>5. mail flow rule sees flag in header and moves message to specific mailbox if flag is true.
Redirects, not moves.
>If the email gets approved does it just continue on to the original recipient
> and do the mail flow rules just keep running
>Do i do the approval in the power automate rule (how?)?
It's possible do the approval in the power automate flow.
I know how to do it but I'm not ready to share my know-how 😉
Check out the announcement of Power Platform content at Microsoft Ignite!
Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.
Features releasing from October 2020 through March 2021