Skip to main content

Hey Guys,

I am running into an issue here that im unsure of how to work around. Im new to Zapier and fairly new to json.

Job:

I need to have an array of products formatted in a very specific way to populate a table inside a Courier (dispatching platform).  It needs to be structured like “qty”,”itemname”,”price”], “qty”,”itemname”,”price”], t“qty”,”itemname”,”price”] ]

 

Raw Data From Website:

Data comes in like this:

Qty: 1,1,1

Product: itemname,itemname,itemname

Price: price,price,price


Where I am at right now:

This is the relevant code from my Integration:

'custom_field_template': bundle.inputData.custom_field_template, //name of the Custom Form
'meta_data': e
{
'label': 'Order_Details', //Name of the Table we are inserting into
'data': ebundle.inputData.products] // array to insert
},

 

I have used Line-Item to Text formatter to format the array. The output on the formatter is perfect:

c"1","Product 1","45.00"], n"1","Product 2","160.00"], ""1","Product 3","35.00"]

 

Outcome:

'custom_field_template': bundle.inputData.custom_field_template,
'meta_data': c
{
'label': 'Order_Details',
'data': a"e"1","Product 1","45.00"], "1","Product 2","160.00"], 1"1","Product 3","35.00"]"]
},

Zapier is encasing the array in “” which is causing the API call to ignore the table data.

 

I have been on this for a couple days now trying different things and I havent been able to get past this issue. Any help would be greatly appreciated.

Hi there, @jimbob12. Thanks for reaching out in community!

I hope you don’t mind I moved your question over to our Code & Webhooks forum.

Hopefully that will get some more technical eyes on this for us. 🤗