Generate and manage short links with GPT-4.1 and data storage
Ready for 3.0Ready 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).
- AI Agent: runs an AI agent, with model: OpenAI Chat Model; 1 tool (Call 'Create Short Link'); memory: Simple Memory
- Config (Edit Fields (Set)): sets 1 field: your_webhook_url
- Get row(s) (Data table): get
- Generate shorlinkId (Code): runs custom JavaScript code
- Page Redirect (HTML): parses or builds HTML
- Insert row (Data table): uses Data table
- Response (Respond to Webhook): sends the response back to the webhook caller
- Generate ShortLink (Code): runs custom JavaScript code
Services it uses
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)
- Data table
n8n-nodes-base.dataTable - Code
n8n-nodes-base.code - Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger - Edit Fields (Set)
n8n-nodes-base.set - Call n8n Workflow Tool
@n8n/n8n-nodes-langchain.toolWorkflow - HTML
n8n-nodes-base.html - Respond to Webhook
n8n-nodes-base.respondToWebhook - Webhook
n8n-nodes-base.webhook
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…