Weekly AI photo refresh for flagged Shopify products
Every Monday at 6am, drop a fresh lifestyle scene behind every tagged Shopify product and get a Slack recap of what was refreshed.
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.
Additional information
What does this prompt do?
- Picks up every Shopify product you have tagged for a refresh, so store owners opt in per SKU.
- Writes a new lifestyle scene brief that suits each product's title, vendor, and category.
- Generates a fresh hero image that keeps the product itself identical while the backdrop and mood change.
- Swaps in the new photo on Shopify and posts a Slack recap with a link to each refreshed product.
What do I need to use this?
- A Shopify store where you can tag products for the refresh.
- A Black Forest Labs account with FLUX credits added.
- A Slack workspace with a channel where the weekly recap can be posted.
How can I customize it?
- Change the tag name from refresh-photos to whatever fits your team's workflow.
- Adjust the schedule (every other Monday, first-of-month) or the recap channel.
- Tune the scene brief style, seasonal, minimal, editorial, so the new photos match your brand.
Frequently asked questions
Will the product itself look different after the refresh?
How do I choose which products get refreshed?
What happens to the old product photo?
How long does one weekly run take?
Can I preview the new photos before they go live?
Related templates
Stop scheduling a photo shoot for every product every season.
Tag the SKUs you want refreshed, let the workflow generate on-brand scenes around them, and keep your storefront feeling current all year.