novu-dashboard-workflows

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Dashboard Workflows

Dashboard工作流

Rules for authoring step content (subject, body,
editorType
, headers, body, conditions) on workflows that live in the Novu Dashboard — whether you're editing them by hand or via the Novu MCP.
Authoring in code with
@novu/framework
? Skip this skill — the Framework SDK encodes these constraints in its types and helpers.
Still need to decide what the workflow should look like (channels, severity, critical, digest, templates)? Start with
design-workflow/
, then come back here to fill in the step content.
为Novu Dashboard中的工作流编写步骤内容(主题、正文、
editorType
、标头、正文、条件)的规则——无论你是手动编辑还是通过Novu MCP编辑。
若要通过
@novu/framework
以代码方式编写?请跳过本技能——Framework SDK已在其类型和工具中内置了这些约束。
仍需确定工作流的样式(渠道、优先级、关键级别、摘要、模板)?请从
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
    ,
    update_workflow_step
    , etc.)
每当你编写或编辑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 (
    editorType: "block"
    ) node attributes, never use curly braces — use bare variable names like
    payload.actionUrl
    instead of
    {{ payload.actionUrl }}
    . See
    references/email-step.md
    for the full Block Editor rules.
  • For steps after an HTTP Request step, use
    {{ steps.<http-step-id>.<property> }}
    to reference response data. Only properties defined in that HTTP step's
    responseBodySchema
    are available — never invent arbitrary response fields. Example: if HTTP step
    fetch-user
    defines
    responseBodySchema
    with
    name
    and
    email
    , use
    {{ steps.fetch-user.name }}
    and
    {{ 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
    editorType
    (
    block
    or
    html
    for email) and structure.
这些规则适用于所有步骤类型。
  • 在控件值中使用Liquid变量实现个性化。变量必须用双大括号
    {{
    }}
    包裹。示例:
    {{ subscriber.firstName }}
    {{ payload.* }}
  • 例外情况:在Block Editor(
    editorType: "block"
    )节点属性中,切勿使用大括号——应使用裸变量名,例如
    payload.actionUrl
    而非
    {{ payload.actionUrl }}
    。完整的Block Editor规则请参阅
    references/email-step.md
  • 对于HTTP Request步骤之后的步骤,使用
    {{ steps.<http-step-id>.<property> }}
    引用响应数据。仅可使用该HTTP步骤
    responseBodySchema
    中定义的属性——切勿随意创建响应字段。示例:如果HTTP步骤
    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 typeReferenceUse it for
Email
references/email-step.md
Detailed content, formal communications, receipts
In-App
references/in-app-step.md
Real-time updates, activity feeds, high engagement
SMS
references/sms-step.md
Urgent alerts, verification codes, time-sensitive messages
Push
references/push-step.md
Mobile engagement, re-engagement, time-sensitive updates
Chat
references/chat-step.md
Slack / Discord / Teams team & developer alerts
Delay
references/delay-step.md
Pause workflow execution before a channel step
Digest
references/digest-step.md
Batch multiple notifications into one
Throttle
references/throttle-step.md
Limit notification frequency, prevent fatigue
HTTP Request
references/http-request-step.md
Call external APIs / webhooks; fetch data for later steps
Step condition
references/step-conditions.md
JSON-Logic for "send only if…", merge / replace / remove
每种步骤类型都有其自身的内容规则。编写控件前,请打开对应的参考文档。
步骤类型参考文档适用场景
Email
references/email-step.md
详细内容、正式沟通、收据
In-App
references/in-app-step.md
实时更新、活动动态、高互动性通知
SMS
references/sms-step.md
紧急警报、验证码、时间敏感型消息
Push
references/push-step.md
移动端互动、重新激活用户、时间敏感型更新
Chat
references/chat-step.md
Slack / Discord / Teams团队及开发者警报
Delay
references/delay-step.md
在渠道步骤前暂停工作流执行
Digest
references/digest-step.md
将多条通知合并为一条
Throttle
references/throttle-step.md
限制通知频率,避免用户疲劳
HTTP Request
references/http-request-step.md
调用外部API/ webhook;为后续步骤获取数据
Step condition
references/step-conditions.md
JSON逻辑,用于"仅在…时发送"、合并/替换/移除步骤

Common Pitfalls

常见误区

  1. Curly braces inside Block Editor attributes — Maily TipTap node attrs (
    url
    ,
    text
    ,
    src
    ,
    id
    ,
    each
    ,
    href
    ,
    externalLink
    ) take bare variable names.
    "{{ payload.actionUrl }}"
    is wrong;
    "payload.actionUrl"
    is right. See
    references/email-step.md
    .
  2. Referencing undeclared HTTP response fields
    {{ steps.<http-step-id>.<property> }}
    only works for properties listed in that step's
    responseBodySchema
    . Add the property to the schema first.
  3. Hardcoding array items instead of looping — when the payload contains an array (
    payload.items
    ,
    payload.providers
    ), iterate with a Block Editor
    repeat
    node or an HTML
    {% for %}
    loop. Don't list array items as separate nodes / elements.
  4. Empty key/value entries in HTTP headers or body — use an empty array
    []
    when not needed. Never
    [{ "key": "", "value": "" }]
    .
  5. Hardcoded URLs / product names — always pull from
    payload.*
    or
    subscriber.*
    so the workflow stays portable.
  6. Changing
    editorType
    when editing email
    — keep
    block
    as
    block
    and
    html
    as
    html
    unless the user explicitly asks to switch.
  7. Replacing a step condition when the user said "add" — "add" / "also" / "and" merges with
    { "and": [...] }
    ; "change to" / "set to" replaces; "remove" / "clear" returns
    null
    . See
    references/step-conditions.md
    .
  1. Block Editor属性内使用大括号——Maily TipTap节点属性(
    url
    text
    src
    id
    each
    href
    externalLink
    )需使用变量名。
    "{{ payload.actionUrl }}"
    是错误的;
    "payload.actionUrl"
    才正确。详情请参阅
    references/email-step.md
  2. 引用未声明的HTTP响应字段——
    {{ steps.<http-step-id>.<property> }}
    仅对该步骤
    responseBodySchema
    中列出的属性有效。请先将属性添加到Schema中。
  3. 硬编码数组项而非循环遍历——当负载包含数组(
    payload.items
    payload.providers
    )时,使用Block Editor的
    repeat
    节点或HTML的
    {% for %}
    循环进行遍历。切勿将数组项列为单独的节点/元素。
  4. HTTP标头或正文中存在空键/值条目——无需使用时请用空数组
    []
    。切勿使用
    [{ "key": "", "value": "" }]
  5. 硬编码URL/产品名称——始终从
    payload.*
    subscriber.*
    中获取,确保工作流的可移植性。
  6. 编辑电子邮件时更改
    editorType
    ——保持
    block
    block
    html
    html
    ,除非用户明确要求切换。
  7. 用户要求"添加"时替换步骤条件——"添加"/"同时"/"和"需与
    { "and": [...] }
    合并;"更改为"/"设置为"表示替换;"移除"/"清除"则返回
    null
    。详情请参阅
    references/step-conditions.md

See Also

另请参阅

  • design-workflow/
    — choose channels, severity,
    critical
    , digest defaults, and pick a workflow template before authoring step content
  • framework-integration/
    — author the same workflows in code with
    @novu/framework
    instead
  • trigger-notification/
    — fire a workflow once it's authored
  • design-workflow/
    ——在编写步骤内容之前,选择渠道、优先级、
    critical
    级别、默认摘要设置,并选择工作流模板
  • framework-integration/
    ——改用
    @novu/framework
    以代码方式编写相同的工作流
  • trigger-notification/
    ——工作流编写完成后触发通知