Airtable Script Error: Multiple Payment Records Generation from Form Input

I’m working on an Airtable automation script that should generate several payment records based on form data. The form collects payment count, start date, payment interval (monthly for now), and amount per payment.

When I run my script, I keep getting the error “Property ‘numberAsync’ does not exist on type ‘{ config(): {}; }’” for every form input I try to access. Here’s my current code:

// Retrieve payment count from form submission
let totalPayments = input.numberAsync('Payment Count');

// Get starting date from form
let startDate = input.dateAsync('Start Date');

// Get payment value from form
let paymentValue = input.numberAsync('Amount');

// Loop to generate records based on payment count
let counter = 1;
while (counter <= totalPayments) {
  // Generate new record with counter, startDate, and paymentValue
  generateRecord(counter, startDate, paymentValue);
  // Increase counter
  counter++;
}

What’s causing this async method error and how can I fix it?

You’re getting that error because those methods don’t exist in Airtable’s scripting API. I ran into the same thing when I started with Airtable automation scripts. Use input.config() to grab form field values instead:

let config = input.config();
let totalPayments = config.Payment_Count;
let startDate = config.Start_Date;
let paymentValue = config.Amount;

let counter = 1;
while (counter <= totalPayments) {
    generateRecord(counter, startDate, paymentValue);
    counter++;
}

Watch out for field name formatting - Airtable converts spaces to underscores and strips special characters in the config object. I’d log console.log(config) first to see what property names you actually have.

Also double-check that your automation trigger passes the form data correctly. The field mapping between form and script gets messed up pretty easily during setup.

You’re mixing up async and sync methods. Airtable scripts don’t have numberAsync() or dateAsync() - those methods don’t exist.

Use the regular sync methods instead:

// Use sync methods without Async suffix
let totalPayments = input.config().Payment_Count;
let startDate = input.config().Start_Date;
let paymentValue = input.config().Amount;

// Your loop logic stays the same
let counter = 1;
while (counter <= totalPayments) {
  generateRecord(counter, startDate, paymentValue);
  counter++;
}

I hit this exact same issue 2 years ago building a similar payment scheduler. The Airtable input object works synchronously - you access form data through input.config() and reference your field names.

Make sure your field names in the form match exactly what you’re referencing in code. Spaces usually get converted to underscores in the config object.

You’ll also need to implement that generateRecord() function if you haven’t already. That’s probably where you’ll create the actual table records using table.createRecordAsync().