Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to OneSignal

Scalekit connector
Open markdown

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

Tools
51
What they doRead · write · destructive
21 · 23 · 721 read23 write7 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 OneSignal connection

    In AgentKit > Connections, create an OneSignal 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 = 'onesignal'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize OneSignal:', 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: 'onesignal_email_reputation_get',
    toolInput: { app_id: 'YOUR_APP_ID' },
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their OneSignal 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
  • onesignal_email_provider_metrics_getGet email delivery, open, click, bounce, failure, and spam complaint counts for a sending domain, broken down by inbox provider.Read-only

    Get Email Inbox Provider Metrics

    Get email delivery, open, click, bounce, failure, and spam complaint counts for a sending domain, broken down by inbox provider. Returns an object with providers.

    Inputs

    app_idstringrequired
    The OneSignal App ID (a UUID) from Settings > Keys & IDs in the OneSignal dashboard.
    domainstringrequired
    The sending domain to report on. Must be an email domain configured for this app. Example: mail.example.com
    endstringrequired
    End of the reporting window as an ISO 8601 timestamp, for example `2026-08-08T00:00:00Z`.
    startstringrequired
    Start of the reporting window as an ISO 8601 timestamp, for example `2026-08-01T00:00:00Z`. Must be before `end` and no more than 365 days ago.
  • onesignal_email_provider_metrics_timeseries_getGet email delivery, open, click, bounce, failure, and spam complaint counts for a sending domain over time, bucketed by hour, day, or month and totaled across the requested inbox providers.Read-only

    Get Email Inbox Provider Metrics Over Time

    Get email delivery, open, click, bounce, failure, and spam complaint counts for a sending domain over time, bucketed by hour, day, or month and totaled across the requested inbox providers. Returns an object with events.

    Inputs

    app_idstringrequired
    The OneSignal App ID (a UUID) from Settings > Keys & IDs in the OneSignal dashboard.
    domainstringrequired
    The sending domain to report on. Must be an email domain configured for this app. Example: mail.example.com
    endstringrequired
    End of the reporting window as an ISO 8601 timestamp, for example `2026-08-08T00:00:00Z`.
    granularitystringrequired
    The size of each time bucket. `hourly` is only available for the last 60 days. Example: dailyone of hourlydailymonthly
    startstringrequired
    Start of the reporting window as an ISO 8601 timestamp, for example `2026-08-01T00:00:00Z`. Must be before `end` and no more than 365 days ago, or 60 days ago when `granularity` is `hourly`.
    providers__array
    Inbox providers to include in the totals. Repeat the parameter for each provider, for example `providers[]=gmail&providers[]=yahoo_us`. Omit to include all providers. Accepted values: `apple`, `att`, `canadian`, `chinese`, `comcast`, `free_fr`, `french`, `german`, `gmail`, `google_workspace`, `googlers`, `inbox_lv`, `italian`, `japanese`, `outlook_365`, `outlook_eu`, `outlook_us`, `proton`, `rackspace`, `russian`, `uk`, `united_online`, `yahoo_eu`, `yahoo_us`, `other_eu`, `other_us`, and `other`. Example: ["gmail"]
  • onesignal_email_reputation_getGet email bounce and spam complaint rates received for the app over the last 24 hours, 7 days, and 30 days.Read-only

    Get Email Reputation Statistics

    Get email bounce and spam complaint rates received for the app over the last 24 hours, 7 days, and 30 days. Returns an object with last_24_hours, last_7_days, last_30_days.

    Inputs

    app_idstringrequired
    The OneSignal App ID (a UUID) from Settings > Keys & IDs in the OneSignal dashboard.
  • onesignal_journey_getRetrieve the full configuration of a single journey by its UUID, including its audience and node graph.Read-only

    View journey

    Retrieve the full configuration of a single journey by its UUID, including its audience and node graph. Returns an object with id, app_id, name, description, state, created_at, updated_at, started_at, archived_at, created_source, audience, early_exit and more. Use this when you have the ID. Use onesignal_journeys_list to find one. Needs id from onesignal_journeys_list.

    Inputs

    app_idstringrequired
    The OneSignal App ID (a UUID) from Settings > Keys & IDs in the OneSignal dashboard.
    idstringrequired
    UUID of the journey to retrieve. Example: YOUR_JOURNEY_ID
  • onesignal_journey_schema_getRetrieve the JSON Schema for a Journey authoring operation without authentication or app context.Read-only

    Get Journey Schema

    Retrieve the JSON Schema for a Journey authoring operation without authentication or app context. Returns an object with operation, document, schema.

    Inputs

    operationstringrequired
    The authoring operation whose schema you need. Example: createone of createduplicateupdateupdate_node
  • onesignal_journey_stats_getRetrieve performance stats for a single journey: journey-level entry and exit counts, per-node counts keyed by node `id`, per-branch counts keyed by branch `id`, and channel delivery stats for message-sending nodes.Read-only

    View journey stats

    Retrieve performance stats for a single journey: journey-level entry and exit counts, per-node counts keyed by node `id`, per-branch counts keyed by branch `id`, and channel delivery stats for message-sending nodes. Returns an object with id, started, completed, exited_early, nodes, branches. Needs id from onesignal_journeys_list.

    Inputs

    app_idstringrequired
    The OneSignal App ID (a UUID) from Settings > Keys & IDs in the OneSignal dashboard.
    idstringrequired
    UUID of the journey to retrieve stats for. Example: YOUR_JOURNEY_ID
  • onesignal_journeys_listRetrieve a paginated list of journeys for an app.Read-only

    View journeys

    Retrieve a paginated list of journeys for an app. Returns a summary representation of each journey; use View journey for the full configuration. Returns an object with journeys, has_more, next_cursor. Use this to browse. Use onesignal_journey_get when you already have the ID.

    Inputs

    app_idstringrequired
    The OneSignal App ID (a UUID) from Settings > Keys & IDs in the OneSignal dashboard.
    cursorstring
    Opaque pagination token from a previous response's `next_cursor`. Omit for the first page. Example: eyJpZCI6IjEyMyJ9
    limitinteger
    Maximum journeys to return per page. Minimum `1`, maximum `50`. Example: 50
  • onesignal_message_events_exportExport a compressed CSV report of audience-level delivery and engagement data for a specific message.Read-only

    Export Message Audience Activity

    Export a compressed CSV report of audience-level delivery and engagement data for a specific message. Returns an object with csv_file_url. Needs message_id from onesignal_messages_list.

    Inputs

    app_idstringrequired
    The OneSignal App ID (a UUID) from Settings > Keys & IDs in the OneSignal dashboard.
    message_idstringrequired
    The identifier of the message in UUID v4 format. Get this `id` in the response of your Create Message API request, the View Messages API, and in your OneSignal dashboard Message Reports. Example: YOUR_NOTIFICATION_ID