ctx.reply(content, options?). You can also return a string or JSX card from a handler instead of calling ctx.reply() directly.
Reply types at a glance
The following table summarizes the reply types your agent can send:| Type | Content | Attachments | User interaction |
|---|---|---|---|
| Plain text | String | Via options.files | None |
| Markdown | String with markdown | Via options.files | None |
| Interactive cards | Card and child components | Not on cards | Buttons, dropdowns, links, inputs trigger onAction |
Plain text
Send a simple string reply withctx.reply():
Markdown
Send formatted text by passing a markdown string toctx.reply():
Sending attachments
Include files with string or markdown replies via the optional second argument. When sending attachments, keep these limits in mind:- Attachments are limited to 25 MB per file.
- Files are only supported with string or markdown replies, not card replies.
- Provide each file with exactly one of
urlordata.
File reference type
Each file uses aFileRef object with the following shape:
url for larger files. Novu fetches public HTTP(S) URLs server-side. Use data for small generated files in memory.
The following examples show both approaches:
Interactive cards
Cards are structured messages with buttons, dropdowns, links, and more. Build them with function calls or JSX.- Function call API
- JSX API
The following example builds a card with the function call API:
Available card components
The following table lists the card components you can use in replies:| Component | Description |
|---|---|
Card | Container with an optional title |
CardText | Text block inside a card |
Button | Interactive button; id maps to actionId in onAction |
Actions | Required wrapper around Button elements |
Select / SelectOption | Dropdown; triggers onAction with selected value |
Divider | Visual separator |
CardLink | Clickable link |
TextInput | Text input field |
Related
Edit sent messages
Update a message in place after sending it with
ReplyHandle.Signals
Metadata, workflow triggers, and conversation resolution.
Connect your first agent
Walk through a full support-bot handler file.