Weekly AI photo refresh for flagged Shopify products

By General Input

Every Monday at 6am, drop a fresh lifestyle scene behind every tagged Shopify product and get a Slack recap of what was refreshed.

Integrations

  • Shopify
  • Black Forest Labs
  • Slack Bot

Type

Agentic Task

Categories

  • Marketing
  • Operations

Every Monday at 6am, refresh the lifestyle photography on my flagged Shopify products so the storefront keeps feeling seasonal without me touching Photoshop. Trigger: cron, Monday 6:00am in the store's local timezone.

Step 1. Call Shopify "List Products" filtered to the refresh-photos tag. Only products that opt in via that tag are in scope, so store owners stay in control of which SKUs get touched. Paginate if the store has more than the default page size.

Step 2. For each product returned, call Shopify "Get Product" to load the current title, description (body_html), vendor, product_type, tags, and the primary image URL. That context is what makes the new scene feel on-brand instead of generic.

Step 3. Using that context, design a short scene brief that suits the SKU. Examples: "modern home office desk with soft morning light" for a stationery item, "marble kitchen counter with fresh herbs and a linen towel" for a ceramic mug, "weathered wooden shelf in a sunlit reading nook" for a candle. The brief describes the backdrop, lighting, and mood only. It never describes the product itself, because the product is anchored by the reference image.

Step 4. Call Black Forest Labs "Generate or Edit Image — FLUX.2 [pro]" with the scene brief as the prompt and the current Shopify primary image passed in as a reference (input_image). FLUX.2 [pro] accepts up to 8 reference images and uses Kontext-style character consistency, which is exactly the "lifestyle scene" e-commerce pattern documented across FLUX Kontext write-ups: the existing product image is the anchor, the new backdrop is generated around it, and the product stays visually locked while the surroundings change. Poll the returned task (get_result or the polling_url from the submit response) until status is Ready. Handle Content Moderated / Request Moderated by skipping that SKU and continuing the batch.

Step 5. The result.sample URL from BFL is a signed delivery.*.bfl.ai link that expires 10 minutes after generation, so download the bytes immediately, before doing anything else with that product. Do not store the sample URL for later use.

Step 6. Call Shopify "Update Product" to swap the primary product image with the freshly generated one. Keep the alt text descriptive of the product itself (not the scene) so accessibility and SEO stay correct. Preserve every other product field (title, description, vendor, tags) exactly as fetched, only the primary image should change.

Step 7. After the whole batch finishes, post a single summary message via Slack Bot "Send a Message" to the marketing channel. One bullet per product refreshed: product title, vendor, the scene brief used, and a link to the new hero photo (product URL or the storefront listing). If any product failed (moderation block, download timeout, Shopify update error), include a "Skipped" section with the SKU and the reason so someone can retry manually.

Implementation notes. Use the slackbot integration (bot token, workspace-wide) for the summary, not the user OAuth slack integration, since this is an automated recap. Shopify's REST product create and update endpoints are marked deprecated as of API version 2024-04 but continue to work for custom apps — this workflow is safe for now, with a path to the GraphQL Admin API when convenient. Rate-limit the batch: Shopify Standard plans allow 2 requests per second, and FLUX.2 [pro] allows 24 concurrent tasks per account, so process products serially or with a small concurrency window.

Related prompts

Explore more prompts
A brand asset library your marketing team actually searchesTurn Mailjet email clicks into ranked HubSpot follow-upsClean out the Looker dashboards and Looks nobody opensLiveKit live operations console for room moderationWake up dormant Keap leads with a researched reasonLiveChat coverage board for planning next week's shiftsPhone routing control panel for LiveKit voice agentsLinkedIn Ads budget pacing dashboard for every client accountGive your team Looker numbers without buying more seatsPause marketing emails to escalated customers, then restore them