cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nhafala
Level: Powered On

Gmail reply sent twice

Hi

 

I have a flow that sends an out of office reply when events with certain titles are active in my  calendar.

 

screencapture-emea-flow-microsoft-manage-environments-Default-c26d8596-66d7-4df4-a454-d2b749816fd2-flows-5f217189-cedb-41ef-8242-90a39e667143-2018-12-03-08_47_42.png

 

Everything works fine, except for 1 thing: the flow sends a duplicate reply.

 

I have some dynamic content on the body of the email. Namely, the date I'll be back in the office. I get this date from the end of the calendar event which I then format using compose functions.

I noticed that usually one of the emails is sent with one date format and the other is sent with another.  One uses dd-mm-yyyy and the next one uses yyyy-mm-dd, for example. Sometimes it even sends the unformatted date, which looks like this 2018-12-02T22:59:00+00:00.

 

What do you think the problem is?

3 REPLIES 3
Community Support Team
Community Support Team

Re: Gmail reply sent twice

Hi @nhafala,

 

From the screenshot, it seems that you have two conditions, could you share the functions that are used? It cannot be seen clearly.

I am wondering that if the condition filter out two events that matched the condition, so the reply to email works twice.

Please share more details to help reproduce this issue.

 

Best regards,

Mabel

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
nhafala
Level: Powered On

Re: Gmail reply sent twice

The first condition expression is: 

 

@and

    (

     greaterorequals(triggerBody()?['DateTimeReceived'], items('Apply_to_each')?['start']),

     lessorequals(triggerBody()?['DateTimeReceived'],items('Apply_to_each')?['end'])

       )

This checks if the current time matches the time of the ongoing event.

 

 

 

 

 

The second condition is:

 

@or(contains(items('Apply_to_each')?['summary'], 'Emanuel frei'),contains(items('Apply_to_each')?['summary'], 'Emanuel frei'))

 

This checks the title of the event.

 

These are the compose functions:

495JF

 

 

Compose 3 has this expression:

addHours(outputs('Compose'),+2)

This adds to hours so the end of certain events fall on the right day.

 

 

 

Compose 2 has this:

formatDateTime(outputs('Compose_3'),'dd-MM-yyyy')

This formats the calendar date.

 

 

 

 

I hope the explanation is clear.

 

nhafala
Level: Powered On

Re: Gmail reply sent twice

Sorry, I think I wrote a new message instead of replying to you. Just in case you weren't notified.

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Coming Soon: T-shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Top Solution Authors
Top Kudoed Authors
Users online (6,017)