WP Webhooks / Integrations / Record newly published posts into Airtable

Record newly published posts into Airtable

Get these three things before start:

  1. PAT — airtable.com → account menu → Builder hubPersonal access tokens → create one with scope data.records:write and access to the base you want. Starts pat….
  2. Base ID — open the base, then HelpAPI documentation. The URL contains it: airtable.com/appXXXXXXXXXXXXXX/api/docs → base ID is appXXXXXXXXXXXXXX.
  3. 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.

model gemini-flash-latest via hosted AI credits
Author

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

Build with AI

Checking available triggers and saved credentials for Airtable...

Build with AI

Checking for WordPress core post triggers and trigger payload schema...

Build with AI

Checking trigger schema for post transition hooks...

Build with AI

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.

Author

Alright, I have published test post so you should have access to it.

Build with AI

Checking the newly captured payload schema for the publish_post trigger...

Build with AI

Now that we have captured the real post payload, here is the plan to finish setting up the integration:

  1. Code Glue pre-dispatch snippet: Formats the outgoing payload into Airtable's expected JSON structure under the fields object for the requested columns:

    • Title: args.1.post_title
    • URL: post permalink
    • Author: display name of args.1.post_author
    • Published: args.1.post_date
  2. Preview & Assign snippet: Applies the snippet pre-dispatch to webhook #29.
  3. Test Dispatch: Sends a synchronous test delivery with the captured payload to verify Airtable accepts the record.
  4. Enable Webhook: Turns on Webhook #29 so future published posts are posted automatically to Airtable.
Author

Got error:

Build with AI

Checking the delivery logs for webhook #29 to see the detailed error response...

Build with AI

Checking the existing snippets to get the exact ID to update...

Build with AI

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.

Author

there is still the same error

Build with AI

Checking the latest delivery logs for webhook #29...

Build with AI

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)

  1. update_snippet Update Code Glue snippet #5 to include typecast: true and standard YYYY-MM-DD date format
  2. preview_snippet Preview updated snippet against captured payload
  3. test_dispatch Test dispatch payload to Airtable API
  4. 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

Publish Post to Airtable
WordPress fires
publish_post
Code Glue
Format Post for Airtable before sending
Queued, then sent
POST https://api.airtable.com/v0/app3HGOeVWJCfQRsy/Newly%20Published%20Posts with your credential

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

Publish Post to Airtable
publish_post

/ 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.

A like sends 20 AI credits to whoever published this.

/ Published by

Flow Systems

/ Questions

Do I need the Pro plugin for this build? +
Yes. This build attaches Code Glue snippets, which are a Pro feature. Everything else in it — the webhook, its triggers, the field mapping and the conditions — works on the free plugin.
How do I use it on my own site? +
Download the JSON, then in WordPress open Webhook Actions → Webhooks → Import and drop the file in. Anything that needs authentication asks you to pick or create a credential during the import — secrets are never part of a shared build.
Does the build contain the author's API keys? +
No. Export carries credential metadata only — the name, the type and a masked hint — never the secret itself. The Credentials Vault is write-only over the API by design.
Publish

Publish your integration and get 50 AI credits,
+20 for each like.

$ wp plugin install flowsystems-webhook-actions --activate