This is the rendered version of the full Lua documentation exposed to agents when they inspect the integration namespace.
Novu — Lua API Reference
list_notifications
List notifications from Novu with optional filtering.
Parameters
| Name | Type | Required | Description |
|---|
page | integer | no | Page number (1-based, default: 1) |
limit | integer | no | Items per page (default: 10, max: 100) |
channel | string | no | Filter by channel: in_app, email, sms, chat, push |
Examples
-- List recent notifications
local result = app.integrations.novu.list_notifications({
page = 1,
limit = 20
})
-- Filter by email channel
local result = app.integrations.novu.list_notifications({
channel = "email",
limit = 50
})
get_notification
Get details of a specific notification.
Parameters
| Name | Type | Required | Description |
|---|
id | string | yes | The notification ID |
Example
local result = app.integrations.novu.get_notification({
id = "notification-id-here"
})
list_subscribers
List all notification subscribers.
Parameters
| Name | Type | Required | Description |
|---|
page | integer | no | Page number (0-based, default: 0) |
limit | integer | no | Items per page (default: 10, max: 100) |
Example
local result = app.integrations.novu.list_subscribers({
page = 0,
limit = 50
})
for _, subscriber in ipairs(result.data) do
print(subscriber.email)
end
get_subscriber
Get details of a specific subscriber.
Parameters
| Name | Type | Required | Description |
|---|
id | string | yes | The subscriber ID |
Example
local result = app.integrations.novu.get_subscriber({
id = "subscriber-id-here"
})
print(result.email)
print(result.first_name)
create_subscriber
Create a new notification subscriber.
Parameters
| Name | Type | Required | Description |
|---|
email | string | yes | Email address |
firstName | string | no | First name |
lastName | string | no | Last name |
phone | string | no | Phone number (e.g., “+1234567890”) |
Example
local result = app.integrations.novu.create_subscriber({
email = "[email protected]",
firstName = "John",
lastName = "Doe",
phone = "+1234567890"
})
print("Created subscriber: " .. result.id)
trigger_event
Trigger a notification event to one or more subscribers.
Parameters
| Name | Type | Required | Description |
|---|
name | string | yes | Workflow trigger key / template name |
to | string | yes | Subscriber ID, email, or JSON array of recipients |
payload | object | no | Key-value template variables |
Examples
-- Trigger to a single subscriber by email
local result = app.integrations.novu.trigger_event({
name = "onboarding-welcome",
to = "[email protected]",
payload = { name = "John", plan = "Pro" }
})
-- Trigger to a single subscriber by ID
local result = app.integrations.novu.trigger_event({
name = "order-confirmation",
to = "subscriber-id-here",
payload = { orderNumber = "ORD-123", total = "$99.00" }
})
-- Trigger to multiple recipients
local result = app.integrations.novu.trigger_event({
name = "team-update",
to = '["[email protected]", "[email protected]"]',
payload = { message = "Sprint review tomorrow at 3pm" }
})
get_current_user
Get the currently authenticated Novu user.
Parameters
None.
Example
local result = app.integrations.novu.get_current_user({})
print("Logged in as: " .. result.email)
print("Organization: " .. result.organization.name)
Multi-Account Usage
If you have multiple Novu accounts configured, use account-specific namespaces:
-- Default account (always works)
app.integrations.novu.function_name({...})
-- Explicit default (portable across setups)
app.integrations.novu.default.function_name({...})
-- Named accounts
app.integrations.novu.production.function_name({...})
app.integrations.novu.staging.function_name({...})
All functions are identical across accounts — only the credentials differ.
Raw agent markdown
# Novu — Lua API Reference
## list_notifications
List notifications from Novu with optional filtering.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `page` | integer | no | Page number (1-based, default: 1) |
| `limit` | integer | no | Items per page (default: 10, max: 100) |
| `channel` | string | no | Filter by channel: `in_app`, `email`, `sms`, `chat`, `push` |
### Examples
```lua
-- List recent notifications
local result = app.integrations.novu.list_notifications({
page = 1,
limit = 20
})
-- Filter by email channel
local result = app.integrations.novu.list_notifications({
channel = "email",
limit = 50
})
```
---
## get_notification
Get details of a specific notification.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `id` | string | yes | The notification ID |
### Example
```lua
local result = app.integrations.novu.get_notification({
id = "notification-id-here"
})
```
---
## list_subscribers
List all notification subscribers.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `page` | integer | no | Page number (0-based, default: 0) |
| `limit` | integer | no | Items per page (default: 10, max: 100) |
### Example
```lua
local result = app.integrations.novu.list_subscribers({
page = 0,
limit = 50
})
for _, subscriber in ipairs(result.data) do
print(subscriber.email)
end
```
---
## get_subscriber
Get details of a specific subscriber.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `id` | string | yes | The subscriber ID |
### Example
```lua
local result = app.integrations.novu.get_subscriber({
id = "subscriber-id-here"
})
print(result.email)
print(result.first_name)
```
---
## create_subscriber
Create a new notification subscriber.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `email` | string | yes | Email address |
| `firstName` | string | no | First name |
| `lastName` | string | no | Last name |
| `phone` | string | no | Phone number (e.g., "+1234567890") |
### Example
```lua
local result = app.integrations.novu.create_subscriber({
email = "[email protected]",
firstName = "John",
lastName = "Doe",
phone = "+1234567890"
})
print("Created subscriber: " .. result.id)
```
---
## trigger_event
Trigger a notification event to one or more subscribers.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `name` | string | yes | Workflow trigger key / template name |
| `to` | string | yes | Subscriber ID, email, or JSON array of recipients |
| `payload` | object | no | Key-value template variables |
### Examples
```lua
-- Trigger to a single subscriber by email
local result = app.integrations.novu.trigger_event({
name = "onboarding-welcome",
to = "[email protected]",
payload = { name = "John", plan = "Pro" }
})
-- Trigger to a single subscriber by ID
local result = app.integrations.novu.trigger_event({
name = "order-confirmation",
to = "subscriber-id-here",
payload = { orderNumber = "ORD-123", total = "$99.00" }
})
-- Trigger to multiple recipients
local result = app.integrations.novu.trigger_event({
name = "team-update",
to = '["[email protected]", "[email protected]"]',
payload = { message = "Sprint review tomorrow at 3pm" }
})
```
---
## get_current_user
Get the currently authenticated Novu user.
### Parameters
None.
### Example
```lua
local result = app.integrations.novu.get_current_user({})
print("Logged in as: " .. result.email)
print("Organization: " .. result.organization.name)
```
---
## Multi-Account Usage
If you have multiple Novu accounts configured, use account-specific namespaces:
```lua
-- Default account (always works)
app.integrations.novu.function_name({...})
-- Explicit default (portable across setups)
app.integrations.novu.default.function_name({...})
-- Named accounts
app.integrations.novu.production.function_name({...})
app.integrations.novu.staging.function_name({...})
```
All functions are identical across accounts — only the credentials differ.