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

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.

Agentic Task
AirtablePexelsWordPressMarketingContent GenerationData Sync

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.

Additional information

What does this prompt do?
  • Watches your Airtable content calendar and fires the moment a row's status flips to Ready to publish.
  • Picks a clean landscape hero photo from Pexels using keywords pulled from the post title, with photographer credit baked in.
  • Publishes the post live in WordPress with the hero image at the top of the article and your title and body intact.
  • Writes the published post URL and image URL back to the same Airtable row and flips its status to Published.
What do I need to use this?
  • An Airtable base with a content calendar table that has Title, Body, Status, Image URL, and Post URL columns
  • A free Pexels account to generate an API key
  • A self-hosted WordPress site you can log into as an admin
How can I customize it?
  • Change the status values it watches for (for example, Scheduled instead of Ready to publish).
  • Adjust the photo style: switch from landscape to portrait, or seed the image search from a dedicated keyword column instead of the title.
  • Save posts as drafts instead of publishing live if you want a human review step before they go on the site.

Frequently asked questions

Will it publish posts to my live site automatically?
Yes, that is the default. The whole point is to remove the last manual step on publish day. If you want a human review step, you can have it save the post as a WordPress draft instead and still write the image URL back to the Airtable row.
What happens if a row already has an image URL filled in?
It skips that row. The workflow only picks an image for rows where the Image URL column is blank, so reruns and backfills are safe and you can pre-fill an image on rows where you want manual control.
Do I have to credit the Pexels photographer?
Yes, and the workflow handles it for you. Every published post includes the photographer's name and a link back to Pexels at the bottom of the image, per Pexels' attribution guidelines.
Can I use my own image instead of one from Pexels?
Yes. If you paste a URL into the Image URL column before flipping the status to Ready to publish, the workflow leaves your image in place and uses it as the hero. It only goes to Pexels when the column is empty.
What kind of WordPress site does this work with?
Any self-hosted WordPress site running over HTTPS that supports Application Passwords. You just need your site URL and an admin login. WordPress.com hosted sites on the free plan are not supported.

Stop hunting for hero images on publish day.

Connect Airtable, Pexels, and WordPress once, and Geni handles the last mile every time a post is ready to go live.