Hi everyone!
I'm trying to create a flow that creates a Planner task when a Form response is submitted. Where I'm specifically having trouble is on the task Due Date Time field.
I need the due date to be three days before my Requested Send Date. The Requested Send Date is one of the data fields from my Form, and I've pulled it into the below expressions as:
(body('Get_response_details')?['rd11379f17ee94ff5afe9aee5b6567aa5']
Here's the full expression I have in the Due Date Time field currently:
addDays(body('Get_response_details')?['rd11379f17ee94ff5afe9aee5b6567aa5'],-3,'mm/dd/yyyy')
I've also tried:
@equals(formatDateTime(body('Get_response_details')?rd11379f17ee94ff5afe9aee5b6567aa5'],'MM/dd/yyyy'),formatDateTime(addDays(body('Get_response_details')?rd11379f17ee94ff5afe9aee5b6567aa5'],-3),'MM/dd/yyyy'))
Both versions return status code 400 with this error message when I try to run the Flow:
{ "error": { "code": "", "message": "The request is invalid:\r\nCannot convert the literal '00/23/2018' to the expected type 'Edm.DateTimeOffset'.", "innerError": { "request-id": "814b5dd1-205d-4cef-8ccc-ef10a49e3887", "date": "2018-01-19T19:13:11" } } }
I've looked at a bunch of the discussions here and tried to figure this out, but I am throroughly stuck. Any pointers would be greatly appreciated!!
Hi Some of the aboe doesnt work
1. when trying to pick dynamic content of "Respond ID" - the only dynamic option displayd in the menu is "List Response Notifications Response ID"
2. the addDays refuses to work in any variation... I've tried them all.
an expression error or data time error always prevent it from accepting it
3. you havnt mentioned which dynamic option you choose from the "aplly to each" selectec output...
there are 4 options in the menu, all expect "body" are called "List response XXXXXXX"
Chance you can help sorting this one out?
Thanks so much for the help, Kris!
Here is a screencap of my flow; your suggestion below worked. For whatever reason, changing the Start Date Time to the utcnow() function, rather than the 'Submission Date' value from the Form made the Flow run successfully. Thank you again!
Hi @Anonymous,
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 is not valid, the "Create a task" action could not convert the value that you provided into a expected type.
I have made a test on my side and please take a try with the following workaround:
Add a "Create a task" action, Start Date Time field set to following formula:
utcNow()
Due Date Time field set to following formula:
addDays(body('Get_response_details')?['rc787195479ff44329dd91fb703b380a8'],-3,'yyyy-MM-ddT00:00:00Z')
Note: I have pulled the Requested Send Date data field from my Form into following expression:
body('Get_response_details')?['rc787195479ff44329dd91fb703b380a8']
Image reference:
The flow works successfully as below:
Best regards,
Kris
Michael E. Gernaey
566
Super User 2025 Season 1
David_MA
516
Super User 2025 Season 1
stampcoin
492