I’m trying to create a logic flow that deletes a CMS item by using the item ID returned from the “Search for CMS Item” action. When I run the logic test, I get a 400 bad request error saying
“CMS Parse Error: The value incorrect-value
is not a valid option for the CMS item.” I’ve check the response received on the network from the search request, and confirmed that the Item ID
field returned is correct, but the Item ID being passed into the “Delete CMS Item” action is using the response value, not the Item ID.
Search Response from network (formatted and redacted):
{
"id": "id",
"flowId": "flow-id",
"timeline": "[
{
\"tag\":\"Action\",
\"val\":{
\"Custom Fields\":[
{
\"name\":\"response\",
\"value\":\"incorrect-value\"
},{
\"name\":\"field-name\",
\"value\":\"field-value\"
}
],
\"Item ID\":\"actual-item-id\",
\"Name\":\"item-name\",
\"Slug\":\"item-slug\",
\"Item URL\":\"item-url\",
\"Item Status\":{
\"tag\":\"staged\",
\"val\":{}
},
\"Created On\":\"date-time\",
\"Created By\":\"flow-id\"
}
}
]",
"result": "{
\"tag\":\"Error\",
\"val\":{
\"tag\":\"CMS Parse Error\",
\"val\":\"The value `incorrect-value` is not a valid option for the CMS item.\"
}
}"
}
Screenshot of logic flow:
Firstly, I’m confused why there is an option to search for CMS items using their other fields (besides Item ID) but not update or delete CMS items using other fields.
Secondly, Why is the wrong ID value passed when requesting the Item ID
from the search response?