Skip to main content

Integraciones con otras herramientas

Shlink tiene una API REST completa que puedes integrar con cualquier herramienta.

Integracion con n8n​

Si tienes n8n desplegado, puedes automatizar la creacion de enlaces cortos.

Crear enlaces automaticamente​

  1. En n8n, agrega un nodo HTTP Request
  2. Configura:
    • Metodo: POST
    • URL: https://tu-shlink.deployalo.com/rest/v3/short-urls
    • Headers: X-Api-Key: TU_API_KEY
    • Body: JSON con longUrl

Ejemplo: Acortar URLs de nuevos posts​

Trigger: Nuevo post en WordPress
↓
HTTP Request: Crear short URL en Shlink
↓
Slack: Notificar con el enlace corto

Integracion con Zapier/Make​

Crear Zap​

  1. Trigger: El evento que quieras (nuevo lead, nuevo post, etc.)
  2. Action: Webhooks by Zapier > POST
  3. Configura la URL y API Key de Shlink

API Endpoints utiles​

Crear enlace​

POST /rest/v3/short-urls
{
"longUrl": "https://...",
"customSlug": "mi-slug",
"tags": ["marketing"]
}

Listar enlaces​

GET /rest/v3/short-urls?page=1&itemsPerPage=20

Estadisticas de un enlace​

GET /rest/v3/short-urls/{shortCode}/visits

Eliminar enlace​

DELETE /rest/v3/short-urls/{shortCode}

Webhooks (Notificaciones)​

Shlink puede notificarte cuando alguien hace clic en un enlace.

Configurar webhook​

Agrega a tus variables de entorno:

VISITS_WEBHOOKS=https://tu-webhook.com/shlink

Shlink enviara un POST con:

{
"shortUrl": {
"shortCode": "abc123",
"longUrl": "https://..."
},
"visit": {
"referer": "https://twitter.com",
"userAgent": "...",
"visitLocation": {
"countryCode": "MX"
}
}
}

Casos de uso​

Marketing​

  1. Crea enlaces para cada campana con tags
  2. Usa el mismo slug en todas las plataformas
  3. Compara estadisticas por tag

Impresiones (offline)​

  1. Genera QR codes para flyers/carteles
  2. Rastrea cuantas personas escanean
  3. Cambia el destino sin reimprimir

Afiliados​

  1. Crea enlaces por producto/partner
  2. Rastrea conversiones con tags
  3. Comparte reportes con partners

Redes sociales​

  1. Acorta URLs para bio de Instagram
  2. Rastrea clics por plataforma
  3. Cambia destino segun campanas