8
n8n 中文网amn8n.com

Mastodon帖子转发

初级

这是一个Marketing领域的自动化工作流,包含 4 个节点。主要使用 Filter, HttpRequest, ScheduleTrigger 等节点。 将特定联邦宇宙账户的帖子/状态转发到您的Mastodon个人资料

前置要求
  • 可能需要目标 API 的认证凭证

分类

工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "name": "Post Threads to Mastodon",
  "nodes": [
    {
      "id": "30f525e7-1131-4cff-86d8-348505da9fb5",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        0,
        -180
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 23,
              "triggerAtMinute": 59
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "99773c0b-3d32-4819-99d2-03e3d6638813",
      "name": "Get statuses from threads.net",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        220,
        -180
      ],
      "parameters": {
        "url": "https://mastodon.social/api/v1/accounts/<ACCOUNT_ID>/statuses",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "c842ba51-42bf-466b-8128-aa8056c082a3",
      "name": "Filter today",
      "type": "n8n-nodes-base.filter",
      "position": [
        440,
        -180
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "2efb4760-9294-496b-aca7-4e6abb8dcf34",
              "operator": {
                "type": "dateTime",
                "operation": "afterOrEquals"
              },
              "leftValue": "={{ $json.created_at }}",
              "rightValue": "={{ new Date().toISOString().split('T')[0] }}\n"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "c6e8aa82-0e9c-42a3-b34a-ea130dbdaad7",
      "name": "Boost statuses",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        660,
        -180
      ],
      "parameters": {
        "url": "=https://mastodon.social/api/v1/statuses/{{ $json.id }}/reblog",
        "options": {},
        "requestMethod": "POST",
        "authentication": "headerAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "<ID WILL AUTOMATICALLY GENERATE>",
          "name": "<MASTODON_ACCESS_TOKEN>"
        }
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "c842ba51-42bf-466b-8128-aa8056c082a3": {
      "main": [
        [
          {
            "node": "c6e8aa82-0e9c-42a3-b34a-ea130dbdaad7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "30f525e7-1131-4cff-86d8-348505da9fb5": {
      "main": [
        [
          {
            "node": "99773c0b-3d32-4819-99d2-03e3d6638813",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "99773c0b-3d32-4819-99d2-03e3d6638813": {
      "main": [
        [
          {
            "node": "c842ba51-42bf-466b-8128-aa8056c082a3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

初级 - 营销

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
初级
节点数量4
分类1
节点类型3
难度说明

适合 n8n 新手,包含 1-5 个节点的简单工作流

作者
Suleman Hasib

Suleman Hasib

@sulemanhasib43

Photographer 📸 | Explorer 🌍 | Tech Leader 💻 | Passionate about systems & how things work | Sharing life’s journey

外部链接
在 n8n.io 查看

分享此工作流

分类

分类: 34