Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Novu

Scalekit connector
Open markdown

The Novu connector lets your AI agent act in each user's Novu account. Each user connects their own Novu API key once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 47 tools.

Tools
47
What they doRead · write · destructive
18 · 20 · 918 read20 write9 destructive
Users sign in with

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the Novu connection

    In AgentKit > Connections, create a Novu connection. The name you give it is the connection_name your code passes. See Configure connections.

  4. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'novu'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Novu:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'novu_layouts_list',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their Novu credentials there. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • novu_layout_getFetch details of a specific layout by its unique identifier layoutId Returns an object with data.Read-only

    Retrieve a layout

    Fetch details of a specific layout by its unique identifier layoutId Returns an object with data. Use this when you have the ID. Use novu_layouts_list to find one. Needs layoutId from novu_layouts_list.

    Inputs

    layoutIdstringrequired
    The layout ID or identifier. Example: default-layout
  • novu_layouts_listRetrieve a list of layouts with optional filtering and pagination Returns an object with data.Read-only

    List all layouts

    Retrieve a list of layouts with optional filtering and pagination Returns an object with data. Use this to browse. Use novu_layout_get when you already have the ID.

    Inputs

    limitnumber
    Number of items to return per page. Example: 10
    offsetnumber
    Number of items to skip before starting to return results. Example: 0
    orderBystring
    Field to sort the results by. Example: createdAtone of createdAtupdatedAtname
    orderDirectionstring
    Direction of sorting. Example: ASCone of ASCDESC
    querystring
    Search query to filter layouts. Example: jane
  • novu_messages_listList all messages for the current environment.Read-only

    List all messages

    List all messages for the current environment. This API supports filtering by channel, subscriberId, and transactionId. Returns data, an array of items with _id, _templateId, _environmentId, _messageTemplateId, _organizationId, _notificationId, _subscriberId, subscriber, template, templateIdentifier, plus totalCount, hasMore, pageSize, page.

    Inputs

    channelstring
    Filter by channel: in_app, email, sms, chat or push. Example: emailone of in_appemailsmschatpushtool
    contextKeysarray
    Filter by exact context keys, order insensitive (format: "type:id") Example: ["tenant:acme"]
    limitnumber
    Maximum number of items to return. Example: 10
    pagenumber
    Page number, starting at 0. Example: 0
    subscriberIdstring
    The subscriber ID you assigned in your system. Example: user-123
    transactionIdarray
    The transaction ID returned when the event was triggered. Example: 3c7f1a2b-9d4e-4f5a-8b6c-7d8e9f0a1b2c
  • novu_notification_getRetrieve an event by its unique key identifier notificationId.Read-only

    Get Event

    Retrieve an event by its unique key identifier notificationId. Returns an object with data. Use this when you have the ID. Use novu_notifications_list to find one. Needs notificationId from novu_notifications_list.

    Inputs

    notificationIdstringrequired
    The ID of the event (notification). Example: 64f1c2b3a4b5c6d7e8f90a1b
  • novu_notifications_listList all notification events (triggered events) for the current environment.Read-only

    List Events

    List all notification events (triggered events) for the current environment. Returns data, an array of items with _id, _environmentId, _organizationId, _subscriberId, transactionId, _templateId, _digestedNotificationId, createdAt, updatedAt, channels, plus hasMore, pageSize, page. Use this to browse. Use novu_notification_get when you already have the ID.

    Inputs

    afterstring
    Date filter for records after this timestamp. Defaults to earliest date allowed by subscription plan. Example: eyJpZCI6IjEyMyJ9
    beforestring
    Date filter for records before this timestamp. Defaults to current time of request (now) Example: eyJpZCI6IjEyMyJ9
    channelsarray
    Array of channel types. Example: ["in_app"]
    contextKeysarray
    Filter by exact context keys, order insensitive (format: "type:id") Example: ["tenant:acme"]
    emailsarray
    Array of email addresses or a single email address. Example: ["jane@example.com"]
    limitnumber
    Limit for pagination. Example: 10
    pagenumber
    Page number for pagination. Example: 0
    searchstring
    Search term (deprecated) Example: jane
    severityarray
    Array of severity levels or a single severity level. Example: ["high"]
    subscriberIdsarray
    Array of subscriber IDs or a single subscriber ID. Example: ["64f1c2b3a4b5c6d7e8f90a1b"]
    subscriptionIdstring
    Subscription ID for filtering notifications by subscription. Example: 64f1c2b3a4b5c6d7e8f90a1b
    templatesarray
    Array of template IDs or a single template ID. Example: ["64f1c2b3a4b5c6d7e8f90a1b"]
    topicKeystring
    Topic Key for filtering notifications by topic. Example: product-updates
    transactionIdstring
    The transaction ID to filter by. Example: 64f1c2b3a4b5c6d7e8f90a1b
  • novu_subscriber_getRetrieve a subscriber by its unique key identifier subscriberId.Read-only

    Retrieve a subscriber

    Retrieve a subscriber by its unique key identifier subscriberId. subscriberId field is required. Returns an object with data. Use this when you have the ID. Use novu_subscribers_search to find one. Needs subscriberId from novu_subscribers_search.

    Inputs

    subscriberIdstringrequired
    The identifier of the subscriber. Example: 64f1c2b3a4b5c6d7e8f90a1b
  • novu_subscriber_notifications_countRetrieve count of in-app (inbox) notifications for a subscriber by its unique key identifier subscriberId.Read-only

    Count Subscriber Inbox Notifications

    Retrieve count of in-app (inbox) notifications for a subscriber by its unique key identifier subscriberId. Returns data, an array of items with count, filter. Needs subscriberId from novu_subscribers_search.

    Inputs

    filtersstringrequired
    Array of filter objects (max 30) to count notifications by different criteria. Example: [{"read":false,"archived":false},{"tags":["important"]},{"tags":{"and":[{"or":["a","b"]},{"or":["c"]}]}}]
    subscriberIdstringrequired
    The identifier of the subscriber. Example: 64f1c2b3a4b5c6d7e8f90a1b
  • novu_subscriber_notifications_listRetrieve in-app (inbox) notifications for a subscriber by its unique key identifier subscriberId.Read-only

    List Subscriber Inbox Notifications

    Retrieve in-app (inbox) notifications for a subscriber by its unique key identifier subscriberId. Returns an object with data. Needs subscriberId from novu_subscribers_search.

    Inputs

    subscriberIdstringrequired
    The identifier of the subscriber. Example: 64f1c2b3a4b5c6d7e8f90a1b
    afterstring
    Cursor for the next page, from the previous response. Example: 64f1c2b3a4b5c6d7e8f90a1b
    archivedboolean
    Filter by archived state. Example: false
    contextKeysarray
    Context keys for filtering notifications in multi-context scenarios. Example: ["tenant:acme"]
    createdGtenumber
    Filter notifications created on or after this timestamp (Unix timestamp in milliseconds) Example: 1704067200000
    createdLtenumber
    Filter notifications created on or before this timestamp (Unix timestamp in milliseconds) Example: 1735689599999
    datastring
    Filter by data attributes (JSON string) Example: {"orderId": "A-1001"}
    limitnumber
    Maximum number of items to return. Example: 10
    offsetnumber
    Number of items to skip. Example: 0
    readboolean
    Filter by read/unread state. Example: false
    seenboolean
    Filter by seen state. Example: false
    severityarray
    Filter by severity levels. Example: ["high"]
    snoozedboolean
    Filter by snoozed state. Example: false
    tagsarray
    Filter by workflow tags. Returns notifications that have any of the given tags. Example: ["orders"]