Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Zigpoll

Scalekit connector
Open markdown

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

Tools
27
What they doRead · write · destructive
19 · 8 · 019 read8 write0 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 Zigpoll connection

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

    Each user opens the link once and enters their Zigpoll 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
  • zigpoll_get_accountGet one Zigpoll account by id.Read-only

    Get Account

    Get one Zigpoll account by id. Returns the account's title, plan, owner and admin, poll ids, isShopify flag and usage counters. Use zigpoll_list_accounts to find the id first.

    Inputs

    accountIdstringrequired
    ID of the Zigpoll account (the account `_id`, e.g. from zigpoll_list_accounts).
  • zigpoll_get_current_userGet the user that owns the API key.Read-only

    Get Current User

    Get the user that owns the API key. Returns the user id, name, email and the list of account ids the key can reach. Use it to confirm the connection works; use zigpoll_list_accounts for account details.

    Inputs

    This tool takes no inputs.

  • zigpoll_get_pollGet one poll (survey) by id.Read-only

    Get Poll

    Get one poll (survey) by id. Returns the poll's title, status, visibility, page rules, slide ids, settings and engagement counters. Use zigpoll_list_polls to find the id; use zigpoll_list_slides for the question content.

    Inputs

    pollIdstringrequired
    ID of the poll (survey), the `_id` returned by zigpoll_list_polls.
  • zigpoll_get_poll_action_logicGet a survey's Action Logic rules and the actions available for writing new ones.Read-only

    Get Poll Action Logic

    Get a survey's Action Logic rules and the actions available for writing new ones. Returns the current rules plus the actions this account can use now and those available once an integration is connected. Use it to inspect rules that run after a response.

    Inputs

    pollIdstringrequired
    ID of the poll (survey), the `_id` returned by zigpoll_list_polls.
  • zigpoll_get_poll_attributionGet the attributed revenue report for one 'How did you hear about us?' question.Read-only

    Get Poll Attribution

    Get the attributed revenue report for one 'How did you hear about us?' question. Returns per-answer orders, revenue, average order value and share, a byPeriod series and a comparison with the previous window. Use it to see which marketing channels drive orders; use zigpoll_get_poll_metadata for non-revenue metadata breakdowns.

    Inputs

    accountIdstring
    ID of the Zigpoll account (the account `_id`, e.g. from zigpoll_list_accounts). Provide the account that owns the survey.
    createdAfterstring
    Only return records created on or after this time, as a JavaScript timestamp in milliseconds (for example 1760000000000). Use it for incremental sync.
    createdBeforestring
    Only return records created on or before this time, as a JavaScript timestamp in milliseconds (for example 1760000000000).
    granularitystring
    Period size for the byPeriod series: day, week (default) or month; weeks start on Monday.one of dayweekmonth
    groupBystring
    Response-metadata field to cross-tab answers against (default `source`), for example utm_source, utm_medium, utm_campaign or landing-page.one of attribution_channelattribution_sourcesourceutm_sourceutm_mediumutm_campaignoriginal-referrerlanding-pagesourceTypeutm_contentutm_termcampaign_nameadset_namead_nameplacementsite_source_namegad_sourceutm_source_platformutm_creative_formatutm_marketing_tacticlandingPagereferrerUrlshopify_order_discount_codes
    slideIdstring
    ID of the slide (question), the `_id` returned by zigpoll_list_slides. The attribution question to report on.
    timezoneOffsetstring
    Minutes offset from UTC used for day bucketing (for example -300 for UTC-5).
  • zigpoll_get_poll_devicesGet the device type, browser and operating system breakdown of respondents.Read-only

    Get Poll Devices

    Get the device type, browser and operating system breakdown of respondents. Returns totalParticipants and distributions for deviceTypes, browsers and operatingSystems, with a truncated flag. Use zigpoll_get_poll_locations for geography.

    Inputs

    accountIdstring
    ID of the Zigpoll account (the account `_id`, e.g. from zigpoll_list_accounts). Provide one of accountId, pollId or slideId.
    pollIdstring
    ID of the poll (survey), the `_id` returned by zigpoll_list_polls. Provide one of accountId, pollId or slideId.
    slideIdstring
    ID of the slide (question), the `_id` returned by zigpoll_list_slides. Provide one of accountId, pollId or slideId.
  • zigpoll_get_poll_locationsGet the geographic breakdown of respondents.Read-only

    Get Poll Locations

    Get the geographic breakdown of respondents. Returns totalParticipants and the top 25 countries, regions and cities, with a truncated flag. Use zigpoll_get_poll_devices for device and browser data.

    Inputs

    accountIdstring
    ID of the Zigpoll account (the account `_id`, e.g. from zigpoll_list_accounts). Provide one of accountId, pollId or slideId.
    pollIdstring
    ID of the poll (survey), the `_id` returned by zigpoll_list_polls. Provide one of accountId, pollId or slideId.
    slideIdstring
    ID of the slide (question), the `_id` returned by zigpoll_list_slides. Provide one of accountId, pollId or slideId.
  • zigpoll_get_poll_metadataGet an aggregated breakdown of response metadata such as utm_source, referrer, landing page or custom keys.Read-only

    Get Poll Metadata

    Get an aggregated breakdown of response metadata such as utm_source, referrer, landing page or custom keys. Returns the available metadata keys when key is omitted, or the value distribution for one key. Call it without key first to discover keys; use zigpoll_get_poll_attribution for revenue by channel.

    Inputs

    accountIdstring
    ID of the Zigpoll account (the account `_id`, e.g. from zigpoll_list_accounts). Provide one of accountId, pollId or slideId.
    createdAfterstring
    Only return records created on or after this time, as a JavaScript timestamp in milliseconds (for example 1760000000000). Use it for incremental sync.
    createdBeforestring
    Only return records created on or before this time, as a JavaScript timestamp in milliseconds (for example 1760000000000).
    keystring
    Metadata key to break down, for example utm_source. Omit to list the available keys.
    pollIdstring
    ID of the poll (survey), the `_id` returned by zigpoll_list_polls. Provide one of accountId, pollId or slideId.
    slideIdstring
    ID of the slide (question), the `_id` returned by zigpoll_list_slides. Provide one of accountId, pollId or slideId.