-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathACS::Approve::DingTalkWebhook.yml
127 lines (127 loc) · 4.17 KB
/
ACS::Approve::DingTalkWebhook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
FormatVersion: OOS-2019-06-01
Description:
name-en: ACS::Approve::DingTalkWebhook
name-zh-cn: 发送审批通知(DingTalk)
en: Send notification requesting approval to DingTalk via webhook. Execution will remain suspended until approved or denied. For details, please see the <a href='https://open.dingtalk.com/document/isvapp/message-type' target='_blank'>documentation</a>
zh-cn: 通过webhook向DingTalk发送请求批准的通知。执行将保持暂停状态,直到批准或拒绝。详情请查看<a href='https://open.dingtalk.com/document/isvapp/message-type' target='_blank'>文档</a>
Parameters:
webhook:
Label:
en: DingTalk Webhook
zh-cn: DingTalk Webhook
Description:
en: <a href='https://help.aliyun.com/zh/oos/use-cases/use-oos-to-configure-the-approval-process#section-iqc-0ul-vpy' target='_blank' >Get DingTalk Webhook</a>
zh-cn: <a href='https://help.aliyun.com/zh/oos/use-cases/use-oos-to-configure-the-approval-process#section-iqc-0ul-vpy' target='_blank'>获取钉钉Webhook</a>
Type: String
Default: https://oapi.dingtalk.com/robot/send?access_token=12345678900000
msgtype:
Label:
en: Message type
zh-cn: 消息类型
Description:
en: Message types
zh-cn: 消息类型
Type: String
AllowedValues:
- text
- link
- markdown
Default: text
text:
Label:
en: Text param
zh-cn: 文本参数
Description:
en: Text param. If msgtype is text, this field is needed
zh-cn: 文本参数。如果msgtype为text,则需要输入该字段
Type: Json
Default:
content: 我就是我, 是不一样的烟火
AssociationPropertyMetadata:
Visible:
Condition:
Fn::Equals:
- ${msgtype}
- text
link:
Label:
en: Link param
zh-cn: 链接参数
Description:
en: Link param. If msgtype is link, this field is needed
zh-cn: 链接参数。如果“msgtype”为“link”,则需要输入该字段
Type: Json
Default:
text: 这是Link消息
title: 这是一个Link消息
picUrl: https://img.alicdn.com/tfs/TB1NwmBEL9TBuNjy1zbXXXpepXa-2400-1218.png
messageUrl: https://open.dingtalk.com/document/
AssociationPropertyMetadata:
Visible:
Condition:
Fn::Equals:
- ${msgtype}
- link
markdown:
Label:
en: MarkDown param
zh-cn: MarkDown参数
Description:
en: MarkDown param. If msgtype is markdown, this field is needed
zh-cn: MarkDown参数。如果msgtype为markdown,则需要此字段
Type: Json
Default:
title: 杭州天气
text: |
#### 杭州天气
> 9度,西北风1级,空气良89,相对温度73%
> ![screenshot](https://img.alicdn.com/tfs/TB1NwmBEL9TBuNjy1zbXXXpepXa-2400-1218.png)
> ###### 10点20分发布 [天气](https://www.dingalk.com)
AssociationPropertyMetadata:
Visible:
Condition:
Fn::Equals:
- ${msgtype}
- markdown
at:
Label:
en: '@ people to read the notification'
zh-cn: '@人们阅读通知'
Description:
en: '@ people to read the notification'
zh-cn: '@人们阅读通知'
Type: Json
Default:
atMobiles:
- 150XXXXXXXX
atUserIds:
- user123
isAtAll: false
AssociationPropertyMetadata:
Visible:
Condition:
Fn::Or:
- Fn::Equals:
- ${msgtype}
- text
- Fn::Equals:
- ${msgtype}
- markdown
Tasks:
- Name: approveDingTaskWebhook
Action: ACS::Approve
Description:
en: Sends notification to DingTalk via webhook for asking approval. The execution remains paused until approved or rejected.
zh-cn: 通过webhook向DingTalk发送请求批准的通知。执行仍暂停直到批准或拒绝。
Properties:
NotifyType: WebHook
WebHook:
URI: '{{ webhook }}'
Headers:
Content-Type: application/json
Content:
msgtype: '{{ msgtype }}'
text: '{{ text }}'
link: '{{ link }}'
markdown: '{{ markdown }}'
at: '{{ at }}'