Templates / Generate and manage short links with GPT-4.1 and data storage

Generate and manage short links with GPT-4.1 and data storage

Ready for 3.0

by Nghia Nguyen ✓ · 1,027 views · created 2025-10-18 · Miscellaneous, AI Chatbot

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 14 nodes and runs when a chat message arrives (plus 2 other triggers). Along the way it connects OpenAI Chat Model.

How it runs

Trigger: When a chat message arrives (plus 2 other triggers).

  1. AI Agent: runs an AI agent, with model: OpenAI Chat Model; 1 tool (Call 'Create Short Link'); memory: Simple Memory
  2. Config (Edit Fields (Set)): sets 1 field: your_webhook_url
  3. Get row(s) (Data table): get
  4. Generate shorlinkId (Code): runs custom JavaScript code
  5. Page Redirect (HTML): parses or builds HTML
  6. Insert row (Data table): uses Data table
  7. Response (Respond to Webhook): sends the response back to the webhook caller
  8. Generate ShortLink (Code): runs custom JavaScript code

Services it uses

OpenAI Chat Model

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (12)

From the author

This AI Agent helps you create short links from your original URLs. Each generated short link is automatically stored in a database table for easy management and tracking. --- How It Works 1. Provide a long URL to the Agent. 2. The Agent saves your original…

Excerpt from Nghia Nguyen's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.