Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Elastic Email

Scalekit connector
Open markdown

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

Tools
60
What they doRead · write · destructive
30 · 21 · 930 read21 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 Elastic Email connection

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

    Each user opens the link once and enters their Elastic Email 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
  • elasticemail_account_getGet public information about the Elastic Email account that owns the API key.Read-only

    Get Account

    Get public information about the Elastic Email account that owns the API key. Returns the account's Identity, Profile, Branding, Usage, Billing, Sending and Features sections. Use elasticemail_account_get to confirm which account the key belongs to.

    Inputs

    This tool takes no inputs.

  • elasticemail_campaign_getGet one campaign by name.Read-only

    Get Campaign

    Get one campaign by name. Returns Name, Status, Content, Recipients, ExcludedRecipients and Options. Use elasticemail_campaign_get for a known campaign. Use elasticemail_campaign_stats_get for its results.

    Inputs

    namestringrequired
    Name of the campaign. Example: Fall sale 2026.
  • elasticemail_campaign_stats_getGet sending statistics for one campaign.Read-only

    Get Campaign Stats

    Get sending statistics for one campaign. Returns its delivery, open, click, bounce, complaint and unsubscribe counts. Use elasticemail_campaign_stats_get for a known campaign's results.

    Inputs

    namestringrequired
    Name of the campaign. Example: Fall sale 2026.
  • elasticemail_campaign_stats_listList sending statistics for every campaign.Read-only

    List Campaign Stats

    List sending statistics for every campaign. Returns one summary per campaign with its ChannelName and delivery, open, click, bounce and unsubscribe counts. Use elasticemail_campaign_stats_list to compare campaigns. Use elasticemail_campaign_stats_get for one campaign.

    Inputs

    limitinteger
    Maximum number of items to return. Example: 50.
    offsetinteger
    Number of items to skip, for paging. Example: 50.
  • elasticemail_campaigns_listList the account's campaigns, optionally filtered by a fragment of the name (up to 1,000).Read-only

    List Campaigns

    List the account's campaigns, optionally filtered by a fragment of the name (up to 1,000). Returns campaigns with Name, Status, Content, Recipients and Options. Use elasticemail_campaigns_list to browse or find campaigns. Use elasticemail_campaign_get for one campaign by name.

    Inputs

    limitinteger
    Maximum number of items to return. Example: 50.
    offsetinteger
    Number of items to skip, for paging. Example: 50.
    searchstring
    Return campaigns whose name contains this text. Example: fall.
  • elasticemail_channel_events_listList delivery events for one channel, filtered by type and date (up to 1,000 per call).Read-only

    List Channel Events

    List delivery events for one channel, filtered by type and date (up to 1,000 per call). Returns events with TransactionID, MsgID, To, EventType, EventDate and Message. Use elasticemail_channel_events_list for one channel. Use elasticemail_events_list for the whole account.

    Inputs

    namestringrequired
    Name of the channel. Example: order-notifications.
    event_typesarray
    Only return events of these types. Example: ["Bounce", "Complaint"].
    fromstring
    Start of the time range, as YYYY-MM-DDThh:mm:ss. Example: 2026-11-01T00:00:00.
    limitinteger
    Maximum number of items to return. Up to 1000. Example: 50.
    offsetinteger
    Number of items to skip, for paging. Example: 50.
    order_bystring
    Sort order by event date. Defaults to DateDescending. Example: DateAscending.one of DateDescendingDateAscending
    tostring
    End of the time range, as YYYY-MM-DDThh:mm:ss. Example: 2026-11-13T23:59:59.
  • elasticemail_channel_stats_getGet sending statistics for one channel (the channel_name given on sends).Read-only

    Get Channel Stats

    Get sending statistics for one channel (the channel_name given on sends). Returns its delivery, open, click, bounce, complaint and unsubscribe counts. Use elasticemail_channel_stats_get for a known channel.

    Inputs

    namestringrequired
    Name of the channel. Example: order-notifications.
  • elasticemail_channel_stats_listList sending statistics for every channel.Read-only

    List Channel Stats

    List sending statistics for every channel. Returns one summary per channel with delivery, open, click, bounce and unsubscribe counts. Use elasticemail_channel_stats_list to compare channels. Use elasticemail_channel_stats_get for one channel.

    Inputs

    limitinteger
    Maximum number of items to return. Example: 50.
    offsetinteger
    Number of items to skip, for paging. Example: 50.