BuildShipBBuildShip
Powered by
ColinC
BuildShip•2y ago•
2 replies
Colin

Airtable "Create Records" API Error

I'm trying to use the Airtable "Create Records" API to add multiple records at once. I'm passing the following response from the OpenAI Assistant:

{
  "response": "{\"fields\":[{\"Date\":\"2024-08-06\",\"Item\":\"Duck Eggs\",\"Quantity\":30,\"Unit\":\"unit\",\"Notes\":\"harvested\"},{\"Date\":\"2024-08-06\",\"Item\":\"Chicken Eggs\",\"Quantity\":10,\"Unit\":\"unit\",\"Notes\":\"harvested\"}]}"
}
{
  "response": "{\"fields\":[{\"Date\":\"2024-08-06\",\"Item\":\"Duck Eggs\",\"Quantity\":30,\"Unit\":\"unit\",\"Notes\":\"harvested\"},{\"Date\":\"2024-08-06\",\"Item\":\"Chicken Eggs\",\"Quantity\":10,\"Unit\":\"unit\",\"Notes\":\"harvested\"}]}"
}


I need to format this correctly to be used by the Airtable API. I've added an empty node in between to format it correctly, and this is the output:
[{"fields":{"Date":"2024-08-06","Item":"Duck Eggs","Quantity":30,"Unit":"unit","Notes":"harvested"}},{"fields":{"Date":"2024-08-06","Item":"Chicken Eggs","Quantity":10,"Unit":"unit","Notes":"harvested"}}]

It is happening occasionally, but this is NOT happening consistently. Any suggestions to get the appropriate input every time?
BuildShip banner
BuildShipJoin
Join founders, builders, devs using Low-code / No-code to create backend, APIs, scheduled Jobs, automation, AI workflows
7,971Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Get more than 100 records from Airtable
HuyKhieuHHuyKhieu / ❓・buildship-help
2y ago
API header error
AdaAAda / ❓・buildship-help
2y ago
Comparing records
Abhishek Sahni (Abhi)AAbhishek Sahni (Abhi) / ❓・buildship-help
8mo ago
Managing Dynamic Data Updates in Airtable Tables
JrocksJJrocks / ❓・buildship-help
2y ago