# URL management via AI agent: shorten, expand, track with YOURLS and n8n
This template enables an AI agent to manage short URLs on demand — shorten long links, expand shortened ones, and retrieve click statistics. Built on an MCP server in n8n and integrated with YOURLS, the automation is triggered via AI tool calls and is ideal for systems where agents need seamless URL handling without manual input.
## Who it´s for
- Developers building AI agents with URL shortening capabilities
- Automation administrators using MCP in n8n
- Marketers who need to quickly generate and track short links
## What the automation does
- Receives requests from an AI agent to shorten, expand, or get stats for a URL
- Processes the request via MCP server in n8n
- Executes the action using YOURLS API
- Returns the result to the agent for user display
- Operates as an AI tool within an automated agent system
## What´s included
- Ready-to-use n8n workflow with configured MCP server
- Logic for handling three request types: Shorten, Expand, Get stats
- Integration with YOURLS via API
- Basic text instructions for setup and adaptation
## Requirements for setup
- n8n instance with MCP server access
- Self-hosted or external YOURLS instance with API enabled
- YOURLS API key for authentication
- Configured execution environment (self-hosted or cloud)
## Benefits and outcomes
- Eliminates manual URL management
- Enables AI agents to treat URLs as actionable data
- Speeds up link creation and tracking for marketing campaigns
- Centralizes URL control within automated workflows
- Reduces errors in link expansion or generation
- Scales AI tools with extended functionality
## Important: template only
Important: you are purchasing a ready-made automation workflow template only. Rollout into your infrastructure, connecting specific accounts and services, 1:1 setup help, custom adjustments for non-standard stacks and any consulting support are provided as a separate paid service at an individual rate. To discuss custom work or 1:1 help, contact via chat
No feedback yet