tr Skip to content

When a blog post is published in WordPress, generate text to image in Nano Banana for featured image creation

When a WordPress post is published, this workflow sends a text prompt built from the post to Nano Banana, which generates an image with Gemini AI that you can use as the post’s featured image.

WordPress Nano Banana

2 steps Setup ~5 min Used on 1.7k sites Free to import

The When a blog post is published in WordPress, generate text to image in Nano Banana for featured image creation workflow on the FlowMattic canvas, with 2 steps across WordPress, Nano Banana
The workflow as it appears in the builder after import. Each step opens for editing.

What this workflow does

Finding a fitting featured image for every article takes time, and stock photos start to look the same. This workflow asks an AI image model for a fresh picture each time you publish, using details from the post itself as the prompt.

The WordPress New Post trigger fires when a post is published on your site. FlowMattic passes the post data, such as its title, to the Nano Banana step. Text to Image sends the prompt you write to Gemini AI and returns the generated image. You build the prompt in that step, mixing fixed style instructions with post fields.

Know where the template stops. It generates the image but does not attach it to the post. The post is already live when the trigger fires, and its featured image stays as it was until you add steps that save the image to your media library and set it as the thumbnail. The tips below name the WordPress actions for that.

A consistent illustration style for a blog

Your prompt fixes the style, such as flat illustration in brand colours, and adds the post title, so each new article gets an image in the same look.

News or recipe sites publishing daily

Editors publish several posts a day. Each one gets an AI image generated from its title, ready to use without a stock photo search.

Drafting visuals for social posts

Even if you keep your own featured images, the generated picture gives you a quick visual to share alongside the article link.

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 as each new WordPress post goes live. The post's data, including its title, becomes available for the image prompt.

  2. Step 2Action
    Nano Banana Text to Image

    Sends your prompt to Gemini AI through Nano Banana and generates an image. Write the prompt with post fields and fixed style words, and connect your Nano Banana account.

What you need

  • FlowMatticCore
  • Nano Banana 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 as the featured image, add a WordPress step that saves it to the media library (Upload Base64 Image or New Media, depending on what Nano Banana returns), then Set Post Thumbnail with the post ID.
  • Keep a fixed part of the prompt for style, size and mood, and add only the post title. Short prompts built this way give more consistent results across posts.
  • Run one test post after import and look at the Nano Banana step in Task History to see the exact output format before you add the media steps.

Questions about this workflow

Does the Nano Banana image become the WordPress featured image on its own?

No. As imported, the image is generated and the run ends. Add WordPress steps to upload it and set it as the post thumbnail if you want it attached.

Will the workflow replace an existing featured image?

Not as imported, because it never touches the post. If you add Set Post Thumbnail, that step sets the generated image on whichever post ID you map.

Which WordPress posts start the Nano Banana workflow?

New posts when they are published. Editing an older post does not start it.

Can I use the post content as the prompt?

You can map any post field into the prompt. Long content can make a muddled prompt, so the title or excerpt usually works better.

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

Ease of use and terrific support from the founder. Tons of integrations and regular updates. The Flowmattic custom app is great especially if you want to integrate apps that aren't available yet inside Flowmattic.

Cliede C.

Flowmattic is a noteworthy option for businesses looking for a self-hosted alternative to Zapier. With its user-friendly interface and a strong set of features, it is a top pick for those in need of a reliable WordPress automation solution.