{
  "name": "Bulk generate AI images from a Google Sheet (PixelFireman API)",
  "nodes": [
    {
      "parameters": {
        "content": "## Bulk AI images from a Google Sheet\n\nRead a list of prompts from a Google Sheet, generate an image for each with PixelFireman, and write the image URL back to the sheet.\n\n### Setup\n1. Get a free API key at **https://pixelfireman.com/account** and paste it into the **PixelFireman API** node (replace `YOUR_PIXELFIREMAN_API_KEY`, keep `Bearer `).\n2. In both **Google Sheets** nodes, connect your Google account and pick your spreadsheet + sheet.\n3. Your sheet needs a column named **prompt** (one prompt per row). The flow writes the result into an **image** column.\n4. Click **Test workflow**. Each row gets an image URL.\n\nCheap at volume: about $6.25 per 1,000 images, prepaid credits that never expire, failed renders never billed.\n\nDocs: https://pixelfireman.com/docs",
        "height": 440,
        "width": 440,
        "color": 4
      },
      "id": "d1b2c3d4-0001-4000-8000-000000000001",
      "name": "Read me first",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [-260, -80]
    },
    {
      "parameters": {},
      "id": "d1b2c3d4-0002-4000-8000-000000000002",
      "name": "Run",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [280, 20]
    },
    {
      "parameters": {
        "documentId": { "__rl": true, "value": "YOUR_GOOGLE_SHEET_ID", "mode": "id" },
        "sheetName": { "__rl": true, "value": "gid=0", "mode": "list", "cachedResultName": "Sheet1" },
        "options": {}
      },
      "id": "d1b2c3d4-0003-4000-8000-000000000003",
      "name": "Get prompts",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [500, 20]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://pixelfireman.com/v1/images",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            { "name": "Authorization", "value": "Bearer YOUR_PIXELFIREMAN_API_KEY" },
            { "name": "Content-Type", "value": "application/json" }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"prompt\": {{ JSON.stringify($json.prompt) }}\n}",
        "options": {}
      },
      "id": "d1b2c3d4-0004-4000-8000-000000000004",
      "name": "PixelFireman API",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [720, 20]
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": { "__rl": true, "value": "YOUR_GOOGLE_SHEET_ID", "mode": "id" },
        "sheetName": { "__rl": true, "value": "gid=0", "mode": "list", "cachedResultName": "Sheet1" },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "row_number": "={{ $('Get prompts').item.json.row_number }}",
            "image": "={{ $json.image }}"
          },
          "matchingColumns": ["row_number"]
        },
        "options": {}
      },
      "id": "d1b2c3d4-0005-4000-8000-000000000005",
      "name": "Write image URL back",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [940, 20]
    }
  ],
  "connections": {
    "Run": { "main": [[{ "node": "Get prompts", "type": "main", "index": 0 }]] },
    "Get prompts": { "main": [[{ "node": "PixelFireman API", "type": "main", "index": 0 }]] },
    "PixelFireman API": { "main": [[{ "node": "Write image URL back", "type": "main", "index": 0 }]] }
  },
  "pinData": {},
  "settings": { "executionOrder": "v1" },
  "meta": {
    "templateCredsSetupCompleted": false,
    "description": "Bulk generate AI images from a Google Sheet of prompts using the PixelFireman API, and write each image URL back to the sheet. Cheap at volume: about $6.25 per 1,000 images, prepaid credits that never expire. One node reads the sheet, one calls /v1/images per row, one writes the result back."
  }
}
