
TinyURL Shortener via Webhook
描述
分类
📢 Marketing
使用的节点
n8n-nodes-base.webhookn8n-nodes-base.stickyNoten8n-nodes-base.stickyNoten8n-nodes-base.httpRequestn8n-nodes-base.respondToWebhook
价格免费
浏览量0
最后更新11/28/2025
workflow.json
{
"id": "yb95HguPBwk8gDXZ",
"meta": {
"instanceId": "1777696fb9fddfee653e70940936c2b1e28ba1f1bde53b7182fbd6eb01988706"
},
"name": "TinyURL Shortener via Webhook",
"tags": [],
"nodes": [
{
"id": "f62dff88-eb8d-4147-9935-ad599675c710",
"name": "Note for TinyURL API Request",
"type": "n8n-nodes-base.stickyNote",
"position": [
80,
180
],
"parameters": {
"width": 300,
"height": 280,
"content": "This node sends a POST request to the TinyURL API to create a shortened URL. It expects 'api_token' and 'url' from the incoming webhook body. The 'domain', 'alias', and 'description' are optional."
},
"typeVersion": 1
},
{
"id": "47315623-8e56-4257-8543-22eda1999b27",
"name": "Note for Respond to Webhook",
"type": "n8n-nodes-base.stickyNote",
"position": [
520,
140
],
"parameters": {
"width": 320,
"height": 340,
"content": "This node sends the response from the TinyURL API (the shortened URL and any other relevant data) back to the original caller of the webhook. You can insert other nodes before this one to process the shortened URL (e.g., save to a database, send in a message) before responding."
},
"typeVersion": 1
},
{
"id": "0b43798d-91cd-4b8e-9e83-c6a7b3f8d5d9",
"name": "Create TinyURL",
"type": "n8n-nodes-base.httpRequest",
"position": [
180,
300
],
"parameters": {
"url": "=https://api.tinyurl.com/create",
"method": "=POST",
"options": {},
"jsonBody": "{\n \"url\": \"={{ $json.body.url }}\",\n \"domain\": \"tinyurl.com\",\n \"alias\": \"={{ $json.body.alias || '' }}\",\n \"description\": \"={{ $json.body.description || '' }}\"\n}",
"sendBody": true,
"sendQuery": true,
"specifyBody": "json",
"queryParameters": {
"parameters": [
{
"name": "api_token",
"value": "={{ $json.body.api_key }}"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "f297249f-8f4d-4fc8-aced-d94d3521c0fe",
"name": "Receive Link Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
-160,
300
],
"webhookId": "286a3703-ed0c-4097-a686-b1177854c31c-unique-id",
"parameters": {
"path": "shorten-link",
"options": {},
"httpMethod": "POST",
"responseMode": "responseNode"
},
"typeVersion": 2
},
{
"id": "5f1a017f-43ef-4b77-a549-78f57c05bcc7",
"name": "Respond with Shortened URL",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
640,
300
],
"parameters": {
"options": {},
"respondWith": "allIncomingItems"
},
"typeVersion": 1.2
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "e476b1c7-977c-4c37-bb28-bea8441b1014",
"connections": {
"Create TinyURL": {
"main": [
[
{
"node": "Respond with Shortened URL",
"type": "main",
"index": 0
}
]
]
},
"Receive Link Webhook": {
"main": [
[
{
"node": "Create TinyURL",
"type": "main",
"index": 0
}
]
]
}
}
}