novu-dashboard-workflows
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDashboard Workflows
Dashboard工作流
Rules for authoring step content (subject, body, , headers, body, conditions) on workflows that live in the Novu Dashboard — whether you're editing them by hand or via the Novu MCP.
editorTypeAuthoring in code with? Skip this skill — the Framework SDK encodes these constraints in its types and helpers.@novu/frameworkStill need to decide what the workflow should look like (channels, severity, critical, digest, templates)? Start with, then come back here to fill in the step content.design-workflow/
为Novu Dashboard中的工作流编写步骤内容(主题、正文、、标头、正文、条件)的规则——无论你是手动编辑还是通过Novu MCP编辑。
editorType若要通过以代码方式编写?请跳过本技能——Framework SDK已在其类型和工具中内置了这些约束。@novu/framework仍需确定工作流的样式(渠道、优先级、关键级别、摘要、模板)?请从开始,之后再回到此处填写步骤内容。design-workflow/
When to use this skill
何时使用本技能
Use it whenever you write or edit the controls of a Dashboard / MCP step:
- "Set the email subject and body for this step"
- "Update the in-app notification copy"
- "Add headers to this HTTP Request step"
- "Change the digest window to 1 hour"
- "Skip this step when the subscriber is offline" (step condition)
- Any Novu MCP tool call that writes step content (,
create_workflow, etc.)update_workflow_step
每当你编写或编辑Dashboard / MCP步骤的控件时,均可使用本技能:
- "设置此步骤的电子邮件主题和正文"
- "更新应用内通知文案"
- "为此HTTP请求步骤添加标头"
- "将摘要窗口更改为1小时"
- "当订阅者离线时跳过此步骤"(步骤条件)
- 任何用于编写步骤内容的Novu MCP工具调用(、
create_workflow等)update_workflow_step
Step Content Guidelines
步骤内容指南
These rules apply to every step type.
- Use Liquid variables in control values for personalization. Variables must be wrapped in double curly braces and
{{. Example:}},{{ subscriber.firstName }}.{{ payload.* }} - EXCEPTION: In Block Editor () node attributes, never use curly braces — use bare variable names like
editorType: "block"instead ofpayload.actionUrl. See{{ payload.actionUrl }}for the full Block Editor rules.references/email-step.md - For steps after an HTTP Request step, use to reference response data. Only properties defined in that HTTP step's
{{ steps.<http-step-id>.<property> }}are available — never invent arbitrary response fields. Example: if HTTP stepresponseBodySchemadefinesfetch-userwithresponseBodySchemaandname, useemailand{{ steps.fetch-user.name }}.{{ steps.fetch-user.email }} - Never hardcode URLs, names, or product names — use variables instead.
- Keep content consistent with other workflow steps.
- Modify the content according to the user's intent.
- Preserve everything not explicitly asked to change.
- Keep the same (
editorTypeorblockfor email) and structure.html
这些规则适用于所有步骤类型。
- 在控件值中使用Liquid变量实现个性化。变量必须用双大括号和
{{包裹。示例:}}、{{ subscriber.firstName }}。{{ payload.* }} - 例外情况:在Block Editor()节点属性中,切勿使用大括号——应使用裸变量名,例如
editorType: "block"而非payload.actionUrl。完整的Block Editor规则请参阅{{ payload.actionUrl }}。references/email-step.md - 对于HTTP Request步骤之后的步骤,使用引用响应数据。仅可使用该HTTP步骤
{{ steps.<http-step-id>.<property> }}中定义的属性——切勿随意创建响应字段。示例:如果HTTP步骤responseBodySchema的fetch-user定义了responseBodySchema和name,则使用email和{{ steps.fetch-user.name }}。{{ steps.fetch-user.email }} - 切勿硬编码URL、名称或产品名称——请改用变量。
- 保持内容与其他工作流步骤一致。
- 根据用户意图修改内容。
- 保留未明确要求更改的所有内容。
- 保持相同的(电子邮件的
editorType或block)和结构。html
Step Types
步骤类型
Each step type has its own content rules. Open the matching reference before writing controls.
| Step type | Reference | Use it for |
|---|---|---|
| Detailed content, formal communications, receipts | |
| In-App | | Real-time updates, activity feeds, high engagement |
| SMS | | Urgent alerts, verification codes, time-sensitive messages |
| Push | | Mobile engagement, re-engagement, time-sensitive updates |
| Chat | | Slack / Discord / Teams team & developer alerts |
| Delay | | Pause workflow execution before a channel step |
| Digest | | Batch multiple notifications into one |
| Throttle | | Limit notification frequency, prevent fatigue |
| HTTP Request | | Call external APIs / webhooks; fetch data for later steps |
| Step condition | | JSON-Logic for "send only if…", merge / replace / remove |
每种步骤类型都有其自身的内容规则。编写控件前,请打开对应的参考文档。
| 步骤类型 | 参考文档 | 适用场景 |
|---|---|---|
| 详细内容、正式沟通、收据 | |
| In-App | | 实时更新、活动动态、高互动性通知 |
| SMS | | 紧急警报、验证码、时间敏感型消息 |
| Push | | 移动端互动、重新激活用户、时间敏感型更新 |
| Chat | | Slack / Discord / Teams团队及开发者警报 |
| Delay | | 在渠道步骤前暂停工作流执行 |
| Digest | | 将多条通知合并为一条 |
| Throttle | | 限制通知频率,避免用户疲劳 |
| HTTP Request | | 调用外部API/ webhook;为后续步骤获取数据 |
| Step condition | | JSON逻辑,用于"仅在…时发送"、合并/替换/移除步骤 |
Common Pitfalls
常见误区
- Curly braces inside Block Editor attributes — Maily TipTap node attrs (,
url,text,src,id,each,href) take bare variable names.externalLinkis wrong;"{{ payload.actionUrl }}"is right. See"payload.actionUrl".references/email-step.md - Referencing undeclared HTTP response fields — only works for properties listed in that step's
{{ steps.<http-step-id>.<property> }}. Add the property to the schema first.responseBodySchema - Hardcoding array items instead of looping — when the payload contains an array (,
payload.items), iterate with a Block Editorpayload.providersnode or an HTMLrepeatloop. Don't list array items as separate nodes / elements.{% for %} - Empty key/value entries in HTTP headers or body — use an empty array when not needed. Never
[].[{ "key": "", "value": "" }] - Hardcoded URLs / product names — always pull from or
payload.*so the workflow stays portable.subscriber.* - Changing when editing email — keep
editorTypeasblockandblockashtmlunless the user explicitly asks to switch.html - Replacing a step condition when the user said "add" — "add" / "also" / "and" merges with ; "change to" / "set to" replaces; "remove" / "clear" returns
{ "and": [...] }. Seenull.references/step-conditions.md
- Block Editor属性内使用大括号——Maily TipTap节点属性(、
url、text、src、id、each、href)需使用裸变量名。externalLink是错误的;"{{ payload.actionUrl }}"才正确。详情请参阅"payload.actionUrl"。references/email-step.md - 引用未声明的HTTP响应字段——仅对该步骤
{{ steps.<http-step-id>.<property> }}中列出的属性有效。请先将属性添加到Schema中。responseBodySchema - 硬编码数组项而非循环遍历——当负载包含数组(、
payload.items)时,使用Block Editor的payload.providers节点或HTML的repeat循环进行遍历。切勿将数组项列为单独的节点/元素。{% for %} - HTTP标头或正文中存在空键/值条目——无需使用时请用空数组。切勿使用
[]。[{ "key": "", "value": "" }] - 硬编码URL/产品名称——始终从或
payload.*中获取,确保工作流的可移植性。subscriber.* - 编辑电子邮件时更改——保持
editorType为block、block为html,除非用户明确要求切换。html - 用户要求"添加"时替换步骤条件——"添加"/"同时"/"和"需与合并;"更改为"/"设置为"表示替换;"移除"/"清除"则返回
{ "and": [...] }。详情请参阅null。references/step-conditions.md
See Also
另请参阅
- — choose channels, severity,
design-workflow/, digest defaults, and pick a workflow template before authoring step contentcritical - — author the same workflows in code with
framework-integration/instead@novu/framework - — fire a workflow once it's authored
trigger-notification/
- ——在编写步骤内容之前,选择渠道、优先级、
design-workflow/级别、默认摘要设置,并选择工作流模板critical - ——改用
framework-integration/以代码方式编写相同的工作流@novu/framework - ——工作流编写完成后触发通知
trigger-notification/