jck4real
jck4real

Reputation: 33

Initialize Variables in Power Automate Flow

I am wondering about power automate flow and I issues I had.

I am trying to set up initialize variables for checking time (european standard time) in my rules.

Expression looks like this -

startOfHour(convertFromUtc(triggerOutputs()?['body/receivedDateTime'],'Central European Standard Time','t'), 't')

Under variables I have condition which (True/Not) like this - YES - time is greater than 22:30 PM NO - time is less than 8:00 AM

If condition is true, my e-mail is forwarded to another outlook mailbox. If not, nothing happened.

But this flow doesn't work :D Can you help me resolve it ?

Thanks a lot ! First part prtscrn Second part prtscrn

Upvotes: 0

Views: 579

Answers (1)

carlosherrera
carlosherrera

Reputation: 187

Given the information provided, I suggest the following:

  1. Get the current time.
  2. Convert it to the desired time zone. You can use the built in function to avoid calculation errors.
  3. Convert only hour and minute to Integer. For example, 14:33 would be 1433.
  4. Compare integers. This is: if time is greater than 2230 and less than 830, then forward email.

The flow might look like this: enter image description here

Upvotes: 1

Related Questions