I have a flow built to place items in a microsoft form into a microsoft list. if one of the items in the form is left blank (in this case, a date item), I get this response:
The 'inputs.parameters' of workflow operation 'Create_item' of type 'OpenApiConnection' is not valid. Error details: Input parameter 'item/DateforPCPfollowup' is required to be of type 'String/date'. The runtime value '"if(empty(outputs('Get_response_details')?['']), null, outputs('Get_response_details')?[''])"' to be converted doesn't have the expected format 'String/date'.
How do I correct this? And more specifically, if other items in the form are left blank, how can I correct it for the entire form?
Thanks
Trying to work out why it wasn't working was driving me nuts! thank you for your solution 🙂
OMG Thank You!
I believe this is a bug in the new designer. I was struggling with this for days. I tried several older posts, but in the new designer, SharePoint Create Item Action I had the following:
if(empty(variables('endDate')),null,variables('endDate'))
and it was giving me this error: The 'inputs.parameters' of workflow operation 'Create_item' of type 'OpenApiConnection' is not valid. Error details: Input parameter 'item/EndDate' is required to be of type 'String/date'. The runtime value '""' to be converted doesn't have the expected format 'String/date'.
When I switched to the old Designer, I removed the formula from the End Date column (this is required), then I pasted the same formula from NotePad:
if(empty(variables('endDate')),null,variables('endDate'))
and it worked!!!
I'm thinking the 'null' is not working correctly for the New Designer SharePoint Create Item.
Hope this helps someone else...
@jscheeracnp @jessicasch Your expression looks like it's missing the dynamic content.
Try creating the expression in this way. Add a Compose action and insert an expression. Use the empty() function.
Click on the Dynamic Content tab and insert the dynamic content from the Get Response details action of the date question.
Place your cursor at the start of the expression by pressing the UP arrow key. Enter if and an opening parenthesis.
Go to the end of the expression by pressing the down arrow key. Add a comma and the word null and another comma.
Insert the dynamic content from the date question again.
Add a closing parenthesis.
Run a test. If the date question is empty, the Compose action will return null, if it's not empty, it'll return the selected date.
You can now use the output of this Compose action in your Update Item action.
You might find these two YT Tutorials helpful:
How to Get Microsoft Form File Uploads Attached to an Email 📧
In this section I cover how to create a dynamic content key that will output an email address/addresses based on a selection from the form. You can use the same logic in your flow.
I also cover the following in the tutorial above:
✅ Two types of MS Forms
✅ Where Microsoft Personal (OneDrive) Form File Uploads are Saved
✅ Where Microsoft Group Form File Uploads are Saved
✅ How to Add a File Upload Question to an MS Form
✅ How to get a Microsoft Form ID
✅ How to get a Microsoft Form Response
✅ How to Get the Dynamic Content Microsoft Form File Upload Content
✅ How to handle Single and Multiple Microsoft Form File Uploads
✅ How to use a Scope action to Organize and Group Your Flow Actions
✅ How to Get the File Content from an MS Form File Upload
✅ How to Collect All Files Uploaded to a MS Form and Attach to an Email
✅ How to Handle MS Form Response When a File Isn’t Uploaded
✅ How to Create an Email Key
✅ How to Send an Email to a Specific Recipient Based on Form Selection
✅ How to Create a Dynamic Output Based on Form Selection
---
You might also find this YT Tutorial helpful: 5 Power Automate Troubleshooting FAQs and Helpful Tips for Creating Better Flows
IN THIS VIDEO:
✅ How to troubleshoot a false Condition action result
✅ How to get dynamic content when it isn’t selectable from the list of dynamic content
✅ How to troubleshoot an Apply to Each action that isn’t looping through
✅ How to troubleshoot a skipped Apply to Each action
✅ How to troubleshoot a Filter Query
✅ How to use a SharePoint yes/no column in a Filter Query
✅ How to use Compose actions to troubleshoot a Power Automate flow
✅ How to troubleshoot multiple emails being sent
✅ How to troubleshoot multiple Teams messages being sent
Hope this helps!
Thanks, the Output for 'DateforPCPfollowup,' is blank because it was left blank in the microsoft form answer. Is there a way to work around that? I anticipate there may often be a blank answer in the form/date response.
Hi , @jscheeracnp
This error code means that your "outputs('Get_response_details')?['']" did not return a 'String/date' type.
You need to check what's the value the "outputs('Get_response_details')?['']" code return in your side.
Can you share your 'Get_response_details' action output in your flow run history?
Best Regards,
Yueyun Zhang
WarrenBelz
146,743
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,089
Most Valuable Professional