Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Emelia

Scalekit connector
Open markdown

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

Tools
59
What they doRead · write · destructive
23 · 30 · 623 read30 write6 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 Emelia connection

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

    Each user opens the link once and enters their Emelia 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
  • emelia_blacklists_getGet the account-wide blacklists.Read-only

    Get Blacklists

    Get the account-wide blacklists. Returns an array of documents with blacklistContent (emails and domains) and linkedinBlacklistContent (LinkedIn handles), newline-separated. Use this to check whether someone is excluded from all campaigns.

    Inputs

    This tool takes no inputs.

  • emelia_campaign_activities_listList a campaign's activity events (sends, opens, clicks, replies, LinkedIn actions), newest first, 30 per page.Read-only

    List Campaign Activities

    List a campaign's activity events (sends, opens, clicks, replies, LinkedIn actions), newest first, 30 per page. Returns events with type, contact and date; an empty array means no more pages. Use this to see replies or bounces. Pages start at 0 and results may be up to 10 minutes old.

    Inputs

    campaign_idstringrequired
    Multichannel campaign ID (24 hex characters), from emelia_campaigns_list. Example: 6650f1a2b839d80011c5a0f1.
    contact_idstring
    Only this contact's events. Example: 65f1a2b3c4d5e6f74db757ce.
    pagestring
    Page index, starting at 0. Example: 0.
    searchstring
    Search contacts by name, email or LinkedIn URL. Example: jane.
    typestring
    Only this event type. Example: MAIL_REPLIED.one of VISITEDINVITEDACCEPTEDMESSAGE_SENTINMAIL_SENTLINKEDIN_REPLIEDMAIL_REPLIEDRE_REPLY_EMAILRE_REPLY_LINKEDINFOLLOWEDLIKEDSENTBOUNCEDRE_REPLYOPENEDUNSUBSCRIBEDCLICKEDWEBSITE_VISITEDWHATSAPP_MESSAGE_SENTWHATSAPP_REPLIEDTASK_COMPLETEDTASK_FAILEDFAILED_ACTIONEXCLUDEDMANUAL_EMAIL_SENTMANUAL_LINKEDIN_SENT
    typesstring
    Comma-separated event types; overrides type. Example: MAIL_REPLIED,LINKEDIN_REPLIED.
  • emelia_campaign_contacts_listList a campaign's contacts with their status in the campaign, page by page.Read-only

    List Campaign Contacts

    List a campaign's contacts with their status in the campaign, page by page. Returns contacts with _id, email, names and last event. Use this to find a contact ID or check who replied. Pages start at 0.

    Inputs

    campaign_idstringrequired
    Campaign ID, from emelia_campaigns_list. Example: 6650f1a2b839d80011c5a0f1.
    pageintegerrequired
    Page index, starting at 0. Example: 0.
    per_pageinteger
    Contacts per page, 10 to 10,000. Defaults to 20. Example: 50.
    querystring
    Exact email, or words matched against email, names, phone and LinkedIn URL. Example: jane@acme.example.
  • emelia_campaign_getGet a multichannel campaign in full.Read-only

    Get Campaign

    Get a multichannel campaign in full. Returns its settings (schedule), sequence steps, sender identities, attached lists with contact counts, status and dates. Read this before any change to settings, steps or identities. Get the ID from emelia_campaigns_list.

    Inputs

    campaign_idstringrequired
    Multichannel campaign ID (24 hex characters), from emelia_campaigns_list. Example: 6650f1a2b839d80011c5a0f1.
  • emelia_campaign_manual_tasks_listList the pending manual TASK steps of a campaign: contacts waiting for someone to do a task.Read-only

    List Campaign Manual Tasks

    List the pending manual TASK steps of a campaign: contacts waiting for someone to do a task. Returns tasks with contact and step details. Use this to work through manual follow-ups.

    Inputs

    campaign_idstringrequired
    Multichannel campaign ID (24 hex characters), from emelia_campaigns_list. Example: 6650f1a2b839d80011c5a0f1.
  • emelia_campaign_progress_getGet, for each step of a campaign, how many contacts have passed it and how many are waiting at it.Read-only

    Get Campaign Step Progress

    Get, for each step of a campaign, how many contacts have passed it and how many are waiting at it. Returns an object keyed by step ID with completed and waiting counts. Use this to monitor a running campaign. Returns {} for a draft.

    Inputs

    campaign_idstringrequired
    Multichannel campaign ID (24 hex characters), from emelia_campaigns_list. Example: 6650f1a2b839d80011c5a0f1.
  • emelia_campaigns_listList the multichannel campaigns in the Emelia account, newest first, excluding archived ones.Read-only

    List Campaigns

    List the multichannel campaigns in the Emelia account, newest first, excluding archived ones. Returns each campaign's _id, name, status and dates. Use this to find a campaign ID. Use emelia_campaign_get for one campaign's sequence and settings.

    Inputs

    allstring
    true to add the synthetic ALL_CAMPAIGNS entry first (used for account-wide webhooks). Example: false.one of truefalse
  • emelia_credits_usage_listList the credits consumed by the account (finds and verifications), newest first.Read-only

    List Credit Usage

    List the credits consumed by the account (finds and verifications), newest first. Refunded debits are not listed. Returns debits with amount, tool and date. Use this to track spending.

    Inputs

    limitinteger
    Items per page. Example: 50.
    pageinteger
    Page number, starting at 1. Example: 1.