web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Problem passing correc...
Power Automate
Answered

Problem passing correctly formatted date to Outlook Out of Office

(0) ShareShare
ReportReport
Posted on by 5

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

Categories:
I have the same question (0)
  • RajRa Profile Picture
    Microsoft Employee on at

    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.

  • Verified answer
    v-micsh-msft Profile Picture
    Microsoft Employee on at

    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

  • dynamicl Profile Picture
    5 on at

    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 ...

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 484

#2
11manish Profile Picture

11manish 282

#3
David_MA Profile Picture

David_MA 280 Super User 2026 Season 1

Last 30 days Overall leaderboard