Generate and Manage Short Links with GPT-4.1 and Data Storage — Workflow n8n

Moyen complexité Déclencheur14 nœuds🏷️ Miscellaneous👁 1 vuespar Nghia Nguyen

Aperçu

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

Nœuds utilisés

CodeHTMLAI AgentOpenAI Chat ModelSimple MemoryCall n8n Workflow Tool

Aperçu du workflow

Setup Guide
1. Add your_webhook_url to the 'Config' Node.
2. Set up OpenAI account
3. Create a database table named ShortLink with the fol
- originalLink
- shortLinkId
Agent
Create Short Link
Process Short Link Requests
memorymodeltool
I
Insert row
Generate shorlinkId
G
Get row(s)
W
When chat message received
AI Agent
OpenAI Chat Model
Simple Memory
G
GenerateShortLink
C
Config
Generate ShortLink
Call 'Create Short Link'
Page Redirect
R
Response
S
ShortLink API
14 nodes11 edges

Comment ça fonctionne

  1. 1

    Déclencheur

    Le workflow démarre avec un déclencheur déclencheur.

  2. 2

    Traitement

    Les données transitent par 14 nœuds, connecting agent, chattrigger, code.

  3. 3

    Sortie

    Le workflow termine son automatisation et livre le résultat à la destination configurée.

Détails des nœuds (14)

CO

Code

code

#1
HT

HTML

html

#2
AI

AI Agent

n8n-nodes-langchain.agent

#3
OP

OpenAI Chat Model

n8n-nodes-langchain.lmChatOpenAi

#4
SI

Simple Memory

n8n-nodes-langchain.memoryBufferWindow

#5
CA

Call n8n Workflow Tool

n8n-nodes-langchain.toolWorkflow

#6

Comment importer ce workflow

  1. 1Cliquez sur le bouton Télécharger JSON à droite pour enregistrer le fichier du workflow.
  2. 2Ouvrez votre instance n8n. Accédez à Workflows → Nouveau → Importer depuis un fichier.
  3. 3Sélectionnez le fichier generate-and-manage-short-links-with-gpt-41-and-data-storage téléchargé et cliquez sur Importer.
  4. 4Configurez les identifiants pour chaque nœud de service (clés API, OAuth, etc.).
  5. 5Cliquez sur Tester le workflow pour vérifier que tout fonctionne, puis activez-le.

Ou collez directement dans n8n → Importer depuis JSON :

{ "name": "Generate and Manage Short Links with GPT-4.1 and Data Storage", "nodes": [...], ...}

Intégrations

agentchattriggercodedatatableexecuteworkflowtriggerhtmllmchatopenaimemorybufferwindowrespondtowebhooksettoolworkflowwebhook

Obtenir ce workflow

Téléchargez et importez en un clic

Télécharger JSONVoir sur n8n.io
Nœuds14
Complexitémedium
Déclencheurtrigger
Vues1
CatégorieMiscellaneous

Créé par

Nghia Nguyen

Nghia Nguyen

@nghiaaidev

Tags

agentchattriggercodedatatableexecuteworkflowtriggerhtmllmchatopenaimemorybufferwindowrespondtowebhookset

Nouveau sur n8n ?

n8n est un outil d'automatisation de workflows gratuit et open-source. Hébergez-le vous-même ou utilisez la version cloud.

Obtenir n8n gratuitement →

Related Miscellaneous Workflows