WorkflowGitHubOpen

Switchy.io link shortener with OpenGraph n8n

This n8n workflow shortens links with the Switchy.io API and fills in each link's title, description and preview image from the page metadata. It is for marketers who create many short links and want them to look right when shared, with screenshots when a page lacks an image.

What it does

Links are processed in batches. The flow reads headers, tries an OpenGraph API and a dub.sh metadata scraper, parses HTML when needed, can take a screenshot, and then creates or updates the link in Switchy. Images can be stored through GitHub.

How to use it

Set the Opengraph image mode in the config to screenshot, source or brand, and add your Switchy API key.

Requirements and limits

Switchy allows 10,000 links a day, 1,000 an hour and 16 a minute.

More in GitHub and the n8n workflow library.

Full text

Front matter
name: [n8n] Advanced URL Parsing and Shortening Workflow - Switchy.io Integration
description: Triggered manually or by an app event. Connects Aggregate, Condition, Convert To File, GitHub, HTTP request, Html, Loop, Respond To Webhook. ## URL META TAGS DATA **This part** is used to parse long link data like title, descraption, image all them served in header with tags called. [URL metadata]({{ $env.WEBHOOK_URL }} ## Switchy API Limits: - 10.000 links/day. - 1.000 links/hour max. - 16 links /minute max. # Screenshot stack ## Switchy API **Create or Update** Link. [Based on their API docs]({{ $env.WEBHOOK_URL }} # README ## N8N META Config ### 1- **Opengraph Image mode**: `screenshot` or `source` or `brand` ### - **screenshot**:
category: Automation
kind: Workflow
software: Aggregate|Condition|Convert To File|GitHub|HTTP request|Html|Loop|Respond To Webhook|Stop And Error

[n8n] Advanced URL Parsing and Shortening Workflow - Switchy.io Integration

Triggered manually or by an app event. Connects Aggregate, Condition, Convert To File, GitHub, HTTP request, Html, Loop, Respond To Webhook. ## URL META TAGS DATA This part is used to parse long link data like title, descraption, image all them served in header with tags called. [URL metadata]({{ $env.WEBHOOK_URL }} ## Switchy API Limits:

  • 10.000 links/day.
  • 1.000 links/hour max.
  • 16 links /minute max. # Screenshot stack ## Switchy API

Create or Update Link. [Based on their API docs]({{ $env.WEBHOOK_URL }} # README

N8N META Config

1- Opengraph Image mode: screenshot or source or brand

- screenshot:

Steps

  • Split In Batches (splitInBatches)
  • Sticky Note (stickyNote)
  • Sticky Note1 (stickyNote)
  • Get Headers (httpRequest)
  • OpenGraph API (httpRequest)
  • Meta tags Scraper - dub.sh (httpRequest)
  • IF OpenGraph invaild (if)
  • Parse headers (html)
  • If - Enable ScreenShots (yes to enable) (if)
  • Sticky Note3 (stickyNote)
  • API Auth (set)
  • Method 1 - META (set)
  • Convert to File (convertToFile)
  • Final Data (set)
  • CREATE (httpRequest)
  • UPDATE (httpRequest)
  • Sticky Note4 (stickyNote)
  • IF Slug available (if)
  • Final Meta (aggregate)
  • Host Screenshot (github)
  • Host OGImage (github)
  • Host Favicon (github)
  • Edit Fields (set)
  • Sticky Note6 (stickyNote)
  • Download final OG (httpRequest)
  • Download Favicon (httpRequest)
  • Method 2 - META (set)
  • Stop and Error (stopAndError)
  • Method 3 - META1 (set)
  • Method 1 - SCR (httpRequest)
  • Method 2 - SCR (httpRequest)
  • Final SCR (aggregate)
  • Stop And Error (stopAndError)
  • Shortened URL (set)
  • n8n Form Trigger (formTrigger)
  • Respond to Webhook (respondToWebhook)
  • Sticky Note2 (stickyNote)
  • Scan URL (Community) (httpRequest)
  • Sticky Note5 (stickyNote)
  • Sticky Note7 (stickyNote)

Import

Download the JSON from the GitHub source and import it in n8n (Workflows, Import from file).

Source and license

Source: https://github.com/Zie619/n8n-workflows/blob/main/Stopanderror/0392_Stopanderror_GitHub_Automate_Webhook.md

Author: Zie619, n8n workflow collection. License: MIT.

Shown here with formatting for the web. Keep the author and license notice when you reuse it.

Related entries

There are more like this in the members library

The n8n workflow library holds 1,814 entries. Members can search all of them by meaning and read every one in full.