Hey, when using a webhook, I’m receiving an array instead of single objects. Is there a way to break down the array into single objects within Clay? So when I set up the columns I’m receiving, I’m receiving each individual result instead of just one?
Yes! Use the "write to table" feature with the "Send row for each item in a list" option. [1]
This flattens your array so each item becomes its own row. You can write the array to an existing table or create a new one, specify which objects to write, and map them to columns. [2]
This way, instead of one row with an array, you'll get individual rows for each object in your webhook response.
Did that answer your question?
If you need any more help with breaking down arrays into single objects using the "write to table" feature, please let me know. Would you like to provide more details about what you're trying to achieve so I can assist further?
Yes, still confused. In the first screenshot attached, I have a webhook setup in a custom table. What I've done is mapped the 5 column headers containing data. Within that same screenshot on the right side, you'll notice there are 12 responses coming from one JSON array so when I map the first value's columns, only the first row's values appear and not the rest. You're suggesting the 'write to table' feature with "send row for each item in a list" should flatten the array (second screenshot) but when I send this to a new table, nothing appears after running it (third screenshot attached).
The issue is that the "Type of list to convert column" field is empty in your second screenshot. This field is required when using "Send row for each item in a list." [1]
To fix this:
In the "Send table data" panel, locate the "Type of list to convert column" field
Select the column that contains your JSON array (the one showing 12 items on the right side)
Then map the specific fields from that array to your destination table columns
Without specifying which column contains the list, the feature doesn't know which array to flatten, which is why your new table remains empty.
If you continue experiencing issues, could you copy and paste the JSON from your webhook response into the chat? This will help troubleshoot the specific structure of your data. [2]
If you still need help with flattening your JSON array using the "write to table" feature, I’m here to assist. Would you like to share the JSON data you’re working with so I can help troubleshoot further?
I don't see a "Type of list to convert column" field but I mapped the webhook column containing the array there as in the screenshot. I ran it but nothing occurred. I copied the JSON from the webhook retrieved here: ---- [ { "status": "Active", "firmName": "AASAND & GLORE, LLC", "licenseNum": "CPAL184", "disciplinary": "None reported to this site by the board.", "jurisdiction": "AK" }, { "status": "Active", "firmName": "ABDO LLP", "licenseNum": "216643", "disciplinary": "None reported to this site by the board.", "jurisdiction": "AK" }, { "status": "Active", "firmName": "ACCOUNTING & FORENSIC SERVICES, P.C", "licenseNum": "CPAS246", "disciplinary": "None reported to this site by the board.", "jurisdiction": "AK" }, { "status": "Active", "firmName": "ACCOUNTING AND IT CONSULTING, LLC", "licenseNum": "219364", "disciplinary": "None reported to this site by the board.", "jurisdiction": "AK" }, { "status": "Active", "firmName": "ACT RESOURCES, PLLC", "licenseNum": "123886", "disciplinary": "None reported to this site by the board.", "jurisdiction": "AK" }, { "status": "Active", "firmName": "ALASKA ACCOUNTING SERVICES, INC", "licenseNum": "CPAS152", "disciplinary": "None reported to this site by the board.", "jurisdiction": "AK" }, { "status": "Active", "firmName": "ALBAN & COMPANY, P.C", "licenseNum": "CPAS200", "disciplinary": "None reported to this site by the board.", "jurisdiction": "AK" }, { "status": "Active", "firmName": "ALDRICH CPAS AND ADVISORS LLP", "licenseNum": "CPAR218", "disciplinary": "None reported to this site by the board.", "jurisdiction": "AK" }, { "status": "Active", "firmName": "ALLEN'S BOOKKEEPING, CONSULTING AND TAXES LLC", "licenseNum": "233900", "disciplinary": "None reported to this site by the board.", "jurisdiction": "AK" }, { "status": "Active", "firmName": "ALLIANCE CPAS LLC", "licenseNum": "CPAL179", "disciplinary": "None reported to this site by the board.", "jurisdiction": "AK" }, { "status": "Active", "firmName": "ALTMAN, ROGERS CO., A PROFESSIONAL CORPORATION", "licenseNum": "CPAS124", "disciplinary": "None reported to this site by the board.", "jurisdiction": "AK" }, { "status": "Active", "firmName": "ANDERS MINKLER HUBER & HELM LLP", "licenseNum": "196795", "disciplinary": "None reported to this site by the board.", "jurisdiction": "AK" }, { "status": "Active", "firmName": "ANDREA D. DARO CPA", "licenseNum": "220762", "disciplinary": "None reported to this site by the board.", "jurisdiction": "AK" } ] ---
The "Type" field in your screenshot needs to be filled with the column containing your JSON array. Click into that empty field and select the webhook column that holds the array data. [1]
Also, you need to check the boxes for the columns you want to send (status, firmName, licenseNum, etc.) and map them to your destination table columns. Currently, all checkboxes are unchecked. [2]
If the issue persists after filling the Type field and selecting columns, the value may not be formatted as a list. Try adding it through the "Other data from this table" section instead.
Was that helpful?
If you still need help with flattening your JSON array using the "write to table" feature, I’m here to assist. Would you like to share more details about what you’re trying to resolve so I can support you further?
I've followed your instructions (first screenshot attached) but despite this, when I run it, no data appears in the other table (second screenshot attached).
The issue may be that the webhook column value isn't formatted as a list that Clay recognizes. Try adding the array through the "Other data from this table" section instead of selecting it in the "Type" field.
If that doesn't work, try these troubleshooting steps:
Delete the "Send table data" column
Create a fresh column
Re-map your data to the write to table configuration
Alternatively, use the Force Run option in the table settings to reprocess the data.
If the issue persists, click into the specific cell where the operation is running to check for any error messages that might provide more details about what's failing. [1]
Is that what you were looking for?
Can someone assist me with this?
I understand this has been frustrating, so I’m connecting you to a human agent who can assist you further.
