TutorialsTutorial

Keep a gold price field updated in Airtable

Use a scheduled automation to update your record.

1 Nov 2026 · 1 min read

Update a gold price field in Airtable with a scheduled automation. The automation script fetches the price from goldprice.dev and writes Price and Updated to your record.

1. Prepare your table

Create a table named Prices with a Number field named Price and a Date field named Updated.

2. Set the schedule

Create an automation with the trigger At a scheduled time. Choose when it should run.

3. Add the script action

Add the action Run a script and paste the automation script shown below. It writes the gold price to Price and the update date to Updated.

Automation script
// Writes the live gold price (US dollars per troy ounce) and the time to one record in Prices.const { apiKey, recordId } = input.config()const res = await fetch('https://api.goldprice.dev/v1/prices?symbol=XAU-USD-SPOT', { headers: { 'X-API-Key': apiKey } })if (!res.ok) throw new Error(`goldprice.dev answered ${res.status}`)const { symbols } = await res.json()const price = Number(symbols[0].price)await base.getTable('Prices').updateRecordAsync(recordId, { Price: price, Updated: new Date().toISOString() })output.set('price', price)

4. Set the input variables

Get a free goldprice.dev API key. In the script settings, set apiKey to your key and recordId to the ID of the record you want to update.

Input values are visible to anyone who can edit the automation.

Questions

Which fields does the script update?

It updates the Number field Price and the Date field Updated in the Prices table.

Who can see the API key?

Anyone who can edit the automation can see its input values, including apiKey.

Can I use a free API key?

Yes. A free goldprice.dev key gives you 5,000 requests a month.

Keep reading

Start with a free API key

Get a free API key for your Airtable automation, with no card needed.

Get a free key