{
  "id": "5Rt88vY3Rdkpd7EE",
  "name": "Generate multi-angle on-model photos for single-image Shopify products with Dreem.ai",
  "tags": [],
  "nodes": [
    {
      "id": "3196f411-2ba5-4b46-99a0-6f7088773ac0",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "width": 480,
        "height": 816,
        "content": "## Generate multi-angle on-model photos for single-image Shopify products with Dreem.ai\n\n### How it works\n\nThis workflow runs on a weekly schedule to audit Shopify products and find items that only have a single product image. It processes those products one at a time, sends the source image to Dreem.ai to generate multi-angle on-model shots, waits for rendering, then checks whether generation completed successfully. Successful renders are published back to Shopify, while skipped or incomplete items are reported in Slack, and a final Slack message is sent when the audit finishes.\n\n### Setup steps\n\n- Configure the Shopify credentials and permissions needed to read products and update product images.\n- Configure Dreem.ai credentials or API access for generating on-model product imagery.\n- Configure Slack credentials and select the channels or recipients for skipped-item and audit-complete notifications.\n- Set the weekly schedule timing and confirm the product filter correctly identifies products with exactly one image.\n\n### Customization\n\nAdjust the single-image filter criteria, Dreem.ai generation prompt/settings, wait duration, Shopify publishing behavior, and Slack message content to match your catalog and review process."
      },
      "typeVersion": 1
    },
    {
      "id": "00be6b84-fed6-490a-a4ce-497479007772",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        560,
        144
      ],
      "parameters": {
        "color": 7,
        "width": 640,
        "height": 304,
        "content": "## Audit product catalog\n\nStarts the weekly audit, retrieves products from Shopify, and filters the catalog down to products that currently have only one image."
      },
      "typeVersion": 1
    },
    {
      "id": "626e78d3-88bb-4dff-a277-6ecc251ac8a9",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1232,
        -16
      ],
      "parameters": {
        "color": 7,
        "width": 432,
        "height": 480,
        "content": "## Batch audit control\n\nLoops through the filtered Shopify products one at a time and sends a Slack notification when there are no more products left to process."
      },
      "typeVersion": 1
    },
    {
      "id": "ab82349c-032c-49d4-8758-f1022248dd0b",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1696,
        240
      ],
      "parameters": {
        "color": 7,
        "width": 400,
        "height": 368,
        "content": "## Generate rendered shots\n\nSubmits each eligible product image to Dreem.ai for on-model multi-angle image generation, then waits for the render job before continuing."
      },
      "typeVersion": 1
    },
    {
      "id": "6616127c-8dcc-4ee4-b85d-1bd3cbb9e62d",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2128,
        112
      ],
      "parameters": {
        "color": 7,
        "width": 416,
        "height": 592,
        "content": "## Publish or skip results\n\nChecks whether the Dreem.ai render completed successfully, publishes completed images back to Shopify, or sends a Slack skipped notification for unsuccessful items before returning to the product loop."
      },
      "typeVersion": 1
    },
    {
      "id": "4a716ed0-572c-4699-b84b-290ab9a7be52",
      "name": "Weekly Monday Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        608,
        320
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 9 * * 1"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "0bf1743c-8242-4c5a-9118-8971eac9c477",
      "name": "Fetch Shopify Products",
      "type": "n8n-nodes-base.shopify",
      "position": [
        832,
        320
      ],
      "parameters": {
        "resource": "product",
        "operation": "getAll",
        "returnAll": true,
        "authentication": "accessToken",
        "additionalFields": {}
      },
      "credentials": {
        "shopifyAccessTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "dc390d78-50b7-4b5b-a5be-777dd0aa2c6a",
      "name": "Filter Single Image Products",
      "type": "n8n-nodes-base.filter",
      "position": [
        1056,
        320
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "a2d38840-b05a-4441-a00b-b5035b8b7419",
              "operator": {
                "type": "number",
                "operation": "equals"
              },
              "leftValue": "={{ ($json.images || []).length }}",
              "rightValue": 1
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "5fe26ccd-a6e4-40b1-bb23-3b36fe62badb",
      "name": "Post Audit Complete to Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        1520,
        160
      ],
      "parameters": {
        "text": "Single-image audit done - every product with only 1 image was processed. Any skipped items were flagged in this channel during the run.",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "id",
          "value": "C0BEBLUUHNZ"
        },
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "credentials": {
        "slackOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.5
    },
    {
      "id": "ec084666-10ae-4ac7-afa5-86306200bed8",
      "name": "Loop Over Product Batches",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1280,
        320
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "a270eb35-53b9-473e-bd99-3d4d8f262dda",
      "name": "Create On-Model Photos",
      "type": "n8n-nodes-dreem.dreem",
      "position": [
        1744,
        448
      ],
      "parameters": {
        "talentId": "b2c80190-4a00-4718-9d3f-c531472d5984",
        "shotCodes": [
          "model_front_women",
          "model_hand_on_hip_front"
        ],
        "callbackUrl": "={{ $execution.resumeUrl }}",
        "outputFormat": "jpeg",
        "frontImageUrl": "={{ $json.images[0].src }}",
        "authentication": "apiKey",
        "outputAspectRatio": 5
      },
      "credentials": {
        "dreemApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "770610a9-bc09-4889-b314-6a75469d2414",
      "name": "Publish Images on Shopify",
      "type": "n8n-nodes-base.shopify",
      "position": [
        2400,
        368
      ],
      "parameters": {
        "resource": "product",
        "operation": "update",
        "productId": "={{ $('Loop Over Product Batches').item.json.id }}",
        "updateFields": {
          "images": "={{ ($('Loop Over Product Batches').item.json.images || []).map(i => ({ id: i.id })).concat(($('Wait for Render Completion').item.json.body.outputs || []).map(o => ({ src: o.files[0].url }))) }}"
        },
        "authentication": "accessToken"
      },
      "credentials": {
        "shopifyAccessTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "60f5dd7c-d2bf-424b-90d2-2e0be7c1c220",
      "name": "Post Skipped Items to Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        2400,
        544
      ],
      "parameters": {
        "text": "=Skipped *{{ $('Loop Over Product Batches').item.json.title }}* - the render didn't finish (timed out or failed). The product still has only 1 image, so it will be retried next Monday.",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "id",
          "value": "C0BEBLUUHNZ"
        },
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "credentials": {
        "slackOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.5
    },
    {
      "id": "62961140-e867-4515-8fc2-6bca28445b64",
      "name": "Check Render Completion",
      "type": "n8n-nodes-base.if",
      "position": [
        2176,
        448
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.body?.status ?? $json.status }}",
              "rightValue": "completed"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "150c3f43-f252-4bfb-82c5-6b921854c52e",
      "name": "Wait for Render Completion",
      "type": "n8n-nodes-base.wait",
      "position": [
        1952,
        448
      ],
      "parameters": {
        "resume": "webhook",
        "options": {},
        "httpMethod": "POST",
        "resumeUnit": "minutes",
        "resumeAmount": 20,
        "limitWaitTime": true
      },
      "typeVersion": 1.1
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "executionOrder": "v1"
  },
  "versionId": "f69e63fe-c303-44dc-be9f-5664ea915480",
  "nodeGroups": [],
  "connections": {
    "Weekly Monday Trigger": {
      "main": [
        [
          {
            "node": "Fetch Shopify Products",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create On-Model Photos": {
      "main": [
        [
          {
            "node": "Wait for Render Completion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Shopify Products": {
      "main": [
        [
          {
            "node": "Filter Single Image Products",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Render Completion": {
      "main": [
        [
          {
            "node": "Publish Images on Shopify",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Post Skipped Items to Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Product Batches": {
      "main": [
        [
          {
            "node": "Post Audit Complete to Slack",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create On-Model Photos",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Publish Images on Shopify": {
      "main": [
        [
          {
            "node": "Loop Over Product Batches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for Render Completion": {
      "main": [
        [
          {
            "node": "Check Render Completion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post Skipped Items to Slack": {
      "main": [
        [
          {
            "node": "Loop Over Product Batches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Single Image Products": {
      "main": [
        [
          {
            "node": "Loop Over Product Batches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}