View as Markdown
L2S icon

L2S ACTION

Create Shortened URL

Generates a shortened URL utilizing L2S capabilities. See the documentation
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's L2S account once, then configure and run Create Shortened URL from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "l2s-create-shortened-url",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    l2s: { authProvisionId: "apn_xxxxxxx" },
    url: "URL",
    customKey: "Custom Key",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Create Shortened URL inputs
Property Type Description
url URL string
The URL to be shortened
Required
customKey Custom Key string
Custom key for the shortened URL
Optional
utmSource UTM Source string
UTM source parameter
Optional
utmMedium UTM Medium string
UTM medium parameter
Optional
utmCampaign UTM Campaign string
UTM campaign parameter
Optional
utmTerm UTM Term string
UTM term parameter
Optional
utmContent UTM Content string
UTM content parameter
Optional
title Title string
Title for the shortened URL
Optional
tags Tags string[]
Tags associated with the URL
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
l2s-create-shortened-url
Version
0.0.2
App
L2S
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes