Record newly published posts into Airtable
Get these three things before start:
- PAT — airtable.com → account menu → Builder hub → Personal access tokens → create
one with scope
data.records:writeand access to the base you want. Startspat…. - Base ID — open the base, then Help → API documentation. The URL contains it:
airtable.com/appXXXXXXXXXXXXXX/api/docs→ base ID isappXXXXXXXXXXXXXX. - Table name — exactly as shown on the tab, e.g.
Posts. Case and spaces matter.
Create the table columns before building: Title (single line), URL (URL),
Author (single line), Published (date).
Save the PAT in the vault name it as Airtable.
Gotcha: a field name that doesn't exist in the table gives 422 UNKNOWN_FIELD_NAME — Airtable will not create columns for you. If the date lands as text,
typecast was dropped from the payload.
/ The conversation
This build was not assembled by hand. Its author described what they wanted in Build with AI, and the agent read the site, planned the work and applied it. This is that conversation.
hey, lets build integration with airtable, so newly published posts are recorded there. Airtable base is app3HGOeVWJCfQRsy Table name is Newly Published Posts. Columns we have there are Title, URL, Author and Published
Checking available triggers and saved credentials for Airtable...
Checking for WordPress core post triggers and trigger payload schema...
Checking trigger schema for post transition hooks...
I will set up a new webhook pointing to your Airtable table (Newly Published Posts) and attach your existing Airtable credential (ID #10).
Because the publish_post trigger has not captured a sample payload on this site yet, field mapping cannot be applied just yet. Once this plan is executed, please publish or update a test post to capture the payload shape so we can complete the column mapping (Title, URL, Author, Published) and go live.
Alright, I have published test post so you should have access to it.
Checking the newly captured payload schema for the publish_post trigger...
Now that we have captured the real post payload, here is the plan to finish setting up the integration:
Code Glue pre-dispatch snippet: Formats the outgoing payload into Airtable's expected JSON structure under the
fieldsobject for the requested columns:Title:args.1.post_titleURL: post permalinkAuthor: display name ofargs.1.post_authorPublished:args.1.post_date
- Preview & Assign snippet: Applies the snippet pre-dispatch to webhook #29.
- Test Dispatch: Sends a synchronous test delivery with the captured payload to verify Airtable accepts the record.
- Enable Webhook: Turns on Webhook #29 so future published posts are posted automatically to Airtable.
Got error:
Checking the delivery logs for webhook #29 to see the detailed error response...
Checking the existing snippets to get the exact ID to update...
Airtable rejected the Published date format (2026-08-02 22:07:31). Airtable Date/DateTime columns require an ISO 8601 formatted timestamp (e.g., 2026-08-02T20:07:31Z using post_date_gmt).
I will update snippet #5 to format the date in ISO 8601 UTC format, preview it, test dispatch to Airtable, and enable Webhook #29.
there is still the same error
Checking the latest delivery logs for webhook #29...
Airtable column types can be strict about date formatting and strict type matching. Adding 'typecast' => true to the request allows Airtable to automatically coerce the formatted date (YYYY-MM-DD) into your Published date column.
I will update snippet #5 with typecast: true and YYYY-MM-DD date formatting, test dispatch to Airtable, and enable Webhook #29.
Published by the author on purpose. Tool output and raw payloads never travel with a shared build, and secrets never leave the site they were created on.
/ Abilities used (4)
- update_snippet Update Code Glue snippet #5 to include typecast: true and standard YYYY-MM-DD date format
- preview_snippet Preview updated snippet against captured payload
- test_dispatch Test dispatch payload to Airtable API
- enable_webhook Enable Webhook #29 (Go Live)
Each of these is a real ability the agent can call — see the docs for what each one does.
/ What runs
Every attempt is retried on its own schedule and written to the delivery log.
WordPress fires the action publish_post, the payload is sent as POST to api.airtable.com.
The delivery is queued and sent in the background, so the visitor never waits. Along the way a Code Glue snippet shapes the payload first and authentication comes from a credential you supply on import.
/ How it is configured
/ Code Glue
before sending — Format Post for Airtable
$gmtDate = $args[1]['post_date_gmt'] ?? ''; $publishedDate = !empty($gmtDate) ? gmdate('Y-m-d', strtotime($gmtDate)) : ''; $authorId = (int) ($args[1]['post_author'] ?? 0); $author = $authorId ? get_the_author_meta('display_name', $authorId) : ''; $postId = (int) ($args[1]['ID'] ?? 0); return [ 'fields' => [ 'Title' => $args[1]['post_title'] ?? '', 'URL' => $postId ? get_permalink($postId) : ($args[1]['guid'] ?? ''), 'Author' => $author, 'Published' => $publishedDate ], 'typecast' => true ];
Read any snippet before you import it — Code Glue runs PHP on your site.
/ Authentication
This build authenticates with a credential you supply on import. The shared file carries the name and type only — never the secret.
- Airtable — bearer
/ Use this build
Download the file, then in WordPress open Webhook Actions → Webhooks → Import and drop it in. Anything needing authentication asks you to pick or create a credential as it imports — see Import & Export for what travels with a build and what does not.
/ Questions