{
  "name": "N8N advanced URL parsing and shortening workflow - Switchy.io integration",
  "nodes": [
    {
      "id": null,
      "name": "Split In Batches",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        3140,
        9383.397766717584
      ]
    },
    {
      "id": null,
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3080,
        9783.397766717584
      ],
      "parameters": {
        "width": 1249.1706015670397,
        "height": 685.2594193361641,
        "content": "## URL META TAGS DATA\n**This part** is used to parse long link data like title, descraption, image all them served in header with tags called. [URL metadata](https://ogp.me/)"
      }
    },
    {
      "id": null,
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5240,
        10223.397766717584
      ],
      "parameters": {
        "width": 346.4519761795601,
        "height": 241.68171599985524,
        "content": "## Switchy API Limits:\n- 10.000 links/day.\n- 1.000 links/hour max.\n- 16 links /minute max."
      }
    },
    {
      "id": null,
      "name": "Get Headers",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3160,
        10123.397766717584
      ]
    },
    {
      "id": null,
      "name": "OpenGraph API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3160,
        9923.397766717584
      ]
    },
    {
      "id": null,
      "name": "Meta tags Scraper - dub.sh",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3160,
        10303.397766717584
      ]
    },
    {
      "id": null,
      "name": "IF OpenGraph invaild",
      "type": "n8n-nodes-base.if",
      "position": [
        3400,
        9903.397766717584
      ]
    },
    {
      "id": null,
      "name": "Parse headers",
      "type": "n8n-nodes-base.html",
      "position": [
        3360,
        10100
      ]
    },
    {
      "id": null,
      "name": "If - Enable ScreenShots (yes to enable)",
      "type": "n8n-nodes-base.if",
      "position": [
        4040,
        10080
      ]
    },
    {
      "id": null,
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4340,
        9783.397766717584
      ],
      "parameters": {
        "width": 885.4276629872791,
        "height": 682.7545654243127,
        "content": "# Screenshot stack"
      }
    },
    {
      "id": null,
      "name": "API Auth",
      "type": "n8n-nodes-base.set",
      "position": [
        3600,
        9160
      ]
    },
    {
      "id": null,
      "name": "Method 1 - META",
      "type": "n8n-nodes-base.set",
      "position": [
        3620,
        9923.397766717584
      ]
    },
    {
      "id": null,
      "name": "Convert to File",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        4440,
        10263.397766717584
      ]
    },
    {
      "id": null,
      "name": "Final Data",
      "type": "n8n-nodes-base.set",
      "position": [
        4980,
        9883.397766717584
      ]
    },
    {
      "id": null,
      "name": "CREATE",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        5280,
        9883.397766717584
      ]
    },
    {
      "id": null,
      "name": "UPDATE",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        5280,
        10043.397766717584
      ]
    },
    {
      "id": null,
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5240,
        9783.397766717584
      ],
      "parameters": {
        "width": 344.6623616873581,
        "height": 418.2992490141105,
        "content": "## Switchy API\n**Create or Update** Link. [Based on their API docs](https://google.com)"
      }
    },
    {
      "id": null,
      "name": "IF Slug available",
      "type": "n8n-nodes-base.if",
      "position": [
        5420,
        9883.397766717584
      ]
    },
    {
      "id": null,
      "name": "Final Meta",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        3880,
        10080
      ]
    },
    {
      "id": null,
      "name": "Host Screenshot",
      "type": "n8n-nodes-base.github",
      "position": [
        4820,
        9883.397766717584
      ]
    },
    {
      "id": null,
      "name": "Host OGImage",
      "type": "n8n-nodes-base.github",
      "position": [
        4660,
        10223.397766717584
      ]
    },
    {
      "id": null,
      "name": "Host Favicon",
      "type": "n8n-nodes-base.github",
      "position": [
        4980,
        10223.397766717584
      ]
    },
    {
      "id": null,
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        4820,
        10063.397766717584
      ]
    },
    {
      "id": null,
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2380,
        9060
      ],
      "parameters": {
        "width": 682.2425599837106,
        "height": 1405.2214458171302,
        "content": "# README\n## N8N META Config\n### 1- **Opengraph Image mode**: `screenshot` or `source` or `brand`\n### - **screenshot**: _take a screenshot for web page based on longurl._\n[![Screenshort Mode Demo](http"
      }
    },
    {
      "id": null,
      "name": "Download final OG",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4980,
        10063.397766717584
      ]
    },
    {
      "id": null,
      "name": "Download Favicon",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4820,
        10223.397766717584
      ]
    },
    {
      "id": null,
      "name": "Method 2 - META",
      "type": "n8n-nodes-base.set",
      "position": [
        3500,
        10100
      ]
    },
    {
      "id": null,
      "name": "Stop and Error",
      "type": "n8n-nodes-base.stopAndError",
      "position": [
        4040,
        10320
      ]
    },
    {
      "id": null,
      "name": "Method 3 - META1",
      "type": "n8n-nodes-base.set",
      "position": [
        3620,
        10283
      ]
    },
    {
      "id": null,
      "name": "Method 1 - SCR",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4440,
        9863.397766717584
      ]
    },
    {
      "id": null,
      "name": "Method 2 - SCR",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4440,
        10083.397766717584
      ]
    },
    {
      "id": null,
      "name": "Final SCR",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        4660,
        9883.397766717584
      ]
    },
    {
      "id": null,
      "name": "Stop And Error",
      "type": "n8n-nodes-base.stopAndError",
      "position": [
        4660,
        10063.397766717584
      ]
    },
    {
      "id": null,
      "name": "Shortened URL",
      "type": "n8n-nodes-base.set",
      "position": [
        5420,
        10043.397766717584
      ]
    },
    {
      "id": null,
      "name": "n8n Form Trigger",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        3140,
        9183
      ]
    },
    {
      "id": null,
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        3140,
        9603.397766717584
      ]
    },
    {
      "id": null,
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3080,
        9063.397766717584
      ],
      "parameters": {
        "width": 365.4663416508872,
        "height": 698.8834639756606,
        "content": "## URL Preparing And Scanning\n"
      }
    },
    {
      "id": null,
      "name": "Scan URL (Community)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3900,
        9163
      ]
    },
    {
      "id": null,
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3460,
        9063.397766717584
      ],
      "parameters": {
        "width": 1102.2526655123636,
        "height": 698.8834639756606,
        "content": "## URL Preparing\nWe're using this side to control everything."
      }
    },
    {
      "id": null,
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3840,
        9063
      ],
      "parameters": {
        "width": 732.5923943084913,
        "height": 698.8834639756606,
        "content": "‌ ‌ ‌‌ ‌ ‌ ‌ ‌‌ ‌ ‌ ‌ ‌‌ ‌ ‌ ‌‌ ‌ ‌‌ ‌  ‌‌ ‌ ‌ ‌ ‌‌ ‌ ![Safe Web](https://static.nortoncdn.com/safeweb/prod/417315/assets/images/logo/norton_logo.svg)‌ ‌ ‌‌ ‌ ‌‌ ‌ ‌‌![Safe Web](https://static.nortonc"
      }
    },
    {
      "id": null,
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        4060,
        9160
      ]
    },
    {
      "id": null,
      "name": "If1",
      "type": "n8n-nodes-base.if",
      "position": [
        3900,
        9340
      ]
    },
    {
      "id": null,
      "name": "Check Reviews (Community)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3900,
        9520
      ]
    },
    {
      "id": null,
      "name": "Norton",
      "type": "n8n-nodes-base.set",
      "position": [
        4060,
        9340
      ]
    },
    {
      "id": null,
      "name": "bitdefender",
      "type": "n8n-nodes-base.set",
      "position": [
        4420,
        9343.397766717584
      ]
    },
    {
      "id": null,
      "name": "HTML",
      "type": "n8n-nodes-base.html",
      "position": [
        4260,
        9343.397766717584
      ]
    },
    {
      "id": null,
      "name": "(Fraud Check)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4260,
        9163.397766717584
      ]
    },
    {
      "id": null,
      "name": "(Others)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4420,
        9163.397766717584
      ]
    },
    {
      "id": null,
      "name": "If2",
      "type": "n8n-nodes-base.if",
      "position": [
        4260,
        9520
      ]
    },
    {
      "id": null,
      "name": "set unsafe",
      "type": "n8n-nodes-base.set",
      "position": [
        4420,
        9540
      ]
    },
    {
      "id": null,
      "name": "If3",
      "type": "n8n-nodes-base.if",
      "position": [
        3600,
        9380
      ]
    },
    {
      "id": null,
      "name": "PhishTank",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4060,
        9520
      ]
    },
    {
      "id": null,
      "name": "IF GH invaild",
      "type": "n8n-nodes-base.if",
      "position": [
        3640,
        10100
      ]
    },
    {
      "id": null,
      "name": "Method 4 - META",
      "type": "n8n-nodes-base.set",
      "position": [
        3840,
        10320
      ]
    },
    {
      "id": null,
      "name": "IF dub invaild",
      "type": "n8n-nodes-base.if",
      "position": [
        3380,
        10300
      ]
    },
    {
      "id": null,
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4580,
        9060
      ],
      "parameters": {
        "width": 1000.9922558475889,
        "height": 700.251847890049,
        "content": "\n\n\n\n‌\n‌\n‌\n‌\n‌\n# 💡FYI:-\n- ### **This workflow can be for any URL Shortener by just changing the API Services for the shortener SaaS.**\n- ### **Do not use it for spam purposes as the used APIs is mostly"
      }
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "PhishTank",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "If1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If1": {
      "main": [
        [
          {
            "node": "Check Reviews (Community)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Norton",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If2": {
      "main": [
        [
          {
            "node": "OpenGraph API",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "set unsafe",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If3": {
      "main": [
        [
          {
            "node": "Scan URL (Community)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "OpenGraph API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTML": {
      "main": [
        [
          {
            "node": "bitdefender",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "CREATE": {
      "main": [
        [
          {
            "node": "IF Slug available",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Norton": {
      "main": [
        [
          {
            "node": "PhishTank",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "UPDATE": {
      "main": [
        [
          {
            "node": "Shortened URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "(Others)": {
      "main": [
        [
          {
            "node": "HTML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "API Auth": {
      "main": [
        [
          {
            "node": "If3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Final SCR": {
      "main": [
        [
          {
            "node": "Host Screenshot",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "PhishTank": {
      "main": [
        [
          {
            "node": "(Fraud Check)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Final Data": {
      "main": [
        [
          {
            "node": "CREATE",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Final Meta": {
      "main": [
        [
          {
            "node": "If - Enable ScreenShots (yes to enable)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "set unsafe": {
      "main": [
        [
          {
            "node": "Split In Batches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Download final OG",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Headers": {
      "main": [
        [
          {
            "node": "Parse headers",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Meta tags Scraper - dub.sh",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "bitdefender": {
      "main": [
        [
          {
            "node": "If2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Host Favicon": {
      "main": [
        [
          {
            "node": "Final Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Host OGImage": {
      "main": [
        [
          {
            "node": "Download Favicon",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "(Fraud Check)": {
      "main": [
        [
          {
            "node": "(Others)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF GH invaild": {
      "main": [
        [
          {
            "node": "Meta tags Scraper - dub.sh",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Final Meta",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenGraph API": {
      "main": [
        [
          {
            "node": "IF OpenGraph invaild",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get Headers",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse headers": {
      "main": [
        [
          {
            "node": "Method 2 - META",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Shortened URL": {
      "main": [
        [
          {
            "node": "Split In Batches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF dub invaild": {
      "main": [
        [
          {
            "node": "Method 4 - META",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Method 3 - META1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Method 1 - SCR": {
      "main": [
        [
          {
            "node": "Final SCR",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Method 2 - SCR",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Method 2 - SCR": {
      "main": [
        [
          {
            "node": "Convert to File",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Stop And Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to File": {
      "main": [
        [
          {
            "node": "Final SCR",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Host Screenshot": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Method 1 - META": {
      "main": [
        [
          {
            "node": "Final Meta",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Method 2 - META": {
      "main": [
        [
          {
            "node": "IF GH invaild",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Method 4 - META": {
      "main": [
        [
          {
            "node": "Final Meta",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Favicon": {
      "main": [
        [
          {
            "node": "Host Favicon",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Method 3 - META1": {
      "main": [
        [
          {
            "node": "Final Meta",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split In Batches": {
      "main": [
        [
          {
            "node": "API Auth",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "n8n Form Trigger": {
      "main": [
        [
          {
            "node": "Split In Batches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download final OG": {
      "main": [
        [
          {
            "node": "Host OGImage",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF Slug available": {
      "main": [
        [
          {
            "node": "Shortened URL",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "UPDATE",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF OpenGraph invaild": {
      "main": [
        [
          {
            "node": "Method 1 - META",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get Headers",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scan URL (Community)": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Reviews (Community)": {
      "main": [
        [
          {
            "node": "Norton",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Meta tags Scraper - dub.sh": {
      "main": [
        [
          {
            "node": "IF dub invaild",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Stop and Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If - Enable ScreenShots (yes to enable)": {
      "main": [
        [
          {
            "node": "Method 1 - SCR",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}