Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to SMTP2GO

Scalekit connector
Open markdown

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

Tools
74
What they doRead · write · destructive
29 · 33 · 1229 read33 write12 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 SMTP2GO connection

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

    Console steps with screenshots

    Register your Scalekit environment with the SMTP2GO connector so Scalekit can authenticate requests on your behalf. The connection name you create will be used to identify and invoke the connection programmatically. Then complete the configuration in your application as follows:

    1. Create an API key

      • Sign in to your SMTP2GO dashboard and go to Settings > API Keys.
      • Click Add API Key, give it a descriptive name, for example Agent Auth, and choose the permission level your agent needs.
    2. Copy the key

      • SMTP2GO shows the key once, right after you create it. Copy it and store it securely.
    3. Add the key in Scalekit

      • In Scalekit dashboard, go to AgentKit > Connections > Create Connection. Find SMTP2GO and click Create.
      • Paste the API key you copied in step 2.
      • Click Save.
  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 = 'smtp2go'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize SMTP2GO:', 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: 'smtp2go_email_bounces_report',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their SMTP2GO credentials there. If your app already has a user's credentials, add the account from your backend instead, as the console steps above show. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • smtp2go_email_bounces_reportRetrieve email bounce statistics for the SMTP2GO account, or for a single user on the account, including total emails sent, hard bounce count, soft bounce count, reject count, and the overall bounce percentage.Read-only

    Email Bounces Report

    Retrieve email bounce statistics for the SMTP2GO account, or for a single user on the account, including total emails sent, hard bounce count, soft bounce count, reject count, and the overall bounce percentage.

    Inputs

    usernamestring
    Restrict the bounce statistics to a single SMTP2GO user on this account. Omit to return statistics for the whole account.
  • smtp2go_email_cycle_reportRetrieve the current email billing/usage cycle for the SMTP2GO account, including the cycle start and end dates and how many emails have been used, remain, and are allotted for the current cycle.Read-only

    Email Cycle Report

    Retrieve the current email billing/usage cycle for the SMTP2GO account, including the cycle start and end dates and how many emails have been used, remain, and are allotted for the current cycle. Takes no input parameters.

    Inputs

    This tool takes no inputs.

  • smtp2go_email_history_reportRetrieve a time-series history of email sending activity from SMTP2GO, grouped by email address, username, domain, or subaccount.Read-only

    Email History Report

    Retrieve a time-series history of email sending activity from SMTP2GO, grouped by email address, username, domain, or subaccount. Returns aggregate percentages (bounce, open, reject, spam, unsubscribe) plus a per-period history array covering volume sent, bounces, clicks, opens, rejects, spam, and unsubscribes. Defaults to the trailing 30 days when no date range is given.

    Inputs

    end_datestring
    End of the reporting window, as an ISO-8601 datetime in UTC. If omitted, SMTP2GO defaults to the current time.
    group_bystring
    Controls how the returned history is grouped. One of email_address, username, domain, or subaccount. Defaults to email_address.one of email_addressusernamedomainsubaccountdefault email_address
    start_datestring
    Start of the reporting window, as an ISO-8601 datetime in UTC. If omitted, SMTP2GO defaults to 30 days before the current time.
    subaccountsarray
    List of subaccount IDs to restrict the report to. Omit to include activity from all subaccounts.
  • smtp2go_email_spam_reportRetrieve spam complaint statistics for the SMTP2GO account, or for a single user on the account, including total emails sent, reject count, spam complaint count, and the overall spam percentage.Read-only

    Email Spam Report

    Retrieve spam complaint statistics for the SMTP2GO account, or for a single user on the account, including total emails sent, reject count, spam complaint count, and the overall spam percentage.

    Inputs

    usernamestring
    Restrict the spam statistics to a single SMTP2GO user on this account. Omit to return statistics for the whole account.
  • smtp2go_email_summary_reportRetrieve an overall sending summary for the SMTP2GO account, or for a single user on the account, for the current billing cycle.Read-only

    Email Summary Report

    Retrieve an overall sending summary for the SMTP2GO account, or for a single user on the account, for the current billing cycle. Includes cycle start/end dates, emails used/remaining/max for the cycle, total emails sent, bounce/spam/unsubscribe counts and percentages, and open/click counts.

    Inputs

    usernamestring
    Restrict the summary statistics to a single SMTP2GO user on this account. Omit to return statistics for the whole account.
  • smtp2go_email_unsubscribes_reportRetrieve unsubscribe statistics for the SMTP2GO account, or for a single user on the account, including total emails sent, unsubscribe count, reject count, and the overall unsubscribe percentage.Read-only

    Email Unsubscribes Report

    Retrieve unsubscribe statistics for the SMTP2GO account, or for a single user on the account, including total emails sent, unsubscribe count, reject count, and the overall unsubscribe percentage.

    Inputs

    usernamestring
    Restrict the unsubscribe statistics to a single SMTP2GO user on this account. Omit to return statistics for the whole account.
  • smtp2go_search_activitySearch delivery activity events (processed, delivered, bounced, opened, clicked, etc.) for emails sent through SMTP2GO within a date range.Read-only

    Search Activity

    Search delivery activity events (processed, delivered, bounced, opened, clicked, etc.) for emails sent through SMTP2GO within a date range. Filter by free-form search text, email_id, subject, sender, recipient, sending usernames, subaccounts, or specific event_types, and paginate via continue_token. By default only_latest and only_latest_by_sent are off, so every matching event is returned rather than just the most recent one per email.

    Inputs

    continue_tokenstring
    Pagination token returned by a previous search when more results were available than the limit allowed. Pass it back to continue from where the previous page left off.
    custom_headersarray
    Array of custom header names to extract from each email's raw headers and include in the response, e.g. X-MyCustomID.
    end_datestring
    ISO-8601 formatted datetime (UTC), exclusive upper bound of the search range. Defaults to now if omitted.
    event_typesarray
    Array of event types to restrict results to. Valid values: processed, soft-bounced, hard-bounced, rejected, spam, delivered, unsubscribed, resubscribed, opened, clicked.
    include_headersboolean
    When true, includes the full email headers in each returned event. Defaults to false.default false
    limitinteger
    Maximum number of activity events to return, up to 1000. Defaults to 100.default 100
    only_latestboolean
    When true, returns only the most recent event per email instead of every matching event. Defaults to false.default false
    only_latest_by_sentboolean
    When true, returns only the most recent event per email ordered by the email's sent date, overriding only_latest if both are set. Defaults to false.default false
    regionstring
    Forces this search to a specific regional datacenter (us, eu, or au), independent of the connection's API Region setting.one of useuau
    searchstring
    Returns all events for emails containing this string in any of the searchable fields (subject, sender, recipient, etc.). Separate multiple text values with '|' to match any of them.
    search_email_idstring
    Restrict results to events for this specific email_id.
    search_recipientstring
    Restrict results to events for emails addressed to this recipient.
    search_senderstring
    Restrict results to events for emails sent from this sender address.
    search_subjectstring
    Restrict results to events for emails whose subject matches this text.
    search_usernamesarray
    Array of SMTP2GO usernames to restrict results to emails sent by any of these users.
    start_datestring
    ISO-8601 formatted datetime (UTC), inclusive lower bound of the search range (e.g. 2026-08-01 or 2026-08-01T00:00:00Z). Defaults to midnight of the current date if omitted.
    subaccountsarray
    Array of subaccount IDs to restrict results to activity belonging to any of these subaccounts.
  • smtp2go_search_archived_emailsSearch up to 5,000 archived emails (requires Email Archiving to be enabled on the SMTP2GO account) within a date range, filtered by username, recipient, sender, envelope_from, subject, or a substring match against headers.Read-only

    Search Archived Emails

    Search up to 5,000 archived emails (requires Email Archiving to be enabled on the SMTP2GO account) within a date range, filtered by username, recipient, sender, envelope_from, subject, or a substring match against headers. Supports pagination via continue_token. Use the Search Archived Emails to find an email_id, then pass it to the View Archived Email tool to fetch the full archived content.

    Inputs

    continue_tokenstring
    Pagination token returned by a previous search when more results were available than the limit allowed. Pass it back to continue from where the previous page left off.
    end_datestring
    ISO-8601 formatted datetime (UTC), inclusive upper bound of the search range. Defaults to the current time if omitted.
    envelope_fromstring
    Restrict results to archived emails with this SMTP envelope-from address (may differ from the visible From/sender header).
    headersstring
    Restrict results to archived emails containing this substring anywhere in their headers.
    limitinteger
    Maximum number of archived emails to return. Defaults to 5000.default 5000
    recipientstring
    Restrict results to archived emails addressed to this recipient.
    senderstring
    Restrict results to archived emails sent from this sender address.
    start_datestring
    ISO-8601 formatted datetime (UTC), inclusive lower bound of the search range. Defaults to midnight of the current date if omitted.
    subjectstring
    Restrict results to archived emails whose subject matches this text.
    usernamestring
    Restrict results to archived emails sent by this SMTP2GO username.