Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to PostGrid Print & Mail

Scalekit connector
Open markdown

The PostGrid Print & Mail connector lets your AI agent act in each user's PostGrid Print & Mail account. Each user connects their own PostGrid Print & Mail 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 · 17 · 1330 read17 write13 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 PostGrid Print & Mail connection

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

    Each user opens the link once and enters their PostGrid Print & Mail 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
  • postgrid_bank_account_getGet one bank account by ID, including its status and details.Read-only

    Get Bank Account

    Get one bank account by ID, including its status and details. Returns object, bankName, bankPrimaryLine, bankSecondaryLine, bankCountryCode, accountNumber, routingNumber, transitNumber, routeNumber, caDesignationNumber. Get bank account IDs from postgrid_bank_accounts_list.

    Inputs

    idstringrequired
    ID of the record. Example: bank_account_123456789abcdefghijklm
  • postgrid_bank_accounts_listList bank accounts, newest first, with search and skip/limit paging.Read-only

    List Bank Accounts

    List bank accounts, newest first, with search and skip/limit paging. Returns object, totalCount, skip, limit, data. Use postgrid_bank_account_get for one bank account.

    Inputs

    limitinteger
    Maximum number of records to return. Example: 10
    searchstring
    Free-text search over the records. Example: Jane
    skipinteger
    Number of records to skip, for paging. Example: 0
  • postgrid_campaign_getGet one campaign by ID, including its status and details.Read-only

    Get Campaign

    Get one campaign by ID, including its status and details. Returns id, description, metadata, live, createdAt, updatedAt, status, defaultSenderContact, mailingList, createdCount. Get campaign IDs from postgrid_campaigns_list.

    Inputs

    idstringrequired
    ID of the record. Example: campaign_123456789abcdefghijklm
  • postgrid_campaigns_listList campaigns, newest first, with search and skip/limit paging.Read-only

    List Campaigns

    List campaigns, newest first, with search and skip/limit paging. Returns object, totalCount, skip, limit, data. Use postgrid_campaign_get for one campaign.

    Inputs

    limitinteger
    Maximum number of records to return. Example: 10
    searchstring
    Free-text search over the records. Example: Jane
    skipinteger
    Number of records to skip, for paging. Example: 0
  • postgrid_cheque_getGet one cheque by ID, including its status and details.Read-only

    Get Cheque

    Get one cheque by ID, including its status and details. Returns status, mergeVariables, trackingNumber, imbStatus, imbZIPCode, imbDate, cancellation, url, id, description. Get cheque IDs from postgrid_cheques_list.

    Inputs

    idstringrequired
    ID of the record. Example: cheque_123456789abcdefghijklm
  • postgrid_cheque_preview_getGet a temporary URL to the rendered PDF preview of a cheque.Read-only

    Get Cheque Preview

    Get a temporary URL to the rendered PDF preview of a cheque. Returns id, object, url. Get cheque IDs from postgrid_cheques_list.

    Inputs

    idstringrequired
    ID of the record. Example: cheque_123456789abcdefghijklm
  • postgrid_cheques_listList cheques, newest first, with search and skip/limit paging.Read-only

    List Cheques

    List cheques, newest first, with search and skip/limit paging. Returns object, totalCount, skip, limit, data. Use postgrid_cheque_get for one cheque.

    Inputs

    limitinteger
    Maximum number of records to return. Example: 10
    searchstring
    Free-text search over the records. Example: Jane
    skipinteger
    Number of records to skip, for paging. Example: 0
  • postgrid_contact_getGet one contact by ID, including its status and details.Read-only

    Get Contact

    Get one contact by ID, including its status and details. Returns object, addressLine1, addressLine2, city, provinceOrState, postalOrZip, countryCode, addressStatus, addressErrors, companyName. Get contact IDs from postgrid_contacts_list.

    Inputs

    idstringrequired
    ID of the record. Example: contact_123456789abcdefghijklm