Turn flat-lay packshots into on-model photos in WooCommerce

By General Input

Every weekday morning, find apparel listings that only have flat-lay photos, generate on-model versions, and post the batch to Slack for approval before anything goes live.

Integrations

  • Black Forest Labs
  • WooCommerce
  • Google Drive
  • Slack Bot

Type

Agentic Task

Categories

  • Marketing
  • Operations

Every weekday at 7am, find new apparel products in my WooCommerce catalog that still only have flat-lay packshot photos, and turn them into on-model shots without booking a photoshoot. Run this on a cron schedule. Each run has two phases: first attach anything my team already approved, then generate a fresh batch for review.

Phase one, the approval sweep. Use Google Drive List Files on my Approved subfolder to find on-model images a merchandiser moved there since the last run. For each approved file, attach it to the matching product using WooCommerce Update Product, adding it to the product's image list rather than replacing the existing packshot. Record which files you attached (for example by moving them to an Attached subfolder or noting the product id in the file name) so the next run does not attach the same image twice. This is the only place in the workflow that is allowed to modify a live product listing.

Phase two, generate the new batch. Use WooCommerce List Products filtered to published products in the apparel category or tag I specify. For each product, look at the images already attached and decide whether it has an on-model shot yet. Treat naming and alt text conventions as the signal, for example an image named or tagged on-model, lifestyle, or worn. Skip any product that already has one so we do not burn credits regenerating. Cap the run at a fixed number of products, defaulting to 10, and stop once you hit the cap.

Pull my approved model reference photos with Google Drive List Files against the reference folder I specify, then fetch the ones you need with Download File Content. Do not use a random model. Pick the reference that best matches the garment type: a womenswear model for a dress, a menswear model for a men's shirt, a lower-body or footwear reference for trousers and shoes. Use the product title, category, and tags to make that judgement, and if no reference is a sensible match for a garment, skip the product and say so in the Slack post rather than forcing a bad pairing.

For each selected product, call the Black Forest Labs Virtual Try-On (FLUX Tools) operation with the model reference as the person image and the product packshot as the garment image. The model reference comes from Drive so pass it as base64; the packshot is already a public storefront URL, which the FLUX Tools endpoints accept directly. Every Black Forest Labs generation is asynchronous: the submit call returns an id and a polling_url, and you poll that polling_url until status is Ready, at which point the image URL is at result.sample.

Important: result.sample is a signed delivery URL that expires 10 minutes after generation. Download it and re-host it immediately with Google Drive Upload File (Resumable) into my generated-results folder. Do not batch the downloads until the end of the run and do not put a Drive link to an expired URL in Slack. Name each file so the product it belongs to is obvious, for example the product id and slug. Use Google Drive Create Permission if my merchandising team needs view access to see the images from the Slack link.

When the batch is done, post it to my merchandising channel with the Slack Bot Send a Message operation. Include one line per product with the product name, a link to the Drive file, and which model reference was used, plus a short list of anything that was skipped and why. Tell reviewers to move the shots they approve into the Approved folder in Drive, which is what phase one of the next run picks up. Do not call WooCommerce Update Product for anything generated in this phase. Nothing generated in a run goes onto a live listing in that same run.

Handle the Black Forest Labs failure modes gracefully instead of failing the whole run. A 429 means too many active tasks against the 24 concurrent cap, so limit how many generations you have in flight and back off with exponential retry rather than aborting. A 402 means the account is out of credits, so stop generating and say so clearly in the Slack post. If a task comes back as Request Moderated or Content Moderated, treat that product as a skip with a note in Slack, not a hard failure. Any single product that fails should never take down the rest of the batch.

The business rule behind all of this: never auto-publish AI generated model imagery to a live storefront. Several jurisdictions and platform policies now expect disclosure of synthetic models in apparel marketing, so the Slack review gate before WooCommerce Update Product is a feature and not friction. Keep a human between generation and publication at all times.

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