I built a flow that runs in the early morning and sends an email for every event on my Outlook calendar. This replicates something similar I used when working at a Google Apps shop. It helps me to plan out my day by building alerts into my routine of killing off email each morning.
The Outlook connector includes Dynamic values like Start Time and End Time, but those values are stored in UTC format. There are Expressions like AddHours that I could use to theoretically subtract 5 hours (I'm ET), but it won't allow me to use them together.
When I select the AddHours Expression, the first parameter if a timestamp. I cannot insert the dynamic values Start Time or End Time as that parameter.
There may be a better or more straightfoward way to do this... Maybe there's a connector or expression I could use that would just reformat my Start Time and End Time to the timezone I want. If so, let me know.
If not, here are my errors. I appreciate any help.
Here's my flow:
Here's the error:
Here's what happens when I try to find Start Time in the Dynamic Content tab after using addHours()
...It's not listed as an option.
Am I misunderstanding how Dynamic Content and Expressions can be used together?
It is possible to use multiple nested functions in a single expression so you should in theory be able to combine AddHours with another function.
However, in your scenario you may be better off using the ConvertFromUTC function. This takes a date time value in UTC along with the name for the timezone you want to convert to.
I still have the same core problem with convertFromUTC().
When I select it as an Expression, the Start Time and End Time Dynamic Values are not available to select. When I just type the Start Time field, it doesn't work. Or am I using the expression incorrectly?
Here's a screenshot:
If you start typing the expression and then click back to Dynamic Content tab you should be able to select it and insert it into the expression (see the below gif).
That's what I'm doing, but [Start Date] and [End Date] aren't options for me, like [Trigger date] is for you.
I have just tested this with the Get Calendar Events action and am seeing the same as you, many of the fields are not available in the expression.
You may be able to work around this using variables set up like the below. You will need to initialize any variables outside of the loop and then inside the loop set them to the Dynamic Content. You can then access the variables when building the expression.
You need to make sure you have an initialize variable action along with a set variable action (refer to the image in my previous post). In your screenshot you are attempting to use a variable called "Start Time" that doesn't exist as it hasn't been initialized.
Join us for the first ever Power Platform Online Conference!
Look out for new contribution recognition badges coming SOON!
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!
Find out where you can attend!
Watch & learn from the Power Automate Community Video Gallery!