Auto-publish Airtable calendar rows to WordPress with a hero image

By General Input

When a row in your Airtable content calendar flips to Ready to publish, pick a clean Pexels hero image and ship the post to WordPress automatically.

Integrations

  • Airtable
  • Pexels
  • WordPress

Type

Agentic Task

Categories

  • Marketing

Build an agent workflow that auto-publishes my Airtable content calendar rows to WordPress and picks a clean hero image from Pexels for each one.

Trigger: poll Airtable for a new or updated record (event type new_or_updated_record) in my Content Calendar table. The workflow should only act when a row's Status field is set to "Ready to publish". Skip rows in any other status.

Each row carries: Title (the post title), Body (the post HTML or markdown), Tags (optional, comma-separated or a multi-select), Status, Image URL (the chosen hero image, may be empty), and Post URL (the published WordPress URL, filled in at the end).

When a qualifying row fires, the agent should do the following:

1. Skip the row entirely if its Post URL column is already populated, so reruns and backfills are safe and never republish.

2. If the Image URL column on the row is already populated, use that URL as the hero image and do not call Pexels. Otherwise, derive two to four concrete visual keywords from the Title (avoid stopwords and brand jargon) and call the Pexels Search Photos operation with orientation=landscape, size=large, and per_page=15. Pick the first result that is clearly relevant; capture its photographer name, photographer profile URL, the Pexels page URL for the photo, and the landscape src URL from the photo's src object.

3. Build the final post HTML: an <img> tag with the chosen Pexels landscape URL at the very top of the content (with descriptive alt text from the post title), followed by the row's Body, followed by a small attribution line at the bottom of the image area in the form: Photo by <photographer name> on Pexels, with the photographer name linking to their Pexels profile URL and the word Pexels linking to the photo's Pexels page URL. This satisfies the Pexels attribution guideline.

4. Call the WordPress Create a Post operation with status=publish, the row's Title as the post title, the assembled HTML as the post content, and any Tags from the row passed through. Capture the resulting post URL (the link field on the WordPress response).

5. Call the Airtable Update Record operation on the same record to write back: Image URL = the chosen landscape Pexels src URL, Post URL = the new WordPress post URL, Status = "Published". Use the original record id from the trigger payload.

Integrations: Airtable (poll trigger on new_or_updated_record, plus Update Record), Pexels (Search Photos), and WordPress (Create a Post). The whole workflow is idempotent: a row is only acted on when Status equals Ready to publish AND Post URL is empty, and the last step flips Status to Published so it won't refire on the same row.

If Pexels returns zero results for the derived keywords, fall back to a single broader keyword from the title and retry once. If it still returns nothing, log a clear error and stop without publishing or updating the row, so the user can fix the title or pre-fill an Image URL and rerun.

Related prompts

Explore more prompts
Creator roster board for rebook, test, or pause callsRun your nutrition clients' weekly meal plans from one consoleInstagram UGC rights tracker and repost approval boardShoppable link console for your WordPress recipe archiveA verification desk for every document your team scansBrowse and shortlist creators without burning audit creditsGlobal operations exposure map for your sites and suppliersDeal sourcing kanban board for your Harmonic saved searchesContent decay review board for your WordPress pagesProof client shoots and hand off the delivery album in one place