Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Problem when building a flow to forward all sent emails

(0) ShareShare
ReportReport
Posted on by

Hi, I want to build a flow to forward all sent emails to another email address (gmail) so that I can have a backup. Here are the triggers that I used:

 

When a new email arrives (V3)

   Folder - Sent items

Forward an email (V2)

Mark as read

 

The problem is after I sent an email, it keeps forwarding that email to my gmail again and again and it won't stop. I ended up receiving 100+ emails in a min. I can't find a trigger that can stop the process. 

 

Any solution please? Thank you. 

 

Screenshot 2019-11-29 at 2.28.46 PM.png

  • mmiller108 Profile Picture
    2 on at
    Re: Problem when building a flow to forward all sent emails

    @Anonymous I know this is an old thread, but here's the solution I found. (in case anyone who stumbles on this thread is interested)

     

    This should work as the trigger condition to prevent the infinite loop per the OP problem, where 'forwardingAddress@email.com' is the email address you are forwarding to.

    @not(equals(triggerBody()?['toRecipients'],'forwardingAddress@email.com'))

     

    This is also equivalent:

    @not(equals(triggerOutputs()?['body/toRecipients'],'forwardingAddress@email.com'))

     

  • Community Power Platform Member Profile Picture
    on at
    Re: Problem when building a flow to forward all sent emails

    @yashag2255 Thank you for helping me out, but the email loop is still there after using the expression. 

  • v-alzhan-msft Profile Picture
    on at
    Re: Problem when building a flow to forward all sent emails

    Hi @Anonymous ,

     

    Have your problem be solved?  If yes, please go ahead and mark the post as solved by clicking “Accept as Solution” so that this thread will be marked for other users to easily identify!

     

    Best Regards,

    Alice

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • yashag2255 Profile Picture
    24,529 Super User 2024 Season 1 on at
    Re: Problem when building a flow to forward all sent emails

    hey @Anonymous 

     

    Can you try this: 

     

    @not(equals(triggerBody()?['To'],'test@gmail.com'))
    

     

    Replace that email with your gmail. 

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • Community Power Platform Member Profile Picture
    on at
    Re: Problem when building a flow to forward all sent emails

    @yashag2255 Thanks for your response. 

     

    My question is I know nothing about coding. It seems like I need to first identify some relevant fields in the flow run history for this expression:

    @not(equals(last(split(triggerBody()?['From'],'@')),'testdomain.onmicrosoft.com'))

    I tried to look into the code of the trigger but had no clue what I had to do ... could you please guide me through this process?

     

    Thank a lot! 

     

  • yashag2255 Profile Picture
    24,529 Super User 2024 Season 1 on at
    Re: Problem when building a flow to forward all sent emails

    Hi @Anonymous 

     

    The flow that you have currently is whenever a new email arrives in your sent mail box, you are forwarding it to your gmail. Note that, this will add an email (the forwarded one) to your sent mailbox and trigger the flow again and thereby creates a never ending loop. 

     

    To address this, what you can do is, add a trigger condition to flow saying not to trigger when the email is sent To your gmail. You can follow this blog here to setup the trigger condition. 

     

    https://www.bythedevs.com/post/working-with-trigger-conditions-in-ms-flow 

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1