⚡ Only 300 spots remaining • Closes in 2d 14h 32m

Back to Workflow Library
Utilities

Custom URL Shortener API

Own your data and your links. This workflow exposes a POST webhook. When called with a long URL, it generates a random 6-character slug, saves the mapping in an Airtable base, and returns the short URL to the caller. You can also add a GET webhook to handle the redirection logic.

#API
#Airtable
#Webhook
#Utilities
#Marketing

Automation Logic

n8n JSON Blueprint

This workflow is pre-configured and ready for deployment. Simply import the JSON template into your n8n instance and configure your credentials.

This is an exclusive blueprint. Copy the JSON below to use it.

QUICK DEPLOY

  • 1
    Download the .json file
  • 2
    Open n8n & click "Import"
  • 3
    Configure your API keys

PRO TIP

Always test your workflow in a development environment before pushing to production.

JSON BLUEPRINT

n8n-workflow.json
{
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "shorten",
        "options": {}
      },
      "name": "Shorten Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [250, 300]
    },
    {
      "parameters": {
        "values": {
          "string": [
            {
          "name": "slug",
          "value": "={{Math.random().toString(36).substring(7)}}"
            }
          ]
        }
      },
      "name": "Generate Slug",
      "type": "n8n-nodes-base.set",
      "typeVersion": 1,
      "position": [450, 300]
    },
    {
      "parameters": {
        "operation": "append",
        "baseId": "YOUR_BASE_ID",
        "table": "Links",
        "columns": {
          "mappingMode": "defineBelow",
          "value": [
            {
              "column": "Slug",
              "value": "={{$node[\"Generate Slug\"].json[\"slug\"]}}"
            },
            {
              "column": "LongURL",
              "value": "={{$node[\"Shorten Webhook\"].json[\"body\"][\"url\"]}}"
            }
          ]
        }
      },
      "name": "Save Mapping",
      "type": "n8n-nodes-base.airtable",
      "typeVersion": 1,
      "position": [650, 300]
    }
  ],
  "connections": {
    "Shorten Webhook": {
      "main": [[{"node": "Generate Slug", "type": "main", "index": 0}]]
    },
    "Generate Slug": {
      "main": [[{"node": "Save Mapping", "type": "main", "index": 0}]]
    }
  }
}

To use this, copy the JSON above and paste it directly onto your n8n canvas.

IMPLEMENTATION GUIDE

Required Nodes

  • API Node
  • Airtable Node
  • Webhook Node
  • Utilities Node
  • Marketing Node
  • Cron / Webhook Trigger

Core Benefits

  • 100% Automated Execution
  • Reduces Manual Data Entry
  • Infinite Scalability

Need Help Building Your Private Cloud?

Join the elite marketers who have offloaded their entire backend to n8n. Get direct support and custom builds in our private forum.

user