Generate and Manage Short Links with GPT-4.1 and Data Storage — n8n Workflow
Overview
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
Provide a long URL to the Agent.
The Agent saves your original link in the database.
It generates a short link in the following format:
Short link: https://{webhook_url}/webhook/shortLink?q={shortLinkId}
When users open the short link, they are automatically redirected to your original link.
How to Use
Nodes used
Workflow Preview
How it Works
- 1
Trigger
The workflow starts with a trigger trigger.
- 2
Process
Data flows through 14 nodes, connecting agent, chattrigger, code.
- 3
Output
The workflow completes its automation and delivers the result to the configured destination.
Node Details (14)
Code
code
HTML
html
AI Agent
n8n-nodes-langchain.agent
OpenAI Chat Model
n8n-nodes-langchain.lmChatOpenAi
Simple Memory
n8n-nodes-langchain.memoryBufferWindow
Call n8n Workflow Tool
n8n-nodes-langchain.toolWorkflow
How to Import This Workflow
- 1Click Download JSON button on the right to save the workflow file.
- 2Open your n8n instance. Go to Workflows → New → Import from file.
- 3Select the downloaded
generate-and-manage-short-links-with-gpt-41-and-data-storagefile and click Import. - 4Set up credentials for each service node (API keys, OAuth, etc.).
- 5Click Test Workflow to verify everything works, then activate it.
Or paste directly in n8n → Import from JSON:
Integrations
Created by
Nghia Nguyen
@nghiaaidev
Tags
New to n8n?
n8n is a free, open-source workflow automation tool. Self-host it or use the cloud version.
Get n8n Free →