Hello, I have created a flow, and it fires every hour, and performes some steps and then send an email.
Is there a way that i can get the time of the day? so I can disable the workflow outside of labor hours?,
Could you please share more details about your current flow?
If you just want the flow to run outside the labor hours, then we may consider take use of the recurreccy:
The recurrency would allow to specify the Start time:
You could specify the start time outside the labor hours, and then configure the frequency.
Besides, if you already added the Recurrency, then we could add a condition to check the current time (UtcNow()), if it is within the labor hours, do nothing, otherwise, run the flow action.
For example, the working hours is between 8:00 and 18:00, we could write the following formula under Condition Advanced mode to verify:
@and( GreaterOrequals( formatdatetime(utcnow(),'HH:ss'), formatdatetime('8:00','HH:ss') ), lessOrEquals( formatdatetime(utcnow(),'HH:ss'), formatdatetime('18:00','HH:ss') ) )
If the current time is within the labor hour range (greater than 8:00 and less than 18:00 in the example), under the IF YES part, specify nothing, under the IF NO part, add your following flow Actions.
Note: UTCNow() function returns the time in UTC time zone, make sure to specify the corrseponding working hour with the proper time.
If you need any further assistance on this topic, please post back.
Slightly different, but same principle I think. I would like a FLOW to run once a day that checks a folder in sharepoint. If the contained files are more than 2 weeks old, delete them.
I'm starting with "SharePoint - List Folder"
then, adding an Apply to Each = "Body"
then, Conditional = if Object Name "Last Modified" is less than... "my guess is to input -14", but I'm not sure and I don't want to delete any more files than necessary.
@TheD, I ended up just changing the retension policy for the document library. That is a more straightforward aproach I overlooked at first. Since the files I'm dealing with are not modified and I'm not concerned with that, I just set it for 14 days and it get's rid of every file that's older than (was created past) 14 days. I don't know off hand if OneDrive has a similar retension policy you can set, but you may want to explore that.
Can I identify date rather than time on it?
FORMATDATETIME（ '07/29/2018'， 'yyyy-MM-dd'）
FORMATDATETIME（''07/30/2018' ， 'yyyy-MM-dd'）
I tried to use this, but it can no work....
Watch Microsoft Business Applications Summit sessions on-demand.
The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!
We are excited to announce the launch of Power Virtual Agents Community. Check it out now!
We've updated and improved the layout and uploading format of the Power Automate Cookbook!
Fill out a quick form to claim your user group badge now!
The top training and networking event across the globe for Microsoft Business Applications