Auto-register Airtable shipments in AfterShip with ETAs

When ops drops a new shipment row into Airtable, we detect the courier, register it in AfterShip, and stamp the predicted delivery date back on the row.

Agentic Task
AirtableAfterShipOperationsData Sync
PromptCreate

When ops drops a new row into our Airtable shipments queue, register the tracking in AfterShip and stamp the predicted delivery date back on the row.

Trigger: poll on new Airtable records in the shipments table. The row carries the tracking number, an optional courier slug field, destination postal code, customer contact (name + email), origin location, pickup date, and empty writeback columns for the AfterShip tracking id, detected courier slug, predicted delivery date, and a status/failure-reason column.

For each new row: if the courier slug field is blank, call AfterShip Detect Courier with the tracking number to identify the carrier. Then call AfterShip Create Tracking with the tracking number, courier slug (detected or provided), destination postal code, and customer contact. Then call AfterShip Predict Estimated Delivery Date using the origin, destination, and pickup date from the row. Finally, write the AfterShip tracking id, the detected/confirmed courier slug, and the predicted delivery date back to the Airtable row via Update Record.

Skip rows that already have an AfterShip tracking id filled in so we never register the same shipment twice.

Error handling is per-row and must never fail the whole run. If a row can't be resolved (Detect Courier returns nothing or is ambiguous, a required field is missing, or AfterShip rejects the tracking number), do not throw. Instead, use Airtable Update Record to stamp a plain-language reason on the status column ("couldn't detect courier", "missing destination postal code", "tracking number rejected by AfterShip") so ops can fix and re-run rather than silently failing. Continue to the next row.

Additional information

What does this prompt do?
  • Watches your Airtable shipments table and picks up every new row the moment ops adds it.
  • Figures out the courier from the tracking number, registers the shipment in AfterShip, and predicts its estimated delivery date.
  • Writes the AfterShip tracking id, the detected courier, and the predicted delivery date straight back onto the same Airtable row.
  • When a row can't be registered (undetectable courier, missing field, invalid tracking number), stamps a plain-language reason on a status column so ops can fix it and re-run.
What do I need to use this?
  • An Airtable base with a shipments table (tracking number, destination postal code, customer contact, origin, pickup date, plus columns to receive the tracking id, courier, ETA, and a status message).
  • An AfterShip account.
How can I customize it?
  • Point it at a different Airtable base, table, or view (for example, only rows where a "ready to register" checkbox is ticked).
  • Rename the writeback columns or add extras like the AfterShip tracking URL or shipment status.
  • Tune the failure messages ops sees on stuck rows so they match how your team talks about shipping issues.

Frequently asked questions

Do I need to know the courier ahead of time?
No. If the courier column is blank, we ask AfterShip to figure it out from the tracking number and write the detected courier back to the row. Only if AfterShip genuinely can't tell will we mark the row with a reason for ops.
What happens if a tracking number is bad or a field is missing?
We don't silently drop the row. A short reason lands in your status column ("couldn't detect courier", "missing destination postal code", "tracking number rejected by AfterShip") so ops can fix it and re-run without hunting through logs.
Will it try to register the same shipment twice?
No. Rows that already have an AfterShip tracking id are skipped, so ops can safely add new rows without worrying about duplicates.
How quickly does it pick up new rows?
It watches the shipments table continuously, so new rows are usually picked up within a couple of minutes of ops adding them.
Can I use a different table structure or field names?
Yes. You tell it which base, table, and columns to read from and write back to. If your team uses different field names, we adapt the workflow to match.

Stop hand-registering shipments in AfterShip.

Let ops drop rows into Airtable and get tracking ids and delivery dates written back without touching AfterShip.