Doel
Append a notification side effect to Element runtime output.
Elements runtime reference / Side effects
createNotificationAppend a notification side effect to Element runtime output.
createNotification(payload=None, **kwargs)
Append a notification side effect to Element runtime output.
create_notificationyieldNotificationyield_notificationnotifyUse these fields as the Python call arguments or keyword payload for this helper.
{
"title": "Issue escalated",
"body": "Review required",
"recipientUids": [
"user-123"
],
"data": [
{
"id": "sample",
"widget": "table",
"data": [
{
"key": "value"
}
]
}
]
}
| Field | Description |
|---|---|
payload | Optional notification dict. |
title/body/description | Notification display fields. |
userUid/userIds/recipientUids | Recipient uid fields. |
data | Optional datasets such as table payloads with id, title, widget, columns, and data rows. |
{
"title": "Issue escalated",
"body": "Review required",
"recipientUids": [
"user-123"
],
"data": [
{
"id": "sample",
"widget": "table",
"data": [
{
"key": "value"
}
]
}
]
}
def run():
createNotification(
title="Issue escalated",
body="Review required",
data=[{"id": "sample", "widget": "table", "data": [{"key": "value"}]}],
)
return {"notified": True}