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
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 Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (21,122)