How it works
To move data from Stackby to Edit Image automatically, use a ready-made scenario — no manual exports.
- Starts when: WhatsApp message trigger
- Check: Check if message is button or image
- If yes: Route interactive vs image message
- If yes: Parse button and user data
- Check: Route VTO vs order button tap
- If yes: Set VTO context in Redis
- Then: Prompt user to upload selfie
- If no: Order orchestration AI agent
- Then: Send order confirmation
- If no: Get VTO context from Redis
- Check: Is VTO product ID stored in Redis?
- If yes: Extract image ID, waId, and product ID
- Then: Get product image from MongoDB
- Then: Download product image from Drive (VTO)
- Then: Resize product image to 1024px
- Then: Extract product image as base64
- Check: Merge product, selfie, and validation result
- Check: Validate merged selfie before try-on
- If yes: Build Gemini image generation API payload
- Then: Generate VTO with Gemini API
- Then: Convert Gemini response to image file
- Then: Upload VTO result to WhatsApp
- Then: Send VTO result to user
- Then: Delete VTO context from Redis
- If yes: Notify user VTO is processing
- If no: Ask user to resend valid photo
- Then: Get WhatsApp media URL
- Then: Download user selfie
- Then: Analyze user selfie with Gemini
- Check: Gemini: confirm exactly one person
- Then: Resize user selfie to 1024px
- Then: Extract user selfie as base64
- If no: Ask user to send correct photo
- If no: Validate incoming message
- Check: Pass valid messages, block invalid
- If yes: Get user session from Redis
- Then: Load session and append user message
- Then: AI shopping agent (BytezBot)
- Then: Detect JSON intent or plain text reply
- Then: Append AI reply to session history
- Then: Save session to Redis
- Check: Route JSON intent vs plain text reply
- If yes: Route product search vs recommend
- If yes: Build Redis cache key from search query
- Then: Check Redis cache
- Check: Is product cached in Redis?
- If yes: Parse cached product JSON array
- Check: Loop through products
- Then: Build product card message body
- Then: Convert product image base64 to binary
- Then: Upload product image to WhatsApp
- Then: Send product message with buttons
- If no: MongoDB Atlas vector search
- Then: Download product image from Drive
- Then: Convert product image to base64
- Then: Aggregate all product base64 images
- Check: Combine vector search results with images
- Then: Combine products with base64 images
- Then: Store products in cache
- Then: Unpack products from cache result
- If no: Send text response to user
- If no: Send validation error to user
- Then: GPT-5-nano (intent classifier)
- Then: GPT-4o (order agent)
- Then: Create order in MongoDB
- Then: Get product info from MongoDB
- Then: Log order to Google Sheets
- Then: OpenAI embeddings
- Then: Session memory for shopping agent
- Then: Session memory for order agent
You can launch this Stackby + Edit Image integration in Scriptera: describe the task in plain words — the scenario is built, launched and monitored for you.