Workflow: Namesilo Bulk Domain Availability [Template]
Integrations: code, convertToFile, httpRequest, manualTrigger, set, splitInBatches, stickyNote, wait

{"id": "phqg5Kk3YowxoMHQ", "meta": {"instanceId": "workflow-6e84ab72", "versionId": "1.0.0", "createdAt": "2025-09-29T07:07:59.789764", "updatedAt": "2025-09-29T07:07:59.789788", "owner": "n8n-user", "license": "MIT", "category": "automation", "status": "active", "priority": "high", "environment": "production"}, "name": "Namesilo Bulk Domain Availability [Template]", "tags": ["automation", "n8n", "production-ready", "excellent", "optimized"], "nodes": [{"id": "b1184b35-0ab4-42d8-a5b2-66ef926d7eed", "name": "Set Data", "type": "n8n-nodes-base.set", "position": [-240, 0], "parameters": {"options": {}, "assignments": {"assignments": [{"id": "05a34cf0-9462-4684-aac8-32b4b17e9ef0", "name": "Domains", "type": "string", "value": "=domain1.com\ndomain2.com\ndomain3.com"}, {"id": "438830f9-27fe-4e89-bcb9-766483e2d9b1", "name": "Namesilo API Key", "type": "string", "value": "YOUR_API_KEY"}]}}, "typeVersion": 3.4, "notes": "This set node performs automated tasks as part of the workflow."}, {"id": "7fc40d31-a43b-4273-a6eb-d519fda815d4", "name": "Sticky Note", "type": "n8n-nodes-base.stickyNote", "position": [-800, -340], "parameters": {"width": 580, "height": 280, "content": "## How-To\n1. Claim your free Namesilo API key here: {{ $env.API_BASE_URL }}\n\n2. Set your API key and domains in \"Set Data\" node.\n\nThe workflow send up to 200 domains per loop until all domains are processed. The output is in Excel format.\n\nEnjoy!\n\nNote: Each loop wait 5min. This is required due to Namesilo rate limits."}, "typeVersion": 1, "notes": "This stickyNote node performs automated tasks as part of the workflow."}, {"id": "a2137f76-9e08-4743-b914-b10bbebc9a13", "name": "Convert & Split Domains", "type": "n8n-nodes-base.code", "position": [-60, 0], "parameters": {"jsCode": "// Get domains from input JSON\nconst domains = $json.Domains.split(\"\\n\").map(domain => domain.trim()).filter(Boolean);\n\n// Define batch size\nconst batchSize = 200;\n\n// Split into batches of 200\nlet batches = [];\nfor (let i = 0; i < domains.length; i += batchSize) {\n    batches.push(domains.slice(i, i + batchSize).join(\",\"));\n}\n\n// Return batches as an array\nreturn batches.map(batch => ({ batchedDomains: batch }));"}, "typeVersion": 2, "notes": "This code node performs automated tasks as part of the workflow."}, {"id": "41140017-1f98-4ea9-ac97-9d48e5bdfda1", "name": "Wait", "type": "n8n-nodes-base.wait", "position": [680, -200], "webhookId": "3ede79a2-7875-462f-b15a-1c74339e2a8a", "parameters": {"unit": "minutes"}, "typeVersion": 1.1, "notes": "This wait node performs automated tasks as part of the workflow."}, {"id": "9aa9ddb5-9091-4726-917c-bce9d0f207c9", "name": "Merge Results", "type": "n8n-nodes-base.code", "position": [320, 0], "parameters": {"jsCode": "// This re-maps each input item (if needed)\nconst newItems = items.map(item => ({\n  json: {\n    Domain: item.json.Domain,\n    Availability: item.json.Availability\n  }\n}));\n\nreturn newItems;"}, "typeVersion": 2, "notes": "This code node performs automated tasks as part of the workflow."}, {"id": "bb2fd210-fd11-4712-94d0-fabb7060705c", "name": "Loop Over Domains", "type": "n8n-nodes-base.splitInBatches", "position": [120, 0], "parameters": {"options": {}}, "typeVersion": 3, "notes": "This splitInBatches node performs automated tasks as part of the workflow."}, {"id": "5d97cd82-f7d5-4f98-a789-8c0fcf473f0f", "name": "Namesilo Requests", "type": "n8n-nodes-base.httpRequest", "position": [320, -200], "parameters": {"url": "{{ $env.BASE_URL }}", "options": {}}, "retryOnFail": true, "typeVersion": 4.2, "waitBetweenTries": 5000, "notes": "This httpRequest node performs automated tasks as part of the workflow."}, {"id": "c4f38893-636a-4293-9e10-395be30683d0", "name": "Parse Data", "type": "n8n-nodes-base.code", "position": [500, -200], "parameters": {"jsCode": "// Ensure input data exists\nif (!$json || !$json.data) {\n    throw new Error(\"Invalid input data format\");\n}\n\n// Parse the JSON string inside `data`\nlet parsedData;\ntry {\n    parsedData = JSON.parse($json.data);\n} catch (error) {\n    throw new Error(\"Error parsing JSON data: \" + error.message);\n}\n\n// Extract available and unavailable domains safely\nconst availableDomains = parsedData.reply?.available ? Object.values(parsedData.reply.available) : [];\nconst unavailableDomains = parsedData.reply?.unavailable ? Object.values(parsedData.reply.unavailable) : [];\n\n// Prepare the output array\nconst output = [];\n\n// Process available domains\navailableDomains.forEach(domainObj => {\n    if (domainObj && domainObj.domain) {\n        output.push({\n            Domain: domainObj.domain,\n            Availability: \"Available\"\n        });\n    }\n});\n\n// Process unavailable domains\nunavailableDomains.forEach(domain => {\n    if (typeof domain === \"string\") {\n        output.push({\n            Domain: domain,\n            Availability: \"Unavailable\"\n        });\n    } else if (typeof domain === \"object\" && domain.domain) {\n        output.push({\n            Domain: domain.domain,\n            Availability: \"Unavailable\"\n        });\n    }\n});\n\n// Return the structured data\nreturn output;"}, "typeVersion": 2, "notes": "This code node performs automated tasks as part of the workflow."}, {"id": "ec7b8311-65b7-45b0-85ae-b91d7c82e123", "name": "Convert to Excel", "type": "n8n-nodes-base.convertToFile", "position": [500, 0], "parameters": {"options": {"fileName": "domain_results.xlsx"}, "operation": "xlsx", "binaryPropertyName": "={{ $json.MergedDomains }}"}, "typeVersion": 1.1, "notes": "This convertToFile node performs automated tasks as part of the workflow."}, {"id": "7d33c875-ce2d-404c-97a0-f551939d59f4", "name": "Start", "type": "n8n-nodes-base.manualTrigger", "position": [-420, 0], "parameters": {}, "typeVersion": 1, "notes": "This manualTrigger node performs automated tasks as part of the workflow."}], "active": false, "pinData": {}, "settings": {"executionOrder": "v1", "saveManualExecutions": true, "callerPolicy": "workflowsFromSameOwner", "errorWorkflow": null, "timezone": "UTC", "executionTimeout": 3600, "maxExecutions": 1000, "retryOnFail": true, "retryCount": 3, "retryDelay": 1000}, "versionId": "1a05d4b0-db0c-4554-8abf-0547130be16c", "connections": {"5d97cd82-f7d5-4f98-a789-8c0fcf473f0f": {"main": [[{"node": "error-handler-5d97cd82-f7d5-4f98-a789-8c0fcf473f0f", "type": "main", "index": 0}], [{"node": "error-handler-5d97cd82-f7d5-4f98-a789-8c0fcf473f0f-25e8f642", "type": "main", "index": 0}], [{"node": "error-handler-5d97cd82-f7d5-4f98-a789-8c0fcf473f0f-8452f29e", "type": "main", "index": 0}], [{"node": "error-handler-5d97cd82-f7d5-4f98-a789-8c0fcf473f0f-9613dd6d", "type": "main", "index": 0}], [{"node": "error-handler-5d97cd82-f7d5-4f98-a789-8c0fcf473f0f-4f927547", "type": "main", "index": 0}]]}, "ec7b8311-65b7-45b0-85ae-b91d7c82e123": {"main": [[{"node": "error-handler-ec7b8311-65b7-45b0-85ae-b91d7c82e123-e233881d", "type": "main", "index": 0}]]}}, "description": "Automated workflow: Namesilo Bulk Domain Availability [Template]. This workflow integrates 9 different services: convertToFile, stickyNote, httpRequest, wait, code. It contains 13 nodes and follows best practices for error handling and security.", "notes": "Excellent quality workflow: Namesilo Bulk Domain Availability [Template]. This workflow has been optimized for production use with comprehensive error handling, security, and documentation."}