Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何配合n8n推送消息 #6

Closed
jiyuhei opened this issue Sep 28, 2023 · 4 comments
Closed

如何配合n8n推送消息 #6

jiyuhei opened this issue Sep 28, 2023 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@jiyuhei
Copy link

jiyuhei commented Sep 28, 2023

我想推送语雀更新的消息,然后推送到微信上,但是我配置不出来,能否提供一下n8n的流程图,谢谢大佬

@danni-cool
Copy link
Owner

danni-cool commented Sep 28, 2023

  1. 在 n8n 工作流(workflows)中建立一条工作流
  2. 工作流的起始节点选择 on webhook call
    2.1 HTTP Method 选择 POST
    2.2 将该节点的 webhook Test URLs 拷贝到 语雀 -> 你的知识库管理 -> Webhook地址 -> 勾选你需要触发的推送 -> 点击添加推送,此时增加了一条 n8n 的 webhook 地址
    2.3 回到 n8n, 在 Webhook 节点开启 Listen For Test Event,开始侦听语雀知识库的推送
    2.4 再语雀你刚新增 webhook 的地方点击测试,确认 webhook 的连通性
    2.5 不出意外的话,在n8n节点上就能收到一条数据

结构大概如下

[
  {
    "headers": {
      "x-real-ip": "192.168.1.1",
      "host": "example.url:888",
      "x-forwarded-for": "192.168.1.1",
      "connection": "upgrade",
      "content-length": "154",
      "content-type": "application/json",
      "sofa-traceid": "ac136ax216951253845388971130",
      "sofa-rpcid": "0.1",
      "user-agent": "node-urllib/2.41.0 Node.js/16.20.2 (Linux 3.10; x64)"
    },
    "params": {},
    "query": {},
    "body": {
      "msgtype": "markdown",
      "markdown": {
        "title": "语雀测试消息",
        "text": "\n#### 这是一段测试内容\n**webhook 名称**: n8n语雀-微信工作流\n"
      }
    }
  }
]
  1. 回到n8n,再新建两个节点对数据进行组装和推送,分别是 Code 节点 和 Http Request 节点(数据格式参考我的文档)

整个流程是 语雀配置webhook -> n8n配置节点和组装数据(webhook call 节点 -> code 节点 -> http request 节点)

  1. 确保整个流程通了,把 webhook 节点 test url 换成 production url,需要在语雀重新配置一遍

@danni-cool
Copy link
Owner

danni-cool commented Sep 28, 2023

语雀推文到微信你可能想要 url 卡片,目前还不支持,可以给我提 issue,后面会支持

@danni-cool danni-cool added the help wanted Extra attention is needed label Sep 28, 2023
@wxyShine
Copy link

语雀推文到微信你可能想要 url 卡片,目前还不支持,可以给我提 issue,后面会支持

后续会实现wechaty 的全部功能吗,很不错的项目

@danni-cool
Copy link
Owner

danni-cool commented Sep 29, 2023

@wxyShine 感谢认可

wechaty相关后续TODO:#11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants