tr Skip to content

When a blog post is published in WordPress, run a workflow in Leap AI to generate a featured image

When a post goes live in WordPress, FlowMattic starts one of your published Leap AI workflows with the post’s details, waits two minutes, then fetches that run’s status and results, such as a generated featured image.

WordPress Leap AI Delay

4 steps Setup ~8 min Used on 2.6k sites Free to import

The When a blog post is published in WordPress, run a workflow in Leap AI to generate a featured image workflow on the FlowMattic canvas, with 4 steps across WordPress, Leap AI, Delay
The workflow as it appears in the builder after import. Each step opens for editing.

What this workflow does

Finding or designing an image for every article slows publishing down. If you already have a Leap AI workflow that turns a title or summary into an image, this template hands each new post to it the moment you publish, so the artwork is being made while you share the article.

A run begins on WordPress at the moment a post moves to published for the first time; later edits to that live post, and any pages you publish, leave the workflow alone. The post's title, content, excerpt, permalink and other fields are passed on.

The first Leap AI step runs a published Leap workflow with input parameters. It ships unmapped, so after import you pick your workflow and map post fields, such as the title, into its inputs. A Delay then waits two minutes, and the Get Workflow Run step checks the status and results of that run. Map the run ID from the first Leap AI step into it.

As imported, nothing uses the result yet: the image stays in Leap AI's output and the post is unchanged. To make it the featured image, add WordPress steps after Get Workflow Run, as the tips explain. Check Task History to see what Leap AI returned, and lengthen the Delay if runs are still in progress after two minutes.

Header art for a daily news blog

A site that publishes several short news posts a day sends each headline to a Leap AI image workflow instead of searching stock libraries.

Consistent style across a recipe site

A food blogger's Leap AI workflow uses one prompt style, so every new recipe post gets artwork in the same look from its dish name.

Social images for new articles

A marketing team publishes a post and later picks up the generated image from the run results to use in social posts about the article.

How this workflow runs

What happens at each step once the workflow is on, and what you need before you import it.

  1. Step 1Trigger
    WordPress New Post

    Starts a run the first time a WordPress post reaches published status. The post object, including its ID, title, content and permalink, is passed to the Leap AI steps.

  2. Step 2Action
    Leap AI Run Workflow

    Executes one of your published Leap AI workflows with input parameters. The step ships unmapped: choose the workflow after import and map post fields, such as the title or excerpt, into its inputs.

  3. Step 3Logic
    Delay Delay For

    Waits two minutes before the next step, giving the Leap AI workflow time to finish. Raise the value if your workflow usually takes longer.

  4. Step 4Action
    Leap AI Get Workflow Run

    Checks the status and results of the Leap AI workflow run. Map the run ID returned by the Run Workflow step, then check a test run to see where the output, such as an image URL, appears.

What you need

  • FlowMatticCore
  • Leap AI AccountAccount

After importing, map your own data. To keep the template universal, not every step is pre-filled. Open each step in the builder and connect your accounts and fields (channels, lists, sheets, recipients) before you switch the workflow on.

Make it yours

Changes worth making after you import it.

  • To set the image on the post, add a WordPress New Media step after Get Workflow Run and map the image from the result into it, then a Set Post Thumbnail step that uses the post ID from the trigger and the new media item.
  • Put a Filter between the Get Workflow Run step and any WordPress steps you add that continues only when the run status shows it has finished, so an unfinished run doesn't attach an empty image.
  • Use the post excerpt rather than the full content as the Leap AI input if your workflow expects a short prompt.

Questions about this workflow

Does this set the featured image on my WordPress post?

Not as imported. The workflow runs your Leap AI workflow and fetches its results. Add WordPress New Media and Set Post Thumbnail steps after Get Workflow Run to attach the image to the post.

Do I need my own workflow in Leap AI?

Yes. The Run Workflow step executes a published Leap AI workflow that you choose, so build and publish one that produces an image from the inputs you plan to send.

What if Leap AI hasn't finished after two minutes?

Get Workflow Run reports the run's status at that moment, so it may not have results yet. Check Task History for the status it returned, and increase the Delay for slower workflows.

Will updating an old WordPress post start the Leap AI workflow?

No. Only a post's first move to published starts a run, so editing an article that is already live leaves the Leap AI workflow untouched.

Import this workflow into your WordPress site

Download the JSON, import it from the Workflows screen and connect your accounts. Every run stays on your server, with no per-task fees.

30-day money-back guarantee Unlimited workflows and runs Self-hosted

Customers who run it every day

Rated 4.8 out of 5 by customers
Read more reviews

Great product, saves a lot of money on automation subscription. Also great support and response from the team.

Team Genius

Flowmattic is one of most advanced integration platform , A perfect alternative of zapier with unlimited task and founder and his team always ready to stand even at 2am midnight so really dedicated