Publicaciones en Bluesky desde RSS
Marketing
Aitor
(@TuXeD)
Este workflow automatiza el proceso de creación y publicación de posts en Bluesky utilizando contenido extraído de un feed RSS. Cada vez que se detecta un nuevo artículo, se autentica al usuario, se extraen metadatos como título, descripción, imagen y enlace, y se sube la imagen al servidor de Bluesky antes de generar el post completo. Ideal para mantener un flujo constante de publicaciones actualizadas sin intervención manual.
Creado: 2024-11-30
9 nodos
Instrucciones
Editar Workflow
Visualización del Workflow
{
"name": "Bsky post",
"nodes": [
{
"parameters": {
"method": "POST",
"url": "https://bsky.social/xrpc/com.atproto.server.createSession",
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "identifier",
"value": "={{ $json.usuario }}"
},
{
"name": "password",
"value": "={{ $json.password }}"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
-360,
0
],
"id": "d35ebb0f-9fa6-43d1-9a5b-74f7964d326a",
"name": "Create Token"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "a6c73e13-edcb-40ed-8f90-d116687b5514",
"name": "usuario",
"value": "tusuario",
"type": "string"
},
{
"id": "43dea323-0420-49d8-bc6f-b0223e3ccac4",
"name": "password",
"value": "tupassword",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
-600,
0
],
"id": "48f7c930-55d9-4064-9e8d-5fa68ac72306",
"name": "Configurar"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "28c65312-d226-41e0-9945-7c1583e89bd6",
"name": "token",
"value": "={{ $json.accessJwt }}",
"type": "string"
},
{
"id": "7d828719-29ad-4430-88fb-865936ed6fe9",
"name": "handle",
"value": "={{ $json.handle }}",
"type": "string"
},
{
"id": "5a27bcd1-a707-4af7-bc9b-fce1ee0a7cbc",
"name": "url",
"value": "={{ $('RSS Feed Trigger').item.json.link }}",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
-120,
0
],
"id": "59123da1-06c7-4b0a-b3de-fa7f90901f39",
"name": "Extract"
},
{
"parameters": {
"url": "=https://imgs.nocodeopensource.io/unsafe/rs:fit:600:338:1/g:ce/plain/{{ $json.ogImage }}@jpeg",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
-220,
240
],
"id": "3d6604b5-5294-4392-b7e0-497988fbf4e5",
"name": "GetImage"
},
{
"parameters": {
"method": "POST",
"url": "https://bsky.social/xrpc/com.atproto.repo.createRecord",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Bearer {{ $('Create Token').item.json.accessJwt }}"
}
]
},
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"repo\": \"aitorroma.bsky.social\",\n \"collection\": \"app.bsky.feed.post\",\n \"record\": {\n \"$type\": \"app.bsky.feed.post\",\n \"text\": \"Nuevo Post disponible \ud83e\uddd1\u200d\ud83d\udcbb\",\n \"createdAt\": \"{{new Date().toISOString()}}\",\n \"embed\": {\n \"$type\": \"app.bsky.embed.external\",\n \"external\": {\n \"uri\": \"{{ $('Extract Metatags').item.json.ogURL }}\",\n \"title\": \"{{ $('Extract Metatags').item.json.ogTitle }}\",\n \"description\": \"{{$('Extract Metatags').item.json.ogDecription }}\",\n \"thumb\": {\n \"$type\": \"blob\",\n \"ref\": {\n \"$link\": \"{{ $json.blob.ref[\"$link\"] }}\"\n },\n \"mimeType\": \"image/jpeg\",\n \"size\": {{ $json.blob.size }}\n }\n }\n }\n }\n} ",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
160,
240
],
"id": "50679cd1-bc51-4967-934a-641e0235cfa9",
"name": "Post"
},
{
"parameters": {
"method": "POST",
"url": "https://bsky.social/xrpc/com.atproto.repo.uploadBlob",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Bearer {{ $('Create Token').item.json.accessJwt }}"
},
{
"name": "Content-Type",
"value": "image/jpeg"
}
]
},
"sendBody": true,
"contentType": "binaryData",
"inputDataFieldName": "data",
"options": {}
},
"id": "c5f841c9-90b2-4716-bc30-99c9bd35d3f5",
"name": "Upload image",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.1,
"position": [
-40,
240
],
"notesInFlow": true
},
{
"parameters": {
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"feedUrl": "https://nocodeopensource.io/blog/rss/"
},
"type": "n8n-nodes-base.rssFeedReadTrigger",
"typeVersion": 1,
"position": [
-860,
0
],
"id": "a97337cc-e522-4559-ab8a-b4a4f6af30f9",
"name": "RSS Feed Trigger"
},
{
"parameters": {
"url": "={{ $json.url }}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
120,
0
],
"id": "1758840e-bb48-41d8-af49-396e61bac57f",
"name": "getWebsite"
},
{
"parameters": {
"operation": "extractHtmlContent",
"extractionValues": {
"values": [
{
"key": "ogTitle",
"cssSelector": "meta[property^=\"og:title\"], meta[name=\"og:title\"], meta[property=\"twitter:title\"], meta[name=\"twitter:title\"]",
"returnValue": "attribute",
"attribute": "content"
},
{
"key": "ogDecription",
"cssSelector": "meta[name=\"description\"], meta[property=\"og:description\"], meta[property=\"twitter:description\"]",
"returnValue": "attribute",
"attribute": "content"
},
{
"key": "ogImage",
"cssSelector": "meta[property^=\"og:image\"], meta[name=\"og:image\"], meta[property=\"twitter:image\"], meta[name=\"twitter:image\"]",
"returnValue": "attribute",
"attribute": "content"
},
{
"key": "ogURL",
"cssSelector": "meta[property=\"og:url\"], meta[name=\"twitter:url\"]",
"returnValue": "attribute",
"attribute": "content"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.html",
"typeVersion": 1.2,
"position": [
-420,
240
],
"id": "fb2c8c5f-c267-4b77-a6ed-0cbfdbbaddc4",
"name": "Extract Metatags"
}
],
"pinData": {},
"connections": {
"Configurar": {
"main": [
[
{
"node": "Create Token",
"type": "main",
"index": 0
}
]
]
},
"Create Token": {
"main": [
[
{
"node": "Extract",
"type": "main",
"index": 0
}
]
]
},
"Extract": {
"main": [
[
{
"node": "getWebsite",
"type": "main",
"index": 0
}
]
]
},
"GetImage": {
"main": [
[
{
"node": "Upload image",
"type": "main",
"index": 0
}
]
]
},
"Upload image": {
"main": [
[
{
"node": "Post",
"type": "main",
"index": 0
}
]
]
},
"RSS Feed Trigger": {
"main": [
[
{
"node": "Configurar",
"type": "main",
"index": 0
}
]
]
},
"getWebsite": {
"main": [
[
{
"node": "Extract Metatags",
"type": "main",
"index": 0
}
]
]
},
"Extract Metatags": {
"main": [
[
{
"node": "GetImage",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "d865a28e-f18c-49f4-9de4-32727e9b76d3",
"meta": {
"instanceId": "33738330930e3881dd5571eca013f36ddf8aab20e4ea5c1f2ebaf4a2b4668ac6"
},
"id": "KgVuB0XUxzN0Kykc",
"tags": []
}