{ "name": "Download every image from a website (zip) with MiroMiro", "nodes": [ { "id": "note", "name": "About this workflow", "type": "n8n-nodes-base.stickyNote", "typeVersion": 1, "position": [ -460, -120 ], "parameters": { "content": "## Download every image from a website\nMiroMiro finds every image on the page (photos, backgrounds, logos, `og:image`), n8n downloads each one and zips them into one file.\n\nThe zip is on **Zip the images** > Binary > Download. 1 credit per page.\n\nImages that only load when you scroll? Open **List the images on the page** > Add option > **Render**.\n\n**Setup (1 minute)**\n1. Get a free MiroMiro API key (300 credits a month, no card): https://miromiro.app/api/onboarding\n2. Open any MiroMiro node > Credential > Create new, paste the key.\n3. Change the website in **Settings**, then click **Execute workflow**.", "height": 300, "width": 760, "color": 7 } }, { "id": "run", "name": "Run", "type": "n8n-nodes-base.manualTrigger", "typeVersion": 1, "position": [ -420, 300 ], "parameters": {} }, { "id": "settings", "name": "Settings", "type": "n8n-nodes-base.set", "typeVersion": 3.4, "position": [ -200, 300 ], "parameters": { "assignments": { "assignments": [ { "id": "s0", "name": "website", "value": "https://www.allbirds.com", "type": "string" } ] }, "options": {} } }, { "id": "a1", "name": "List the images on the page", "type": "n8n-nodes-miromiro.miroMiro", "typeVersion": 1, "position": [ 20, 300 ], "credentials": { "miroMiroApi": { "id": "", "name": "MiroMiro API" } }, "parameters": { "resource": "website", "operation": "images", "url": "={{ $json.website }}", "options": {} } }, { "id": "a2", "name": "Split: one item per image", "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ 240, 300 ], "parameters": { "jsCode": "// One item per image URL.\nreturn ($input.first().json.images || []).map(img => ({ json: { url: img.url || img.src || img }, pairedItem: { item: 0 } }))" } }, { "id": "a3", "name": "Download each image", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.3, "position": [ 460, 300 ], "onError": "continueRegularOutput", "parameters": { "url": "={{ $json.url }}", "options": { "response": { "response": { "responseFormat": "file" } } } } }, { "id": "a4", "name": "Put all images together", "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ 680, 300 ], "parameters": { "jsCode": "// Every downloaded image on one item, so they land in one zip.\nconst binary = {}\n$input.all().forEach((item, i) => { if (item.binary?.data) binary['image_' + String(i + 1).padStart(3, '0')] = item.binary.data })\nreturn [{ json: { images: Object.keys(binary).length }, binary, pairedItem: { item: 0 } }]" } }, { "id": "a5", "name": "Zip the images", "type": "n8n-nodes-base.compression", "typeVersion": 1.1, "position": [ 900, 300 ], "parameters": { "operation": "compress", "binaryPropertyName": "={{ Object.keys($binary).join(\",\") }}", "outputFormat": "zip", "fileName": "={{ String($('Settings').first().json.website).split('/')[2].replace(/^www\\./, '') }}-images.zip", "binaryPropertyOutput": "data" } } ], "connections": { "Run": { "main": [ [ { "node": "Settings", "type": "main", "index": 0 } ] ] }, "Settings": { "main": [ [ { "node": "List the images on the page", "type": "main", "index": 0 } ] ] }, "List the images on the page": { "main": [ [ { "node": "Split: one item per image", "type": "main", "index": 0 } ] ] }, "Split: one item per image": { "main": [ [ { "node": "Download each image", "type": "main", "index": 0 } ] ] }, "Download each image": { "main": [ [ { "node": "Put all images together", "type": "main", "index": 0 } ] ] }, "Put all images together": { "main": [ [ { "node": "Zip the images", "type": "main", "index": 0 } ] ] } }, "settings": { "executionOrder": "v1" } }