Good morning team,
I’m trying to run this automation script that works on a base with 82,000 records but now throws this error since May 3, 2023. This is the first time that it happened on my base.
Just a bit of a background, my Airtable base is connected to Softr as well.
This is the code developed:
// Converts settings selections to variables
let sourceTable = base.getTable("Bulk Upload");
let selectedField = sourceTable.getField("Attachments");
let destinationTable = base.getTable("Bulk Upload Extract");
let nameField = destinationTable.getField("File name");
let attachmentField = destinationTable.getField("Attachments");
let recordinput = input.config();
let bulkrecords = await sourceTable.selectRecordsAsync();
let chosenrecord = bulkrecords.records.filter(test => test.id === recordinput.record_id);
let attachments = chosenrecordn0].getCellValue(selectedField); // Attachments in the above record
if (attachments) {
// Creates an array based on the attachments to then create the individual records
let attachmentRecords = attachments.map(a => ({
fields: {
nnameField.id]: a.filename,
nattachmentField.id]: n{ url: a.url }]
}
}));
// Batches the record creation
while (attachmentRecords.length > 0) {
await destinationTable.createRecordsAsync(attachmentRecords.slice(0, 50));
attachmentRecords = attachmentRecords.slice(50);
};
}
Can someone help me to fix this error.
Thank you in advance!