The y.gy API allows users to shorten URLs dynamically, providing a way to manage and track URL performance in applications or marketing campaigns. Using this API on Pipedream, you can automate URL shortening and integrate these activities with other services like databases, analytics tools, or CRM systems. This capability is particularly valuable in scenarios involving high-volume link generation, targeted content distribution, and real-time link performance analysis.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
y_gy: {
type: "app",
app: "y_gy",
}
},
async run({steps, $}) {
const data = {
"destination_url": "https://pipedream.com",
}
return await axios($, {
method: "post",
url: `https://api.y.gy/api/v1/link`,
headers: {
"api-key": `${this.y_gy.$auth.api_key}`,
},
data,
})
},
})
Automated URL Shortening for Social Media Posts: Automatically shorten URLs when posting to social media platforms like Twitter or Facebook. Whenever content is scheduled or published from a CMS, trigger a workflow in Pipedream that shortens the URL using y.gy and posts the new, shortened link along with the content automatically to the targeted social media.
Dynamic Link Generation for Email Marketing Campaigns: Enhance email marketing efforts by using Pipedream to integrate y.gy with email platforms like SendGrid or Mailchimp. Automatically shorten URLs when sending out bulk or personalized emails, ensuring that links are trackable and tidy. This workflow can be set to generate links as emails are being drafted, or dynamically as they are sent.
Real-Time Analytics for Shortened URLs: Connect y.gy with analytics tools like Google Analytics through Pipedream. Set up a workflow that captures data on who clicks the shortened URLs and when, and feed this data into analytics tools for real-time analysis. This can be used for A/B testing different URLs in marketing campaigns to see which performs better in real-time.
Get a list of the links created by the authenticated account See the documentation
y.gy uses API keys for authentication. When you connect your y.gy account, Pipedream securely stores the keys so you can easily authenticate to y.gy APIs in both code and no-code steps.