Generate and Manage Short Links with GPT-4.1 and Data Storage — n8n 工作流

复杂度 触发器14 个节点🏷️ Miscellaneous👁 1 次查看作者:Nghia Nguyen

概览

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

使用的节点

CodeHTMLAI AgentOpenAI Chat ModelSimple MemoryCall n8n Workflow Tool

工作流预览

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

工作原理

  1. 1

    触发器

    工作流由 触发器 触发器启动。

  2. 2

    处理

    数据流经 14 个节点, connecting agent, chattrigger, code。

  3. 3

    输出

    工作流完成自动化并将结果发送到配置的目标。

节点详情 (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

如何导入此工作流

  1. 1点击右侧 下载 JSON 按钮保存工作流文件。
  2. 2打开你的 n8n 实例,依次点击 工作流 → 新建 → 从文件导入
  3. 3选择下载的 generate-and-manage-short-links-with-gpt-41-and-data-storage 文件并点击导入。
  4. 4为每个服务节点配置 凭证(API 密钥、OAuth 等)。
  5. 5点击 测试工作流 验证一切正常,然后激活它。

或直接在 n8n → 从 JSON 导入 中粘贴:

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

集成

agentchattriggercodedatatableexecuteworkflowtriggerhtmllmchatopenaimemorybufferwindowrespondtowebhooksettoolworkflowwebhook

获取此工作流

一键下载并导入

下载 JSON在 n8n.io 上查看
节点14
复杂度medium
触发器trigger
查看次数1

创建者

Nghia Nguyen

Nghia Nguyen

@nghiaaidev

标签

agentchattriggercodedatatableexecuteworkflowtriggerhtmllmchatopenaimemorybufferwindowrespondtowebhookset

n8n 新手?

n8n 是一款免费开源的工作流自动化工具,支持自托管或使用云版本。

免费获取 n8n →

Related Miscellaneous Workflows