Error while creating automation from custom app
I am trying to create an automation from within the custom app, I am following the documentation on Support Site. The script works on Postman, but when I try from the custom app it gives the below error :
Error {"error":"RecordInvalid","description":"Record validation errors","details":{"base":[{"description":"Invalid conditions. You must select at least one condition."}]}}
below is the code that I am executing.
-
Hi,
I took a look and was able to work out your issue, simply switch out your line
dataType: "json"
for
contentType: "application/json"
(or just add that line to your settings) and your existing code should work.
And as a bonus, if you change out your console logs to use commas instead of plus signs, the logs will contain the data in an expandable format (instead of showing as [Object object]):
console.log("Automation created", data);
-
Hi Cheryl Lane:
Thanks alot, I followed ur suggestion and it worked . :)
サインインしてコメントを残してください。
2 コメント