Notify

View as Markdown

The notify expression is currently in Limited Preview and is to only be used with Ambient Agents at this time. If not used with ambient agents, you may encounter unpredictable behavior.

Overview

Notify pulls compound actions into the chat spotlight, sending messages to specific users with embedded actions, shown as buttons, that can perform various actions when clicked.

Action Types

TypeFunction
Content ActionDeliver an inline message. Ideal for links or summaries
System ActionTriggers an action or compound action with input arguments
Conversation ActionStarts a conversation process. Inputs args must be declared as slots in the process.

❗️ IMPORTANT NOTE:

Requirements for Calling a Conversation Action

To ensure your action is triggered correctly, please note the following:

  • Use the Conversational Process Name: When calling the action, specify the name of the conversational process itself, not the name of the plugin.
  • Publish the Process as a Plugin: The conversational process will not be triggered by the notify key unless it has also been published as a plugin.
  • Conversational Action input_args: These must be declared as slots in the conversational process in order to reference the data passed in as input args.

Low-Code Editor

Add a Notify step, define the recipient, the content of the message they are receiving, and what actions they’ll be provided with.

  1. Prepare Essentials: Set the notification’s recipient and informational message.

  1. Add Actionable Task: Add a button that can trigger an HTTP, compound, or script action.

  1. Start a Conversation: Add a button that invokes a conversational flow with the user.

  1. Add More Content: Provide a button that provides inline content that doesn’t require fetching or starting a conversation.

Syntax Reference

Schema

1notify: # Delivers message + buttons to user
2 output_key: RESULT_VAR* # str: Stores interaction results
3 recipient_id: USER_ID* # str: e.g., data.user.id
4 message: MSG_EXPR* # DSL str or RENDER() template
5 resources: # Optional list[dict] only available in pro-code
6 - name: RESOUCE_NAME # str: no dsl evaluation just type out string
7 datatype: DATA_TYPE # datatype: no dsl evaluation just type out string
8 value: VAL # DSL of datatype declared above
9 actions: # Optional list[dict]
10 - key: ACTION_KEY # Unique str ID
11 label: BUTTON_TEXT # Display DSL str
12 # ONE of:
13 content_action:
14 message: CONTENT_MSG
15 system_action:
16 action_name: ACTION_NAME
17 input_args:
18 key: VAL
19 conversation_action:
20 conversation_process_name: PROCESS_NAME # Published plugin
21 input_args:
22 slot_name: VAL # Match process slots

Fields

FieldTypeMandatoryDescription
output_keystringYesCapture’s button outcome. Currently returns NULL
recipient_idstringYesID of the target user
messagestringYesDSL expression field
actionslist[dict]NoButtons displayed to user
resourceslist[dict]noPass additional context to the reasoning engine

Resources Schema

FieldTypeMandatoryDescription
namestringYesName of the resource
datatypestringYesDatatype of value; options here
valueanyYesDSL expression field: Value of data to pass as context

Action Types

FieldKeysUse Case
content_actionmessageQuick info drops.
system_actionaction_name, input_argsInvoke actions
conversation_actionconversation_process_name, input_argsStart conversation processes

Resources

Resources are an optional field that can be used in the pro-code syntax. These are used for passing additional data as context for the LLM. These can be used situationally for giving the llm additional data to reference when using a follow up action such as passing a string to the LLM for SDA reasoning.

"instructions": "Analyze the data for the top commented on tickets"

Example 1: Enforcing specific analysis on an action button click

1# input args: data.tickets
2notify:
3 output_key: user_choice
4 recipient_id: data.target_user.id
5 message:
6 RENDER():
7 template: "Click the button below for insights on the top commented tickets"
8 args:
9 id: data.ticket.id
10 resources:
11 - name: instructions
12 datatype: string
13 value: '"Analyze the data for the top commented on tickets"'
14 actions:
15 - key: view
16 label: "'View Tickets'"
17 system_action:
18 action_name: retrieve_all_tickets
19 input_args:
20 support_tickets: data.tickets

Practical Examples

Example 1: Simple Ticket Alert

Notify assignee with a link

1notify:
2 output_key: alert_sent
3 recipient_id: data.target_user.id
4 message:
5 RENDER():
6 template: "Hello {{name}}, [<b>T-{{id}}</b>]({{link}}) assigned to you. Follow runbook."
7 args:
8 name: data.target_user.first_name
9 id: data.ticket.display_id
10 link: data.ticket.url

Expectation: User will receive a simple notification message with the ID of the ticket they were assigned

Example 2: Multi-Option Response

Offer multiple options to the user

1# input args: data.ticket
2notify:
3 output_key: user_choice
4 recipient_id: data.target_user.id
5 message:
6 RENDER():
7 template: "Ticket {{id}} assigned—act now."
8 args:
9 id: data.ticket.id
10 actions:
11 - key: view
12 label: "'View Ticket'"
13 content_action:
14 message:
15 RENDER():
16 template: "View ticket {{id}}"
17 args:
18 id: data.ticket.id
19 - key: convert
20 label: "'Convert to Bug'"
21 system_action:
22 action_name: convert_support_issue_to_known_bug
23 input_args:
24 support_ticket: data.ticket

Expectation: User will receive a notification about a ticket that was assigned to them. They will be provided two buttons, one to look at the ticket and one to convert the ticket.

Example 3: Handoff to Conversation

Alert the user and collection more information

1# input args: data.ticket
2notify:
3 output_key: handoff_result
4 recipient_id: data.target_user.id
5 message:
6 RENDER():
7 template: "[{{id}}]({{url}}) assigned—need details?"
8 args:
9 id: data.ticket.display_id,
10 url: $CONCAT(["https://notion.so/", data.ticket.sys_id], "")
11 actions:
12 - key: send_back
13 label: "'Send Back'"
14 conversation_action:
15 conversation_process_name: collect_reason_for_send_back_and_send_case_back_to_case_owner
16 input_args:
17 support_ticket: data.ticket

Expectation: User receives the notification and are prompted to start a conversational process to send back the ticket for more information.