cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dynamicl
New Member

Problem passing correctly formatted date to Outlook Out of Office

Hi,

 

I've just started to work with flow and have been testing out various functionality. I want to create a flow that activates your OOO for 1 hour and I have tried the following without success:

 

Start: @{addhours(utcnow(),1)}
End: @{addhours(utcnow(),2)}
ERROR: "message": "Invalid value '@{addhours(utcnow(),1)}' for parameter 'ScheduledStartDateTimeOffset'",

 

Start: "@{addhours(utcnow(),1)}"
End: "@{addhours(utcnow(),2)}"
ERROR: "message": "Invalid value '\"2017-05-11T10:43:33.8798644Z\"' for parameter 'ScheduledStartDateTimeOffset'",

 

Start: "@{concat(formatDateTime(addhours(utcnow(),1),'s'),'-00:00')}"
End: "@{concat(formatDateTime(addhours(utcnow(),2),'s'),'-00:00')}"
ERROR: "message": "Invalid value '\"2017-05-11T12:18:08-00:00\"' for parameter 'ScheduledStartDateTimeOffset'",

 

For some reason, the fields seem to require quotation marks around the date expression ... but then that makes it invalid. If I type in the dates manually it works perfectly. There is a calendar flow template that uses the utc date expression and that seems to work fine.

 

Am I being stupid and missing something obvious or is this a bug with this particular Outlook action?

 

Hope you can help,

 

Many thanks
Maurice

1 ACCEPTED SOLUTION

Accepted Solutions
v-micsh-msft
Community Support
Community Support

Hi @dynamicl,

 

As  @RajRa mentioned, currently the DataCard of the Action can't accept the expression as valid input, as you have noticed, the outputs of the expression would contain double quotes.

To workaround this, please consider add two Compose Action, then use the Compose output as the Parameter, this would remove the double quotes:

7.PNG8.PNG

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
RajRa
Power Automate
Power Automate

Can you post a view of how you are trying to achieve this? In general you currently cannot input logic app expresssion into the actions cards at thsi time.

v-micsh-msft
Community Support
Community Support

Hi @dynamicl,

 

As  @RajRa mentioned, currently the DataCard of the Action can't accept the expression as valid input, as you have noticed, the outputs of the expression would contain double quotes.

To workaround this, please consider add two Compose Action, then use the Compose output as the Parameter, this would remove the double quotes:

7.PNG8.PNG

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Hi,

 

Thank you for your help ... the compose option works perfectly!

 

I think the built in calendar template confused me because when you edit it you see this, so I assummed you could do inline expressions ...

 

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (4,083)