Auto-generate AI hero images for Notion blog drafts

Every hour, the agent scans your Notion Blog Drafts database, generates a hero image tailored to each draft's content, and shares the preview in Slack.

Agentic Task
NotionBlack Forest LabsGoogle DriveSlackMarketingOperationsContent GenerationNotifications & Alerts
PromptCreate

Every hour, sweep my Notion Blog Drafts database for pages that still need a hero image and generate one from the draft copy.

Trigger: cron, once per hour.

Step 1. Call Notion Query a Data Source against the Blog Drafts data source, filtering to pages whose status property is set to 'needs-image'. If no pages match, stop cleanly and do nothing this hour.

Step 2. For each matching page, call Notion Retrieve Page as Markdown to pull the full draft body so the agent is working from the actual copy rather than just the title.

Step 3. Read the draft and invent a hero image concept tailored to it. Decide the subject, visual style, mood, and aspect ratio (landscape works best for a blog header). Turn that concept into a detailed image prompt. This is why the workflow is an agent rather than a code node — the FLUX prompt must be reasoned from the article, not templated.

Step 4. Call Black Forest Labs Generate Image — FLUX 1.1 [pro] Ultra with the image prompt, targeting a 4MP result suitable for a blog header. Wait for the task to finish and grab the returned sample image URL.

Step 5. The Black Forest Labs sample URL expires in about ten minutes, so immediately download the bytes and call Google Drive Upload File (Multipart) to store the image and get a durable link. Name the file after the Notion page title so it is easy to find later.

Step 6. Call Notion Append Block Children on the draft page, prepending an image block that points at the Google Drive URL so the hero shows up at the very top of the page.

Step 7. Call Notion Update a Page to flip the status property from 'needs-image' to 'image ready'. This prevents the next hourly sweep from regenerating an image for the same draft.

Step 8. Call Slack Send a Message to the content channel with the page title and a preview of the hero image so the editor can react with a thumbs up or ask for a rework.

Process every matching page in the same run. If any single page fails, log the failure and continue with the rest — do not block the batch on one broken draft.

Additional information

What does this prompt do?
  • Scans your Notion Blog Drafts database every hour for posts flagged as needing a hero image
  • Reads the actual draft and invents a hero image concept matched to the subject, tone, and aspect ratio
  • Generates a high-resolution hero image with Black Forest Labs FLUX and saves it to Google Drive so the link never expires
  • Drops the image at the top of the Notion page, flips the status to 'image ready', and posts a preview into your Slack content channel
What do I need to use this?
  • A Notion workspace with a Blog Drafts database that has a status property including 'needs-image' and 'image ready' values
  • A Black Forest Labs account for image generation
  • A Google Drive account where the finished images can live
  • A Slack workspace and a channel where the editorial team wants to see previews
How can I customize it?
  • Change how often the sweep runs (hourly, every 15 minutes, twice a day, or overnight only)
  • Point it at a different database view or status label if your editorial pipeline uses different naming
  • Tune the image style guidance so results match your brand — photography vs illustration, palette, aspect ratio
  • Swap the Slack destination to a specific editor's DM or a private editorial channel

Frequently asked questions

Does the agent write my blog post for me?
No. This workflow assumes the draft is already written. It reads what is there and creates a hero image that matches the copy, then places the image at the top of the page.
What if I do not love the image the agent picked?
Set the status back to 'needs-image' and the next sweep will generate a fresh one. You can also add style guidance to the prompt so the agent knows your brand direction before it tries again.
Why does the image go through Google Drive?
The direct link from the image generator expires after about ten minutes, which would break your Notion page. Google Drive gives you a permanent URL the Notion image block can point at forever.
Will it try to generate images for posts I have already finished?
No. It only picks up pages whose status is set to 'needs-image', so anything past that stage is left alone.
Can I adapt this if my drafts live somewhere other than Notion?
Yes. Swap the reading step for Airtable, Contentful, Google Docs, or wherever your drafts live and the rest of the recipe works the same way.

Stop hunting for stock photos for every blog post.

Let the agent handle hero images while you focus on writing.