docs(skill): document sendNotification action (7 actions total) + CLI support
- skill: SKILL.md (7 actions in description + routing table entry), action-types.md (new section #4 sendNotification: config keys, variables, system-in-app semantics), automation-guide.md/cli-reference.md (--to-user/--title/--message/--severity/--path), development.md (7 actions), metadata.json abstract - cli: action add --type sendNotification now builds config from granular flags (toUserId/title/message/severity/path); ACTION_TYPES includes sendNotification; live-verified via workflow create + action add + delete
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
# Action Types Reference
|
||||
|
||||
All 6 actions of the inkreach-teable automation engine. Actions run in topological order after the trigger; each receives the merged upstream output.
|
||||
All 7 actions of the inkreach-teable automation engine. Actions run in topological order after the trigger; each receives the merged upstream output.
|
||||
|
||||
An action node:
|
||||
```json
|
||||
{
|
||||
"id": "node-2",
|
||||
"type": "action",
|
||||
"category": "<one of the 6 types below>",
|
||||
"category": "<one of the 7 types below>",
|
||||
"config": { ... },
|
||||
"name": null
|
||||
}
|
||||
@@ -158,11 +158,40 @@ inkreach-teable action add <wfId> --type httpRequest \
|
||||
- GET/HEAD do not send a body.
|
||||
|
||||
**Output:** `{ "statusCode": 200, "headers": {...}, "body": <parsed> }`
|
||||
- Non-2xx still returns output but the node status is `failed`.
|
||||
|
||||
---
|
||||
|
||||
## 4. createRecord — Create records
|
||||
## 4. sendNotification — System in-app notification (站内信,非邮件)
|
||||
|
||||
```bash
|
||||
inkreach-teable action add <wfId> --type sendNotification \
|
||||
--to-user usr4ioKJl6XpZgyFhxW \
|
||||
--title '新工单' --message '工单 {{n0.record.id}} 已创建' \
|
||||
--severity info
|
||||
```
|
||||
|
||||
**Config:**
|
||||
```json
|
||||
{
|
||||
"toUserId": "usr4ioKJl6XpZgyFhxW",
|
||||
"title": "新工单",
|
||||
"message": "工单 {{n0.record.id}} 已创建",
|
||||
"path": "/base/bseX/table/tblY",
|
||||
"severity": "info"
|
||||
}
|
||||
```
|
||||
- `toUserId`: recipient user ID (required). Can reference the trigger user with `{{n0.user.id}}` (submitter/operator — only populated on user-initiated triggers; scheduled/webhook resolve to empty).
|
||||
- `title` + `message`: notification text; both support `{{nodeId.path}}` variables. If title set, rendered as `title\nmessage`.
|
||||
- `path` (optional): click-through URL in the notification center.
|
||||
- `severity`: `info` (default) | `warning` | `critical`.
|
||||
|
||||
**IMPORTANT**: this is a **system in-app notification** (bell badge + notification center + realtime socket push). It calls `NotificationService.sendCommonNotify` with `type=system` and **no email config — no email is sent**. Prefer it over `sendEmail` unless an actual email is required.
|
||||
|
||||
**Output:** `{ "sentCount": 1, "invalidUserIds": [], "toUserId": "usr..." }`
|
||||
|
||||
---
|
||||
|
||||
## 5. createRecord — Create records
|
||||
|
||||
```bash
|
||||
inkreach-teable action add <wfId> --type createRecord \
|
||||
@@ -184,7 +213,7 @@ inkreach-teable action add <wfId> --type createRecord \
|
||||
|
||||
---
|
||||
|
||||
## 5. updateRecord — Update records
|
||||
## 6. updateRecord — Update records
|
||||
|
||||
```bash
|
||||
inkreach-teable action add <wfId> --type updateRecord \
|
||||
@@ -206,7 +235,7 @@ inkreach-teable action add <wfId> --type updateRecord \
|
||||
|
||||
---
|
||||
|
||||
## 6. getRecords — Query records
|
||||
## 7. getRecords — Query records
|
||||
|
||||
```bash
|
||||
inkreach-teable action add <wfId> --type getRecords \
|
||||
|
||||
Reference in New Issue
Block a user