cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
carpenb
Level: Power Up

Planner Error Passing a Outlook Task Due Date to Planner

I have built a simple flow to send an Outlook Task to Planner. The problem I have is that when I add the Outlook Task Due Date as dynamic content to the Create Task Due Date time for Planner in my flow the flow always fails. Without the Due Date passed it works fine.  I've read through some of the previous and tried the addhours()  function but that also fails.

 

The error I'm getting is:

The request is invalid: Cannot convert the literal '2018-02-08T05:00:00' to the expected type 'Edm.DateTimeOffset'.

 

The workflow details show this

error": {
    "code""",
    "message""The request is invalid:\r\nCannot convert the literal '2018-02-08T05:00:00' to the expected type 'Edm.DateTimeOffset'.",
    "innerError": {
      "request-id""6dbfd24a-967a-409b-beb8-8ee7b9706745",
      "date""2018-02-07T21:04:04"

 

Help would much be appreciated. 

1 ACCEPTED SOLUTION

Accepted Solutions
carpenb
Level: Power Up

Re: Planner Error Passing a Outlook Task Due Date to Planner

Thanks, Alice! I did realize that the date that was being passed from the Outlook task was not being formatted correctly. I used the concat () function in the Due Date Time field in the Create Task Planner to add a "Z" to the date that was being passed from the Outlook Task

 

concat(triggerBody()?['DueDateTime']?['DateTime'],'Z')

 

I think your format date function is more elegant. So I added this to the Due Date Time field for the Create Task Planner so that it formatted theDue Date being passed from the Outlook Task correctly. This would be easier to show if I could attach an image but unfortunately, I cannot figure out how to insert a picture of the flow. When I added this function the flow worked also.

 

formatDateTime(triggerBody()?['DueDateTime']?['DateTime'],'yyyy-MM-ddThh:mm:ssZ')
 
I will now update the Start Date fields. 

 

 

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

Re: Planner Error Passing a Outlook Task Due Date to Planner

Hi @ carpenb,

 

Could you please share a screenshot of your flow's configuration?

 

The error message told that the value you provided within Due Date Time field of "Create a task" action for Planner is not valid, the "Create a task" action could not convert the value that you provided into an expected type.

 

I have made a test on my side and please take a try with the following workaround:

  • Add trigger "Manually trigger a flow".
  • Add action "Create a task" of “Outlook Tasks” connector, name the task in the “Subject” field, you could fill in the “Due date” field with expression below:

 

addDays(utcNow(),2)

 

  • Add action "Create a task2" of “Planner” connector, fill in the “Planner Id” and “Bucket Id” field, choose the “Subject” dynamic content if the "Create a task" action in the “Title” field, you could fill in the “Due date Time” field with expression below:

 

formatDateTime(body('Create_a_task')?['DueDateTime']?['DateTime'],'yyyy-MM-ddThh:mm:ssZ')

 1.png

 

 

The flow works successfully as below:

 

 2.png3.png

 

 

 

 

 

Regards,
Alice Zhang

carpenb
Level: Power Up

Re: Planner Error Passing a Outlook Task Due Date to Planner

Thanks, Alice! I did realize that the date that was being passed from the Outlook task was not being formatted correctly. I used the concat () function in the Due Date Time field in the Create Task Planner to add a "Z" to the date that was being passed from the Outlook Task

 

concat(triggerBody()?['DueDateTime']?['DateTime'],'Z')

 

I think your format date function is more elegant. So I added this to the Due Date Time field for the Create Task Planner so that it formatted theDue Date being passed from the Outlook Task correctly. This would be easier to show if I could attach an image but unfortunately, I cannot figure out how to insert a picture of the flow. When I added this function the flow worked also.

 

formatDateTime(triggerBody()?['DueDateTime']?['DateTime'],'yyyy-MM-ddThh:mm:ssZ')
 
I will now update the Start Date fields. 

 

 

View solution in original post

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Speakers, submit your sessions now! Call for speakers ends Feb. 10!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,999)