For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inBook a demo
GuidesAPI Reference
GuidesAPI Reference
  • Getting started
    • Introduction
    • IP Whitelisting
    • Obtaining API keys
    • LLMs.txt
    • MCP server
    • Quickstart
    • Native clients
    • Concepts
    • Embedding authentication
    • Versioning
    • Idempotent requests
    • Events
    • Self-hosted option
    • 2025-09-18 Migration Guide
  • Configuring your connections
    • Overview
    • CDC streaming from databases
    • Syncing to custom webhooks
  • Code examples
    • Overview
    • Bulk sync (ELT) from HubSpot to PostgreSQL
    • Bulk sync (ELT) from Salesforce to S3
    • Bulk sync (ELT) from Salesforce to Snowflake
    • Model sync (Reverse ETL) from Snowflake query to Salesforce
    • Model sync (Reverse ETL) from MongoDB to Salesforce
    • Adding users from Snowflake to Salesloft Cadence
    • Adding contacts from Snowflake to Gong Engage
    • Joined model sync from Postgres, Airtable, and Stripe to Hubspot
    • Model sync from MySQL to Snowflake
    • Model sync from Salesforce to Netsuite
    • Querying Salesforce using SOQL
    • Syncing audiences from Snowflake to LinkedIn Ads
    • Syncing contacts from Google Cloud Storage to Salesforce
    • Syncing contacts from Google Cloud Storage to webhooks
  • Terraform examples
    • Overview
    • Model sync (Reverse ETL) from BigQuery to Salesforce
    • Model sync (Reverse ETL) from BigQuery to LinkedIn Ads
Logo
Log inBook a demo
On this page
  • Code
  • 1. Create a Snowflake connection
  • 2. Create a Gong connection
  • 3. Create a Snowflake model
  • 4. List the Gong Engage flows
  • 5. List the target fields on a Gong Engage flow
  • 6. Sync Snowflake contacts into a Gong Engage flow
Code examples

Adding contacts from Snowflake to Gong Engage

Was this page helpful?
Previous

Joined model sync from Postgres, Airtable, and Stripe to Hubspot

Next

Code

Set your Polytomic API key as an environment variable:

$export POLYTOMIC_API_KEY=YOUR-API-TOKEN

This example covers six steps:

  1. Create a Snowflake Connection.
  2. Create a Gong Connection.
  3. Create a Snowflake model over a custom SQL query.
  4. List the available Gong Engage flows.
  5. List the target fields on a specific flow.
  6. Sync users from Snowflake into a Gong Engage flow.

1. Create a Snowflake connection

The Snowflake instance must be reachable from Polytomic over the network. See the Polytomic IP allowlist for the source addresses to allow.

cURL
Python
Typescript
Go
$ curl --request POST \
> --url https://app.polytomic.com/api/connections \
> --header "accept: application/json" \
> --header "content-type: application/json" \
> --header "X-Polytomic-Version: 2024-02-08" \
> --header "Authorization: Bearer ${POLYTOMIC_API_KEY}" \
> -d '{
> "name": "Snowflake Connection",
> "type": "snowflake",
> "configuration": {
> "account": "uc193736182",
> "username": "user",
> "password": "secret",
> "dbname": "database"
> }
> }'

2. Create a Gong connection

The following request creates a Gong Connection that authenticates through Polytomic Connect’s embedded OAuth modal. You can also run OAuth yourself and pass the client credentials to Polytomic — see the Gong connection configuration for details.

cURL
Python
Typescript
Go
$curl --request POST \
> --url https://app.polytomic.com/api/connections \
> --header "accept: application/json" \
> --header "content-type: application/json" \
> --header "X-Polytomic-Version: 2024-02-08" \
> --header "Authorization: Bearer ${POLYTOMIC_API_KEY}" \
> -d '{"name": "My Gong Connection","type": "gong", "configuration": {"auth_method": "oauth"}}'

If you authenticate to Gong with OAuth instead of an API key, open the URL returned in the auth_url field of the response to complete the flow.

OAuth redirection

By default, the API expects auth_url to open in a new browser window. Set the optional redirect_url parameter in the request body to change the redirect target.

3. Create a Snowflake model

The following request creates a model over a Snowflake query. Replace the query with your own:

cURL
Python
Typescript
Go
$curl --request POST \
> --url https://app.polytomic.com/api/models \
> --header "accept: application/json" \
> --header "content-type: application/json" \
> --header "X-Polytomic-Version: 2024-02-08" \
> --header "Authorization: Bearer ${POLYTOMIC_API_KEY}" \
> -d '{
> "name": "Active Users",
> "configuration": {
> "query": "SELECT contact_id FROM salesforce_contacts WHERE subscription_plan = 'gold'",
> },
> "connection_id": "YOUR-SNOWFLAKE-CONNECTION-ID"
> }'

4. List the Gong Engage flows

Polytomic can sync to Gong Accounts, People, and Cadences. Every Gong Engage flow appears as a target object:

cURL
Python
Typescript
Go
$curl --request POST \
> --url https://app.polytomic.com/api/connections/YOUR_GONG_CONNECTION_ID/modelsync/targetobjects \
> --header "accept: application/json" \
> --header "content-type: application/json" \
> --header "Authorization: Bearer ${POLYTOMIC_API_KEY}"

5. List the target fields on a Gong Engage flow

Call the Get Sync Target Fields endpoint to list the target fields available on the flow you plan to sync to. The fields you map in Step 6 come from this set:

cURL
Python
Typescript
Go
$curl -G \
> --url https://app.polytomic.com/api/connections/YOUR_GONG_CONNECTION_ID/modelsync/target/fields \
> --header "accept: application/json" \
> --header "content-type: application/json" \
> --header "Authorization: Bearer ${POLYTOMIC_API_KEY}" \
> --url-query "target=YOUR_GONG_CADENCE_ID"

6. Sync Snowflake contacts into a Gong Engage flow

Adding contacts to a Gong Engage flow requires your CRM’s contact ID — for example, a HubSpot or Salesforce contact ID. You can source that ID from anywhere (including Snowflake, as below), but the ID must also exist in the CRM linked to Gong.

This sync uses the contact_id field from Snowflake to add the matching CRM contacts to a Gong Engage flow. Specify the target flow with target.object:

cURL
Python
Typescript
Go
$curl --request POST \
> --url https://app.polytomic.com/api/syncs \
> --header "accept: application/json" \
> --header "content-type: application/json" \
> --header "Authorization: Bearer ${POLYTOMIC_API_KEY}" \
> -d '{
> "name": "Snowflake to Gong Engage Sync",
> "mode": "updateOrCreate",
> "identity": {
> "source": {
> "field": "contact_id",
> "model_id": "YOUR_SNOWFLAKE_MODEL_ID"
> },
> "target": "Id",
> "function": "equality"
> },
> "schedule": {
> "frequency": "manual"
> },
> "target": {
> "connection_id": "YOUR_GONG_CONNECTION_ID",
> "object": "my-gong-engage-flow"
> }
> }'