让我们告别【I'm rich】,欢迎【来就有】

79 条回复
367 次浏览

展示昨天的投票结果

image

关于打赏的脚本进行说明一下,我发的帖子,以及我在其他的帖子下的回复,都会触发脚本,one post one time。

经过之前的测试,脚本运行正常,所以这次也同时将脚本分享给大家耍耍。

脚本下载地址(在 n8n 中导入即可)

image

image

使用前准备

配置 Variables(变量)

在 n8n 中设置以下变量:

  • 2LibraUsername - 你的 2Libra 用户名/邮箱
  • 2LibraPassword - 你的 2Libra 密码

创建 DataTables

auth_tokens 表

字段:

  • accessToken (string)
  • refreshToken (string)
  • accessExpires (number)
  • refreshExpires (number)
  • createdAt (datetime) - 自动
  • updatedAt (datetime) - 自动

reward_history 表

字段:

  • commentId (string)
  • postId (string)
  • fromUserId (string)
  • fromUsername (string)
  • amount (number)
  • status (number)
  • message (string)
  • createdAt (datetime) - 自动
  • updatedAt (datetime) - 自动

配置 Webhook

导入 AutoReward 工作流后,在 2Libra 网站的通知设置中配置 webhook URL。

❤️2
👍3
🔥1
525
种子用户

好像不行啊 而且这个跑起来 他是

正在侦听测试事件
向以下地址发送 POST 请求

一旦这个地址收到请求了,他就停止监听了是么

种子用户

@bopomofo 这个打开了 但是我用 curl 触发一次 第二次请求的时候 还是报错 说需要启动工作流。

这个 webhook 我配置了,不过我配置的是我的本地 ip,我想了下,这个不行,需要一个外网的 ip 或者域名。这样本站才能请求的到。

$curl -XPOST http://localhost:5678/webhook-test/2Libra
{"message":"Workflow was started"}

$curl -XPOST http://localhost:5678/webhook-test/2Libra
{"code":404,"message":"The requested webhook "2Libra" is not registered.","hint":"Click the 'Execute workflow' button on the canvas, then try again. (In test mode, the webhook only works for one call after you click this button)","stacktrace":"ResponseError: The requested webhook "2Libra" is not registered.\n at TestWebhooks.getWebhookMethods (/usr/local/lib/node_modules/n8n/src/webhooks/test-webhooks.ts:232:37)\n at processTicksAndRejections (node:internal/process/task_queues:105:5)\n at TestWebhooks.executeWebhook (/usr/local/lib/node_modules/n8n/src/webhooks/test-webhooks.ts:83:22)\n at WebhookRequestHandler.handleRequest (/usr/local/lib/node_modules/n8n/src/webhooks/webhook-request-handler.ts:66:21)\n at /usr/local/lib/node_modules/n8n/src/webhooks/webhook-request-handler.ts:257:3"}%

发表一个评论

R保持