{
  "name": "Create images from spreadsheet data with Layerre",
  "nodes": [
    {
      "id": "b3f577e9-da75-4a8c-acfb-19bfcb5ea71e",
      "name": "When clicking \"Test workflow\"",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        480,
        432
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "0f868378-2dce-4a4d-a6cd-0b6df6189c3f",
      "name": "Workflow Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -16
      ],
      "parameters": {
        "width": 480,
        "height": 752,
        "content": "## Create Images from Spreadsheet Data with Layerre\n\nThis workflow automates the creation of personalized images at scale using Layerre.\n\n### How it works\n1. **Create Template**: First, create a Layerre template from your Canva design\n2. **Load Data**: Get rows from the [public Google Sheets example](https://docs.google.com/spreadsheets/d/1x8X_qZaoXkrIKGVlhCC25du8ht42UKinRPtmjThpTSE/edit?usp=sharing) with columns **Text** and **Image** (one row = one variant)\n3. **Generate Variants**: Loop through each row and create image variants\n4. **Output**: Get back the rendered image URLs for each variant\n\n### Prerequisites\n- A [Layerre account](https://layerre.com) with an API key\n- A Canva design with the layers you want to customize\n- A spreadsheet with your data (one row per variant)\n\n### Customization\n- The example sheet has columns **Text** and **Image**. Match your Canva layer IDs in the Create Variant node (e.g. `text`, `image`).\n- Add more layer overrides in the \"Create Variant\" node\n- Add downstream nodes to save images, send them via email, post to social media, etc.\n\n### Resources\n- [Layerre Documentation](https://layerre.com/docs)\n- [Layerre n8n Node Documentation](https://github.com/layerre/n8n-nodes-layerre)\n- [n8n Documentation](https://docs.n8n.io)"
      },
      "typeVersion": 1
    },
    {
      "id": "09afff7b-29c0-4df5-8923-ce8e54cd5cdf",
      "name": "Step 1 Instructions",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        672,
        64
      ],
      "parameters": {
        "color": 7,
        "width": 344,
        "height": 336,
        "content": "## Step 1: Create Template\n\nCreate a Layerre template from your Canva design. This only needs to be done once.\n\n**Instructions:**\n1. Share your Canva design (click Share \u2192 \"Anyone with the link can view\")\n2. Paste the Canva URL in the node below\n3. Execute this node to create the template\n\n**Note:** You can deactivate this node after the template is created since you only need to create it once."
      },
      "typeVersion": 1
    },
    {
      "id": "503e6991-7cc3-4e60-b8bc-f76979e964b4",
      "name": "Create Template from Canva",
      "type": "n8n-nodes-layerre.layerre",
      "position": [
        784,
        432
      ],
      "parameters": {
        "canvaUrl": "",
        "requestOptions": {}
      },
      "credentials": {},
      "typeVersion": 1
    },
    {
      "id": "96b2184f-9ae3-42c2-a161-911af03a7c07",
      "name": "Step 2 Instructions",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1088,
        -32
      ],
      "parameters": {
        "color": 7,
        "width": 360,
        "height": 424,
        "content": "## Step 2: Get Rows from Google Sheet\n\n**Instructions:**\n1. Add Google Sheets credentials (OAuth2 or Service Account) if you haven't already\n2. Select your spreadsheet: choose from list or paste the spreadsheet ID from the URL\n3. Select the sheet (tab) to read from\n4. Operation **Get Row(s)** returns every row (first row = headers). Each data row becomes one variant.\n\n**Using the public Google Sheets example:** This workflow is configured to read from the public [Layerre Sheets Example](https://docs.google.com/spreadsheets/d/1x8X_qZaoXkrIKGVlhCC25du8ht42UKinRPtmjThpTSE/edit?usp=sharing). It has 2 columns: **Text** and **Image**. Each row = one variant. You can use this sheet as-is (with view access) or make a copy for your own data."
      },
      "typeVersion": 1
    },
    {
      "id": "fc1b824a-3bf5-4248-85b6-2bf8dbb34c3c",
      "name": "Get Rows from Google Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1200,
        432
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SPREADSHEET_ID_HERE/edit#gid=0",
          "cachedResultName": "Your Sheet Name"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        }
      },
      "credentials": {},
      "typeVersion": 4.4
    },
    {
      "id": "785396d7-9929-49ac-96d0-38b3233a479d",
      "name": "Step 3 Instructions",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1584,
        16
      ],
      "parameters": {
        "color": 7,
        "width": 360,
        "height": 380,
        "content": "## Step 3: Generate Variants\n\nThis node loops through each row of data and creates a personalized variant.\n\n**Configuration:**\n1. Template ID comes from Step 1 automatically\n2. Overrides map sheet columns to your Canva layers: **Text** \u2192 text layer, **Image** \u2192 image layer (URL)\n3. If your Canva layer IDs aren't `text` and `image`, change the layer IDs in the overrides to match your design\n\n**Tip:** Use the layer dropdown to see all available layers in your template."
      },
      "typeVersion": 1
    },
    {
      "id": "de1ceb0d-9aea-436a-97a1-008849759ad2",
      "name": "Create Variant with Custom Data",
      "type": "n8n-nodes-layerre.layerre",
      "position": [
        1744,
        432
      ],
      "parameters": {
        "resource": "variant",
        "overrides": {
          "override": [
            {
              "layerId": "bf6cc307-55de-47aa-9b69-5fa686b4529f",
              "overrideOptions": {
                "text": "={{ $json.Text }}"
              }
            },
            {
              "layerId": "f7aff324-7906-41d7-823c-d4d7702e83e1",
              "overrideOptions": {
                "imgUrl": "={{ $json.Image }}"
              }
            }
          ]
        },
        "templateId": "={{ $('Create Template from Canva').item.json.id }}",
        "requestOptions": {},
        "variantDimensions": {}
      },
      "credentials": {},
      "typeVersion": 1
    },
    {
      "id": "2b294116-917e-4043-a5a0-95c073a67b64",
      "name": "Step 4 Instructions",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2016,
        320
      ],
      "parameters": {
        "color": 7,
        "width": 376,
        "height": 340,
        "content": "## Step 4: Output\n\nThe \"Create Variant\" node outputs the rendered image data.\n\n**Next steps:**\nYou can add more nodes to:\n- Download images to local storage\n- Upload to cloud storage (S3, Google Drive, Dropbox)\n- Send via email or Slack\n- Post to social media\n- Insert URLs into a database or CRM"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Create Template from Canva": {
      "main": [
        [
          {
            "node": "Get Rows from Google Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Rows from Google Sheet": {
      "main": [
        [
          {
            "node": "Create Variant with Custom Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \"Test workflow\"": {
      "main": [
        [
          {
            "node": "Create Template from Canva",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}