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

Delay until the end of an event.

I'm trying to create what I'd imagine would be a simple Flow that is triggered by the creation of an Outlook calendar event and a subsequent action would be send an email once we reach the 'End Time' of the newly created event.

My guess is I should use 'Delay until' but I can't figure out the expression or content needed, advice would be appreciated.

AndrewCT_0-1641548908930.png

AndrewCT_1-1641548920729.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User
Super User

Hi @AndrewCT,

 

You could use a formatdatetime function to format the end time value in the correct format for the Delay until action.

 

Below is an example:

formatdatetime(triggerOutputs()?['body/end'], 'yyyy-MM-ddTHH:mm:ssZ')

 

bodyend_formatdatetime.png



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


View solution in original post

7 REPLIES 7
Expiscornovus
Super User
Super User

Hi @AndrewCT,

 

You could use a formatdatetime function to format the end time value in the correct format for the Delay until action.

 

Below is an example:

formatdatetime(triggerOutputs()?['body/end'], 'yyyy-MM-ddTHH:mm:ssZ')

 

bodyend_formatdatetime.png



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


AndrewCT
Frequent Visitor

Thank you so much for your response, I am extremely new to all this and I've entered the above into the flow but it gives an error.

 

AndrewCT_0-1641827103144.png

 

Expiscornovus
Super User
Super User

Hi @AndrewCT,

 

Can you show a screenshot of your whole flow. Just to double check which other actions you are using. Maybe we are referring to the correct field name.

 

And can you also show in that screenshot the expression before you save the flow, there might be a typo.

 

Lastly, just to double check, the | in my screenshot at the beginning of the expression is my cursor and not a vertical bar character. My screenshot might be a bit confusing 😁 



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


AndrewCT
Frequent Visitor

 

 

Hi, Thanks again, to be honest, it's so straightforward, nothing much to the flow. The Condition part works in so much as it starts the Flow but you'll see I have it to send an email, I want this to send after the end time of the scheduled event.

 

AndrewCT_0-1641828742246.png

AndrewCT_1-1641828759412.png

 

Expiscornovus
Super User
Super User

Hi @AndrewCT,

 

Thanks for sharing the screenshots. It should be possible to copy paste the expression code I shared earlier directly in the expression tab of the Delay action.

 

Below is a screenshot how you can do that.

 

When you copy paste it and click ok the expression is validated. When valid you should be able to see the fx icon. If it is not valid you should get an error.

 

copypastfxbefore.png

 

copypastfx.png



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


AndrewCT
Frequent Visitor

Thank you so much, this has gone in as a correct expression, I now need to test it and post results.

AndrewCT
Frequent Visitor

Superb! All working. Thank you so much, really appreciate the prompt assistance.

Best wishes, stay well.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (2,597)