Automate Short Links with Zapier, Make & Pipedream
You can create/update short links automatically whenever a form is submitted, a spreadsheet row is added, or an event happens in your app—no servers required. Below are lightweight patterns for Zapier, Make, and Pipedream. Replace the endpoint and fields with your ogli.sh details.
Zapier: Google Sheets → Webhooks by Zapier (POST)
- Trigger: Google Sheets → New Spreadsheet Row (map columns like
url
,title
,description
,image
,alias
). - Action: Webhooks by Zapier → POST
- URL:
https://api.ogli.sh/v1/links
- Headers:
Authorization: Bearer {{OGLI_API_KEY}}
,Content-Type: application/json
- Data (JSON):
{ "url": "{{123456789__URL}}", "alias": "{{123456789__ALIAS}}", "og": { "title": "{{123456789__TITLE}}", "description": "{{123456789__DESCRIPTION}}", "image": "{{123456789__IMAGE}}" }, "qr": { "enabled": true } }
- URL:
- Test: Send a row, inspect the response. Parse
url
. - Optional Action: Update Spreadsheet Row → write
url
back to the sheet.
Make.com (Integromat): Custom Webhook → HTTP
- Trigger: Webhooks module → Custom webhook. Copy the URL and send test JSON from your form/app.
- Action: HTTP module → Make a request
- Method: POST
- URL:
https://api.ogli.sh/link
- Headers:
Authorization: Bearer {{OGLI_API_KEY}}
,Content-Type: application/json
- Body type: Raw → JSON
- Map fields from the webhook to
targetUrl
,title
,description
,ogImage
, andogImageAlt
- Then: Add a Google Sheets “Add a Row” or an Email/SMS module with the new
shortUrl
.
Pipedream: HTTP Trigger → Node.js step
- Create a new workflow with HTTP / Webhook trigger. Copy the endpoint URL.
- Add a Node.js step:
import fetch from "node-fetch"; export default async (event, steps) => { const { url, alias, title, description, image } = event.body; const res = await fetch("https://api.ogli.sh/link", { method: "POST", headers: { "Authorization": `Bearer ${process.env.OGLI_API_KEY}`, "Content-Type": "application/json" }, body: JSON.stringify({ url, alias, og: { title, description, image }, qr: { enabled: true } }) }); const data = await res.json(); return { url: data.url, linkId: data.id, status: res.status }; };
- Connect a next step (e.g., write back to Sheets or send a Slack message).
Security & reliability
- Store
OGLI_API_KEY
in your platform’s Secrets, not in plain text. - Use platform retries on non-2xx responses; consider an
Idempotency-Key
header per row/record. - Rate limits: add small delays on bulk jobs to avoid bursts (100–300ms per call typically works well).
Troubleshooting
- 401 Unauthorized: check Bearer token and header names.
- 422/400 validation: ensure
url
is absolute; images are HTTPS and reachable. - Time-outs: reduce payload size; test with a single record; throttle bulk operations.