Auto-generate AI hero images for Notion blog drafts

By General Input

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.

Integrations

  • Notion
  • Black Forest Labs
  • Google Drive
  • Slack

Type

Agentic Task

Categories

  • Marketing
  • Operations

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.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentWin back LiveChat visitors whose chats went unansweredChat quality review board for LiveChat support leadsWin back no-show and cancelled appointments every morningLive Loop returns analytics with product-level drill-downNewsletter pre-flight and approval board for Mailjet sendsTurn a prospect spreadsheet into personalized sequence enrollmentsMailjet email delivery lookup console for support teamsCatch feature flags that never got switched on in productionScreen chartered vessels for AIS gaps and sanctions red flags