This workflow corresponds to n8n.io template #15034 — we link there as the canonical source.
This workflow follows the Google Drive → Google Sheets recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"id": "ybYS6Fx8NkRw8Vbu",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "17 Create AI Coloring Book Pages from Prompts and Store Them in Google Drive",
"tags": [],
"nodes": [
{
"id": "396f1e6e-60d3-4a20-8650-0c6b0a688763",
"name": "Get Themes",
"type": "n8n-nodes-base.googleSheets",
"position": [
480,
112
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1HZMy8ollBzhkNzLveSjNMt-n3t3pv4s-WERch2P7gZ4/edit#gid=0",
"cachedResultName": "ColoringThemes"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1HZMy8ollBzhkNzLveSjNMt-n3t3pv4s-WERch2P7gZ4",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1HZMy8ollBzhkNzLveSjNMt-n3t3pv4s-WERch2P7gZ4/edit?usp=drivesdk",
"cachedResultName": "17\uff0cColoring Page Config"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.5
},
{
"id": "c8640444-e489-4b18-91a2-e10cbc96138d",
"name": "Split In Batches",
"type": "n8n-nodes-base.splitInBatches",
"position": [
1056,
0
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "5bcaf34c-e51f-4462-85a6-988b2571c5e3",
"name": "Build Prompt",
"type": "n8n-nodes-base.set",
"position": [
1280,
0
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "6a111869-2994-4562-8d3d-4dbdac5d4f46",
"name": "theme",
"type": "string",
"value": "={{ $json.theme }}"
},
{
"id": "5d565011-675f-4504-a990-8cf9b82813b7",
"name": "platform",
"type": "string",
"value": "={{ $json.platform || 'Gumroad' }}"
},
{
"id": "6c0ccd66-a407-4371-bae4-931109c89d95",
"name": "price",
"type": "string",
"value": "={{ $json.price || '800' }}"
},
{
"id": "b19effc8-5cca-4314-b01e-e955c4da95f3",
"name": "prompt",
"type": "string",
"value": "=create a clean black and white coloring page for printing.\n\nRequirements:\n- Line art only (no color, no grayscale)\n- White background\n- Bold, clear outlines\n- No shading, no shadows\n- Simple and easy to color\n\nTheme: {{$json.theme}}\nStyle: {{$json.style}}\nKeywords: {{$json.keyword}}\nSize: {{ $json.Size }}\n\nThe design must be centered, well-balanced, and suitable for A4 printable coloring books.\nThe design should be simple and easy to color for kids."
}
]
}
},
"typeVersion": 3.4
},
{
"id": "8f3221e2-9d95-4039-9adb-e506acf1b842",
"name": "Wait",
"type": "n8n-nodes-base.wait",
"position": [
1664,
0
],
"parameters": {
"amount": 8
},
"typeVersion": 1.1
},
{
"id": "66b5cc08-b043-4d99-97be-cdae57d6f495",
"name": "Generate Image\uff08huggingface456\uff09",
"type": "n8n-nodes-base.httpRequest",
"position": [
1888,
0
],
"parameters": {
"url": "https://router.huggingface.co/hf-inference/models/stabilityai/stable-diffusion-xl-base-1.0",
"method": "POST",
"options": {
"response": {
"response": {
"responseFormat": "file"
}
}
},
"sendBody": true,
"sendHeaders": true,
"authentication": "predefinedCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "inputs",
"value": "={{$json.prompt}}"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "Accept",
"value": "image/png"
}
]
},
"nodeCredentialType": "huggingFaceApi"
},
"credentials": {
"huggingFaceApi": {
"name": "<your credential>"
}
},
"typeVersion": 4.2
},
{
"id": "e44a8ef1-8abe-44ca-9225-a7f26f0fb1ef",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
1024,
-272
],
"parameters": {
"color": 7,
"width": 992,
"height": 688,
"content": "## Filter Pending Coloring Tasks\nThis block filters coloring page tasks based on their processing status.\nOnly items marked as \"pending\" will proceed to the AI generation step.\nThis ensures that already processed items are skipped, preventing duplicate image generation and improving workflow efficiency."
},
"typeVersion": 1
},
{
"id": "87053a48-32b5-40af-9729-0da1b953b9d6",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
2032,
-272
],
"parameters": {
"color": 7,
"width": 736,
"height": 688,
"content": "## Save Outputs and Log Results\n\nThis block saves generated coloring images to Google Drive and logs related metadata in Google Sheets.\nIt ensures that all generated outputs are organized, tracked, and easily accessible for further use."
},
"typeVersion": 1
},
{
"id": "bf810d78-c996-416d-aac8-bd9de9844644",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
144,
-272
],
"parameters": {
"color": 7,
"width": 864,
"height": 688,
"content": "## Prompt Input & Configuration\n\nThis block initializes the workflow and prepares all inputs required to generate coloring pages.\nIt retrieves configuration settings (such as style, format, and output options) and combines them with coloring page themes stored in Google Sheets.\nOnly items marked as \"Pending\" will be processed.\nThis ensures efficient batch creation of coloring pages."
},
"typeVersion": 1
},
{
"id": "df77b252-81f4-402a-ac66-8a9681ea0f18",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-624,
-272
],
"parameters": {
"width": 752,
"height": 768,
"content": "\n## AI Coloring Page Generator\n\n\ud83d\udd37 Workflow Description\nThis workflow demonstrates a scalable and modular approach to AI-driven content generation and data organization using n8n.\n\nAt its core, the workflow is designed with a clear separation between configuration, processing, and output layers. All key parameters\u2014such as image count, request intervals, and API credentials\u2014are managed externally in Google Sheets, enabling non-technical users to control the workflow behavior without modifying the workflow logic.\n\nThe workflow dynamically generates multiple AI-based coloring images from a single theme input. A batching and delay mechanism is implemented to ensure stability and prevent API rate limiting, making the system robust for repeated or large-scale executions.\n\nGenerated assets are automatically stored in Google Drive with structured naming conventions, ensuring consistency and traceability. In addition, a dedicated generation step creates a corresponding cover image aligned with the same thematic input, maintaining coherence across outputs.\n\nA transformation layer using a code node standardizes all generated information into structured metadata, including title, subtitle, description, and keywords. This ensures that all outputs follow a consistent format regardless of input variations.\n\nFinally, the workflow consolidates all generated data\u2014including metadata and cloud storage links\u2014into a centralized Google Sheets database. This creates a single source of truth, enabling efficient tracking, filtering, and future automation.\n\nKey strengths of this workflow include:\n\nExternalized configuration for flexibility and maintainability\nModular node design for easy extension and reuse\nBuilt-in rate control for stable API interaction\nStructured data output for downstream integration\n\nThis workflow serves as a practical example of how n8n can orchestrate AI services, cloud storage, and data systems into a unified and production-ready automation pipeline.\n\n"
},
"typeVersion": 1
},
{
"id": "c2e94995-6bc2-4cd2-a14c-07d1e022ad87",
"name": "Run Manually",
"type": "n8n-nodes-base.manualTrigger",
"position": [
208,
-80
],
"parameters": {},
"typeVersion": 1
},
{
"id": "5d042ebe-ebf0-419a-8655-e50c9b83937d",
"name": "Run Weekly Coloring Generation",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
208,
96
],
"parameters": {
"rule": {
"interval": [
{
"field": "hours"
}
]
}
},
"typeVersion": 1.2
},
{
"id": "350fc6f9-b8f8-4880-97a5-125386c64191",
"name": "Merge Settings and Themes",
"type": "n8n-nodes-base.merge",
"position": [
656,
0
],
"parameters": {
"mode": "combine",
"options": {},
"combineBy": "combineByPosition"
},
"typeVersion": 3.2
},
{
"id": "61be336f-946e-430a-8549-edaf3cacec96",
"name": "Coloring Page Config",
"type": "n8n-nodes-base.googleSheets",
"position": [
480,
-80
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": 686903294,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1HZMy8ollBzhkNzLveSjNMt-n3t3pv4s-WERch2P7gZ4/edit#gid=686903294",
"cachedResultName": "Settings"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1HZMy8ollBzhkNzLveSjNMt-n3t3pv4s-WERch2P7gZ4",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1HZMy8ollBzhkNzLveSjNMt-n3t3pv4s-WERch2P7gZ4/edit?usp=drivesdk",
"cachedResultName": "17\uff0cColoring Page Config"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "1df679d8-a134-43bb-af64-712c3c0ce43d",
"name": "Filter Pending Coloring Tasks",
"type": "n8n-nodes-base.if",
"position": [
832,
0
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "status-check",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.status }}",
"rightValue": "pending"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "3191cbc6-591c-4f88-9440-9ba576800069",
"name": "Generate Coloring Variations",
"type": "n8n-nodes-base.code",
"position": [
1456,
0
],
"parameters": {
"jsCode": "// \u5165\u529b\u30c7\u30fc\u30bf\u53d6\u5f97\nconst base = $input.first().json;\n\n// Settings\u304b\u3089\u751f\u6210\u679a\u6570\u53d6\u5f97\uff08\u7121\u3051\u308c\u30705\uff09\nconst imageCount = Number(base.image_count ?? 5);\n\nconst items = [];\n\nfor (let i = 1; i <= imageCount; i++) {\n items.push({\n json: {\n ...base,\n\n // \u4f55\u679a\u76ee\u304b\n image_no: i,\n\n // \u751f\u6210\u7528\u30d7\u30ed\u30f3\u30d7\u30c8\uff08\u30d0\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u4ed8\u304d\uff09\n prompt: `${base.prompt}\n\nVariation ${i}:\n- Change composition\n- Change object arrangement\n- Slight variation in layout\n- Keep style consistent\n- Ensure clear line art suitable for coloring`,\n\n // \u30d5\u30a1\u30a4\u30eb\u540d\uff08Drive\u4fdd\u5b58\u7528\uff09\n file_name: `${String(base.theme || 'theme')\n .replace(/[^a-zA-Z0-9]/g, '_')}_${i}.png`,\n\n // \u30b9\u30c6\u30fc\u30bf\u30b9\u66f4\u65b0\u7528\n status: \"generated\"\n }\n });\n}\n\nreturn items;"
},
"typeVersion": 2
},
{
"id": "6346ac9d-6ee7-4ef7-b647-353e61ecd4ab",
"name": "Save Coloring Image to Drive",
"type": "n8n-nodes-base.googleDrive",
"position": [
2096,
0
],
"parameters": {
"name": "={{$json.theme}}_{{$now}}.png\n{{$json.theme}}_{{$json.image_no}}_{{$now.format(\"yyyy-MM-dd_HH-mm-ss\")}}.png",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "id",
"value": "1Y7Bi6p8g1A6pcrZ6vts1LbYPwxok7pyE"
}
},
"credentials": {
"googleDriveOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 3
},
{
"id": "b28d8120-c170-4382-91e0-e1b840e77c31",
"name": "Prepare Output Metadata",
"type": "n8n-nodes-base.code",
"position": [
2320,
0
],
"parameters": {
"jsCode": "const input = $input.first().json;\n\n// \u3082\u3057\u524d\u6bb5\u304b\u3089 theme \u304c\u6765\u3066\u3044\u306a\u3044\u5834\u5408\u306b\u5099\u3048\u308b\nconst theme = input.theme || 'Coloring Book';\nconst pdfLink = input.webViewLink || input.webContentLink || '';\nconst title = `${theme} Coloring Book`;\nconst subtitle = `Fun and Easy Coloring Pages for Kids and Beginners`;\nconst description = `This ${theme.toLowerCase()} coloring book includes fun and easy black-and-white pages designed for kids and beginners. Each page is made for relaxing, creative coloring time at home, in the classroom, or while traveling. The book offers simple and enjoyable illustrations that are suitable for practice, entertainment, and stress-free coloring. A great gift idea for children, parents, and anyone who loves ${theme.toLowerCase()} themed coloring books.`;\nconst keywords = [\n `${theme.toLowerCase()} coloring book`,\n `kids coloring book`,\n `easy coloring pages`,\n `beginner coloring book`,\n `fun coloring book`,\n `printable coloring pages`,\n `${theme.toLowerCase()} activity book`\n].join(', ');\n\nreturn [\n {\n json: {\n theme,\n title,\n subtitle,\n description,\n keywords,\n pdf_link: pdfLink\n }\n }\n];"
},
"typeVersion": 2
},
{
"id": "96c31383-c7e1-4477-ac09-817c7514d62b",
"name": "Log Results to Google Sheets",
"type": "n8n-nodes-base.googleSheets",
"position": [
2544,
0
],
"parameters": {
"columns": {
"value": {},
"schema": [
{
"id": "theme",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "theme",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "title",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "title",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "subtitle",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "subtitle",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "description",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "description",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "keywords",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "keywords",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "pdf_link",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "pdf_link",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "autoMapInputData",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 1470302118,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1HZMy8ollBzhkNzLveSjNMt-n3t3pv4s-WERch2P7gZ4/edit#gid=1470302118",
"cachedResultName": "Result"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1HZMy8ollBzhkNzLveSjNMt-n3t3pv4s-WERch2P7gZ4",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1HZMy8ollBzhkNzLveSjNMt-n3t3pv4s-WERch2P7gZ4/edit?usp=drivesdk",
"cachedResultName": "17\uff0cColoring Page Config"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.5
}
],
"active": false,
"settings": {
"binaryMode": "separate",
"executionOrder": "v1"
},
"versionId": "692e2875-62fc-4fab-b6c7-a541b7d4da76",
"connections": {
"Wait": {
"main": [
[
{
"node": "Generate Image\uff08huggingface456\uff09",
"type": "main",
"index": 0
}
]
]
},
"Get Themes": {
"main": [
[
{
"node": "Merge Settings and Themes",
"type": "main",
"index": 1
}
]
]
},
"Build Prompt": {
"main": [
[
{
"node": "Generate Coloring Variations",
"type": "main",
"index": 0
}
]
]
},
"Run Manually": {
"main": [
[
{
"node": "Coloring Page Config",
"type": "main",
"index": 0
},
{
"node": "Get Themes",
"type": "main",
"index": 0
}
]
]
},
"Split In Batches": {
"main": [
[],
[
{
"node": "Build Prompt",
"type": "main",
"index": 0
}
]
]
},
"Coloring Page Config": {
"main": [
[
{
"node": "Merge Settings and Themes",
"type": "main",
"index": 0
}
]
]
},
"Prepare Output Metadata": {
"main": [
[
{
"node": "Log Results to Google Sheets",
"type": "main",
"index": 0
}
]
]
},
"Merge Settings and Themes": {
"main": [
[
{
"node": "Filter Pending Coloring Tasks",
"type": "main",
"index": 0
}
]
]
},
"Generate Coloring Variations": {
"main": [
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"Log Results to Google Sheets": {
"main": [
[
{
"node": "Split In Batches",
"type": "main",
"index": 0
}
]
]
},
"Save Coloring Image to Drive": {
"main": [
[
{
"node": "Prepare Output Metadata",
"type": "main",
"index": 0
}
]
]
},
"Filter Pending Coloring Tasks": {
"main": [
[
{
"node": "Split In Batches",
"type": "main",
"index": 0
}
],
[]
]
},
"Run Weekly Coloring Generation": {
"main": [
[
{
"node": "Coloring Page Config",
"type": "main",
"index": 0
},
{
"node": "Get Themes",
"type": "main",
"index": 0
}
]
]
},
"Generate Image\uff08huggingface456\uff09": {
"main": [
[
{
"node": "Save Coloring Image to Drive",
"type": "main",
"index": 0
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
googleDriveOAuth2ApigoogleSheetsOAuth2ApihuggingFaceApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This workflow automatically generates printable coloring pages from themes stored in Google Sheets.
Source: https://n8n.io/workflows/15034/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
PCN. Uses googleSheets, httpRequest, @n-octo-n/n8n-nodes-json-database, itemLists. Event-driven trigger; 60 nodes.
The workflow automates the process of gathering extensive keyword data for a "Main Keyword." It starts by reading initial parameters from a Google Sheets template, creates a new dedicated Google Sheet
🔥 March Sale – n8n Community Members Get ideoGener8r for Just $27! (Reg. $47) Use Coupon Code: (Valid until 3/31/2025 for n8n community members)
📄 Documentation: Notion Guide
Overview