airtable_generate_automation_script
Generate production-ready JavaScript for Airtable automations, including webhook mapping, unique ID creation, deduplication, and payment reconciliation, ready to paste into the Script editor.
Instructions
Generates production-grade, syntactically verified JavaScript code tailored for Airtable's In-Base Scripting API ("Run a script" automation action).
When to Use
When configuring native Airtable Automations that require custom business logic, field transformations, or external API communication.
When mapping incoming webhook payloads (Tally forms, Fillout, Stripe payment events) into structured Airtable records.
When creating sequential prefixed IDs (e.g., 'VR-M-00105') without race conditions.
When performing deduplication checks or cross-table rollups inside Airtable.
When NOT to Use
Do NOT use this tool to execute operations directly on Airtable from your local machine. Use 'airtable_batch_upsert' or 'airtable_manage_records' instead.
Do NOT use this tool for creating Interface Designer pages. Use 'airtable_create_interface_page' instead.
Operational Disclosures
Execution Environment: The generated code is designed to run in Airtable's native sandboxed Scripting environment with access to global 'base', 'input.config()', 'output.set()', and 'remoteFetchAsync()'.
Safe & Idempotent: Generated templates include batching safeguards (Airtable's 50-record batch mutation limit) and error boundaries.
No Side Effects Locally: This tool produces verified code text that you paste into the Airtable Automation Script editor.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| options | No | Template configuration parameters | |
| template | Yes | Script archetype: 'tally_fillout_mapper' (maps intake payloads), 'stripe_paypal_reconciliation' (handles charge balances), 'unique_id_generator' (sequential prefixed IDs), 'deduplication_sync' (finds and flags duplicates), 'custom' (scaffolded custom logic) | |
| table_name | Yes | Target Airtable table name (e.g. Merchants, Orders, Payments) | |
| field_mappings | No | Mapping of incoming payload keys to Airtable column names, e.g. {"client_name": "Full Name", "email_address": "Contact Email"} |