Sync variants let you spawn multiple independent sync processes inside a single connection β one per mailbox, file folder, Slack channel, repo, or any other sub-resource the end-user has access to. Each variant runs on its own schedule, with its own checkpoint and records cache, so a slow partition doesnβt block a fast one. Nango is already multi-tenant by default β every sync function executes in the context of an end-user Connection, and runs independently for each connection. Variants are for the next level down: fan-out within one connection.Documentation Index
Fetch the complete documentation index at: https://nango.dev/docs/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Traditionally, a sync function is defined once and executed once per connection. With variants, you can create multiple instances of the same function that share the base configuration but run independently. Each variant has its own execution schedule, checkpoint, and data storage. Key benefits:- Parallel execution β variants run independently, so a slow mailbox or folder doesnβt block the others.
- Custom filtering β each variant can target a different sub-resource (e.g., a specific Gmail label, a specific Drive folder).
- Per-partition state β each variant has its own checkpoint and cache, so failures and re-syncs are isolated.
- Dynamic scale β create or delete variants programmatically as the end-user adds/removes sub-resources.
How sync variants work
- By default, a sync is associated with a base variant.
- You can create additional sync variants programmatically using the API or SDK.
- Each variant is treated as a separate sync in the Nango UI.
- Sync webhooks include a variant field to identify which variant was executed.
- External webhooks (e.g., from Airtable) are always processed by the base variant.
- If a sync variant needs additional context (e.g., filtering parameters), store/retrieve it using the connection metadata, namespaced with the variant ID.
Creating a sync variant
Each sync can have a maximum of 100 variants per connection. For heavier workloads, reach out to increase this limit.
- Node
- cURL
high-value-orders for the sync-orders sync. It will run separately from the base variant.
Running & managing sync variants
Once created, a variant can be managed just like a regular sync. All sync operations (triggering, pausing, resuming, etc.) support the variant parameter. Check out the HTTP API reference or Node SDK reference for details.Accessing the variant in a sync script
When a sync script runs, the variant name is available vianango.variant. You can use this to customize the behavior of your sync.
example-partitioned-sync-script.ts
Fetching data for a variant
Use thevariant query parameter when retrieving records from the Nango API.
- Node
- cURL
high-value-orders variant.
Storing variant-specific context
If a sync variant requires custom parameters (e.g., a filtering threshold), store them in the connection metadata, namespaced by the variant ID. Storing metadata:- Node
- cURL
example-partitioned-sync-script.ts
Related guides
- Sync functions - build the base sync before adding variants.
- Checkpoints - track progress per variant.
- Records cache - fetch data for each variant.
- Create sync variant API - manage variants programmatically.