Skip to main content

Notifications

Power Automate - Using Flows
Answered

My flow is sending multiple emails

(0) ShareShare
ReportReport
Posted on by 379

Hello everyone! I have a flow that send email when the document expiration date is near to 30, 60 and 90 days, the situation is that the flow is sending more than one email, for example if I have 8 documents near to 30 days it sends 8 emails to the same person. How can I avoid that? here is my flow : 

lcdelgado_0-1680101269638.png

lcdelgado_1-1680101315935.png

lcdelgado_2-1680101376232.png

1)  addDays(utcnow(), int(outputs('Days_to_remind_me_in')), 'yyyy-MM-dd')
2)  addDays(outputs('Today_+_x_days'),30,'yyyy-MM-dd')

lcdelgado_3-1680101480571.png

lcdelgado_4-1680101517274.png

 

lcdelgado_5-1680101560168.png

 

lcdelgado_6-1680101612036.png

I really appreciate any help on this matter. 🙂

  • lcdelgado Profile Picture
    lcdelgado 379 on at
    Re: My flow is sending multiple emails

    We DID IT!!!!!!!!!🏆 THANK U THANK U THANK U THANK U THANK😁🤗

  • lcdelgado Profile Picture
    lcdelgado 379 on at
    Re: My flow is sending multiple emails

    Question... The send email is outside of apply to each 2 or into apply to each 2?

  • lcdelgado Profile Picture
    lcdelgado 379 on at
    Re: My flow is sending multiple emails

    Ok

  • Verified answer
    Nived_Nambiar Profile Picture
    Nived_Nambiar 17,024 on at
    Re: My flow is sending multiple emails

    Not sure why it is like that

    Could you try to add again the set varaible action by deleting it. ?

     

  • lcdelgado Profile Picture
    lcdelgado 379 on at
    Re: My flow is sending multiple emails

    I don't have the assignee email option:

    lcdelgado_0-1680202125378.png

    and I create the first variable, like you said

    lcdelgado_1-1680202224969.png

     

     

  • Nived_Nambiar Profile Picture
    Nived_Nambiar 17,024 on at
    Re: My flow is sending multiple emails

    Hi @lcdelgado 

     

    For assignee email, give a try like this

     

    At the start of flow, initialize variable named assignee_email like below

    Nived_Nambiar_0-1680201329166.png

     

     

     

    While using apply to each value when you adding some details

     

    Use set variable to set email like this 

    Nived_Nambiar_2-1680201039668.png

     

     

    At last in send email, specify that variable in To section

    Nived_Nambiar_3-1680201067447.png

     

    I assume all list have same assignee emails for your use case  

  • lcdelgado Profile Picture
    lcdelgado 379 on at
    Re: My flow is sending multiple emails

    Instead of a condition?

  • Nived_Nambiar Profile Picture
    Nived_Nambiar 17,024 on at
    Re: My flow is sending multiple emails

    Hi @lcdelgado 

     

    Actually what i meant is Use a compose function and place the value variable next to get items action , then run the  flow

     

    After run, you will see the json structure in that compose section.

     

    Just share screenshot of that so that we can check what is value of assignees emails there 

     

     

    Hope you understand what to do 🙂

     

    Nived_Nambiar_0-1680194268876.png

     

     

  • lcdelgado Profile Picture
    lcdelgado 379 on at
    Re: My flow is sending multiple emails

    Almost there: I have another error: 

    lcdelgado_0-1680191159958.png

    "status"400,
      "message""Parameter 'To' cannot be null or empty.\r\nclientRequestId: 4ceda05a-4072-41f3-a409-d6124063ca3b",
      "error": {
        "message""Parameter 'To' cannot be null or empty."
      },
      "source""office365-ncus.azconn-ncus-001.p.azurewebsites.net"
    }
  • lcdelgado Profile Picture
    lcdelgado 379 on at
    Re: My flow is sending multiple emails

    I don't have another compose 3 on my flow, do I need a new one?

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,343

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,703

Leaderboard

Featured topics

Restore a deleted flow