cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nhafala
Frequent Visitor

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
v-yamao-msft
Community Support
Community Support

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.

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.

 

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

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (22,075)