if(equals({variable},'value'),'It matches','It doesn't match')
if(
or(
equals(triggerBody()['text'],'value')
,
and(
greater(triggerBody()['number'],10)
,
contains(triggerBody()['text_1'],'Test Phrase')
)
)
,
true
,
false
)
@and(
contains(triggerOutputs()?['body/Name'], '.pdf'),
and(
greater(triggerOutputs()?['body/Size'], 102400),
less(triggerOutputs()?['body/Size'], 1048576)
)
)
Mondays to Fridays, which corresponds to integers 1 to 5
0 if the date is a Sunday 1 if the date is a Monday 2 if the date is a Tuesday 3 if the date is a Wednesday 4 if the date is a Thursday 5 if the date is a Friday 6 if the date is a Saturday
dayOfWeek(utcnow())
equals(dayOfWeek(utcNow()),1)
How to Check if a Date is on a Business Day in Power Automate - Power Tech Tips
- Use
formatdate
/dayOfWeek
&lessOrEquals
/GreaterOrequals
to check for specific timeframe - Set the condition in your specific trigger
lessOrEquals( formatdatetime(utcNow(),'HH:mm'), formatdatetime('9:00','HH:mm'))
GreaterOrequals( formatdatetime(utcNow(),'HH:mm'), formatdatetime('16:00','HH:mm'))
// Match only Workdays between between 09:00 - 16:00
// Keep in mind thats UTC Time!
@and(
and(
GreaterOrequals(dayOfWeek(utcNow()),1),
lessOrEquals(dayOfWeek(utcNow()),5)
),
GreaterOrequals(
formatdatetime(utcNow(),'HH:mm'),
formatdatetime('08:00','HH:mm')
),
lessOrEquals(
formatdatetime(utcNow(),'HH:mm'),
formatdatetime('17:00','HH:mm')
)
)
// Match only Workdays between between 16:00 - 09:00 & Sa/So 00:00 - 23:59 UTC
// Keep in mind thats UTC Time!
@or(
and(
GreaterOrequals(dayOfWeek(utcNow()),1),
lessOrEquals(dayOfWeek(utcNow()),5),
and(
lessOrEquals(
formatdatetime(utcNow(),'HH:mm'),
formatdatetime('08:00','HH:mm')
),
GreaterOrequals(
formatdatetime(utcNow(),'HH:mm'),
formatdatetime('17:00','HH:mm')
)
)
),
and(
GreaterOrequals(dayOfWeek(utcNow()),6),
lessOrEquals(dayOfWeek(utcNow()),0)
)
)