Forum Academy Marketplace Showcase Pricing Features

Push list of one element

hi
I am using the Api to send data, and i get an error when i have a list with one element.

the error is : b’{“statusCode”:400,“body”:{“status”:“INVALID_DATA”,“message”:“Invalid data for field Flavor: UnflavouredPlain cannot be parsed as a JSON”}}’

if I use this json, it doesnt work :
data1 ={‘Barcode’: ‘30334914261480007’, ‘Organic’: ‘No’, ‘Flavor’: [‘UnflavouredPlain’] }

to make it work, i need to use :
data1 ={‘Barcode’: ‘30334914261480007’, ‘Organic’: ‘No’, ‘Flavor’: [‘UnflavouredPlain’, “”] }
and add an null element !!

is there a solution for this
thank you for your help

In your workflow, you could check if the number of items in the list is 1 and then with “:plus item” you can manually add a " " blank element to the list.

Data to send becomes:
MyList :plus item " "
only when MyList:count ≤1