Help

Script exceeded execution time when trying to retrieve a record by ID

Topic Labels: Automations
Solved
Jump to Solution
6072 11
cancel
Showing results for 
Search instead for 
Did you mean: 
Jeremy_Martin
6 - Interface Innovator
6 - Interface Innovator

Hi there community members

I’m still new to airtable scripting and really need your help in solving the timeout problem on one of my scripts.

I’m getting a script exceeded execution time on the following code. What can I do or how can I change the script to prevent it from happening

console.log(“Start Ditribution script”);

let inputConfig = input.config();
let leadRecordId = inputConfig.recordID;
let tableLeads = base.getTable(“LGA Leads”);

let query = await tableLeads.selectRecordsAsync({ fields: tableLeads.fields });
let leadRecord = query.getRecord(leadRecordId);

console.log(leadRecord.getCellValue(“Lead Key”));

I see the 1st console.log, but not the 2nd, so I assume it must be happening when I’m opening the table. The table has a lot of records.

11 Replies 11

https://google.com/search?q=guard+clause+programming

You are a STAR !! Thanks @kuovonne