【n8n应用1】订阅地铁消息到钉钉、飞书通知

1 篇文章 0 订阅

效果图

n8n workflow

image.png

dingding notice

image.png

feishu notice

image.png

n8n node

Start

image.png

Starts the workflow execution from this node

Cron

image.png

Triggers the workflow at a specific time

Mode建议选择Custom,Cron Expression配置为0 1 0 * * *(每天凌晨0点1分执行)

RSS Read

image.png

Reads data from an RSS Feed

URL填写:http://xxx/rsshub/weibo/user/1896374647

IF

image.png

Splits a stream based on comparisons

String: (只查看长春、北京、沈阳)
	value1: {{$json["title"]}}
	Operation: Regex
	Regex: .*(长春|北京|沈阳).*
	
Date & Time: (只发送一天内消息)
	Value1: {{$json["isoDate"]}}
	Operation: Occurred after
	Value2: {{new Date(new Date().getFullYear(), new Date().getMonth(),new Date().getDate())}}
	Value1: {{$json["isoDate"]}}
	Operation: Occurred before
	Value2: {{new Date(new Date().getFullYear(), new Date().getMonth(),new Date().getDate()+1)}}

image.png

HTTP Request

image.png

Makes an HTTP request and returns the response data

飞书提醒

https://open.feishu.cn/open-apis/bot/v2/hook/xxx

{
  "msg_type": "interactive",
  "card": {
    "config": {
      "wide_screen_mode": true
    },
    "elements": [
      {
        "tag": "markdown",
        "content": "<a href={{$node["RSS Feed Read"].json["link"]}}>{{$node["RSS Feed Read"].json["title"]}}</a>"
      }
    ]
  }
}

钉钉提醒

https://oapi.dingtalk.com/robot/send?access_token=xxx

{
  "msgtype": "markdown",
  "markdown": {
    "title": "北京、沈阳、长春地铁信息",
    "text": "[{{$node["RSS Feed Read"].json["title"]}}]({{$node["RSS Feed Read"].json["link"]}})"
  }
}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值