n8n

How to Automate Switchy Link Creation for Campaigns?

Turn long URLs into safe, branded short links with strong social previews. Marketers can collect a URL, check it for risk, build the right Open Graph image, and publish a short link that is ready for ads and social posts. It suits teams that share many links and want clean previews without manual work.

The flow starts from an n8n form or a webhook. It reads your settings like image mode, dark mode, brand text, slug, tags, and folder. It pulls page data from multiple sources, including OpenGraph, Dub, and direct header parsing. If metadata is weak, it tries more methods until it gets a title, description, and image. You can enable screenshots to build a custom OG image, or use the page source or a brand card. Screenshots and icons are saved to GitHub, then the link is created or updated in Switchy. Safety checks run across Norton Safe Web, Bitdefender, PhishTank, and a community scanner. If the link is unsafe, it stops.

Setup needs API keys for Switchy and GitHub, and optional keys for screenshot tools. Once live, teams can cut link prep from many minutes to a few seconds. It helps with campaign launches, social posts, and affiliate links where a sharp preview and safe routing matter.

What are the key features?

  • Form intake and webhook capture to collect long URLs and settings in one place.
  • Multi source metadata scraping using OpenGraph, Dub, header requests, and HTML parsing.
  • Optional screenshot based OG images with two providers and a simple on or off switch.
  • Fraud checks across Norton Safe Web, Bitdefender, PhishTank, and a community scanner.
  • Image and favicon download, convert to file, and upload to GitHub for hosting.
  • Create or update short links with slug, tags, and folder targeting in Switchy.
  • Batch handling with Split In Batches to process items safely and predictably.
  • Fallback logic and error stops to handle weak metadata or unsafe links.
  • Instant webhook response that returns the final short URL and assets.

What are the benefits?

  • Reduce manual work from 20 minutes per link to 2 minutes
  • Streamline link preparation by up to 80% with one intake form
  • Improve preview consistency across channels by pulling metadata from multiple sources
  • Lower risk by blocking unsafe URLs before publishing
  • Host OG images and favicons in one GitHub repo for easy reuse

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Switchy, GitHub, OpenGraph, Dub, Microlink, Pxl, Norton Safe Web, Bitdefender and PhishTank. See the Tools Required section above for links to create accounts with these services.
  3. In n8n, open the n8n Form Trigger node and add fields for LongURL, Custom slug, Tags, Folder ID, OG image mode, Dark mode, and Brand name. Save the form and copy the share link for testing.
  4. Set up Switchy access: double click the CREATE and UPDATE HTTP Request nodes, then on the Credential to connect with dropdown, click Create new credential. Add your API key in the header as documented by your account, and save.
  5. Connect GitHub: open the GitHub nodes used for hosting images. Create a new GitHub credential with a Personal Access Token that has repo scope. Set the repository, branch, and folder path for storing images.
  6. Configure screenshot providers: open the Method 1 SCR and Method 2 SCR HTTP Request nodes. If your provider requires an API key, create one in your provider dashboard and add it as a header in the node credentials.
  7. Review metadata nodes: check OpenGraph API and Dub meta tag nodes. No authentication may be needed. Make sure the URL field maps to the LongURL from the form.
  8. Safety checks: confirm the Norton, Bitdefender, and PhishTank nodes reach their endpoints. If any API requires a key, add it with a new credential in the node settings. Run a test URL to see pass or fail branches.
  9. GitHub upload paths: in Host Screenshot, Host OGImage, and Host Favicon nodes, set file names to include slugs or timestamps to avoid overwrites. Confirm the branch exists.
  10. Switchy behavior: in the IF Slug available node, verify the logic that decides between CREATE and UPDATE. Adjust default folder ID and tags in the Final Data or Edit Fields nodes.
  11. Run a full test: submit the form with a real URL. Check the execution to confirm metadata is found, images are saved to GitHub, and a short link is created or updated. The Respond to Webhook node should return the short URL.
  12. Troubleshoot: if metadata is empty, verify the IF OpenGraph invalid and fallback META methods. If GitHub upload fails, check token scope and repo permissions. If the link is blocked, review the unsafe branch and scanner results.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Bitdefender

Sign up

IntelliZone Portal (Threat Intelligence APIs): $7,859.51/year for 1,000-license tier (via CDW)

Free: $0 / mo — includes API access (60 requests/min) and 25 new links / mo

GitHub

Sign up

Free tier: $0 / mo

Microlink

Sign up

Free tier: $0, 50 requests (API access via free endpoint)

Norton Safe Web

Sign up

OpenGraph

Sign up

Free tier: $0 / mo (API key available; sign-up required)

PhishTank

Sign up

Free: $0, API access available with free registration (rate-limited; higher limits with API key)

Annual plan: $19.99 / mo (billed annually), API access included

Switchy

Sign up

Team plan: Price ; API available; 1,500 links/day and 100 links/hour rate limits

Credits:
Creator: Nskha. Creator profile: n8n.io/creators/nskha. Community support: community.n8n.io (mention @Nskha). Updates channel: nodemation.t.me.

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.