Reputation: 11
I have looked over this countless times and yet I get the error "You must return a single object or array of objects.
if (inputData.score === '0') {
output = 'Passed';
} else {
output = 'Failed';
}
return output;
Not sure what I am doing wrong?
Upvotes: 0
Views: 475
Reputation: 5262
David here, from the Zapier Platform team.
In your code, you're returning a string, not a javascript object ({}
) or array of objects ([{}, {}]
).
change your code to the following:
if (inputData.score === '0') {
output = 'Passed';
} else {
output = 'Failed';
}
return {result: output};
Upvotes: 1