Functions have access to storage that is scoped to the connection they run for. Use it to keep integration behavior tied to the customer, account, workspace, or tenant that authorized the connection. For the product-level workflow, see Customize per customer.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.
Connection metadata
Connection metadata is the default blob storage for Nango Functions. It is a JSON object stored on a Nango connection and available to action functions, sync functions, webhook functions, and event functions. Use metadata for:- Customer-specific settings, such as field mappings, filters, folders, projects, account IDs, or feature flags.
- Function configuration values that should persist across executions.
- Values discovered during setup, such as provider webhook subscription IDs or tenant-specific identifiers.
- Configuration shared across multiple functions for the same connection.
Set and update metadata from your app
Set metadata after the customer chooses integration settings during onboarding or in your app’s settings UI.- Set with Node SDK
- Set with REST API
- Update with Node SDK
- Update with REST API
setMetadata replaces the metadata object. updateMetadata merges the provided fields into the existing object.
For exact parameters and response shapes, see the set metadata API, update metadata API, Node SDK set metadata method, and Node SDK edit metadata method.
Read metadata from your app
Read metadata from your app when you need to render saved settings, pre-fill a configuration UI, or decide whether a connection is ready for syncs:Read metadata inside a function
Define a metadata schema on the function, then callnango.getMetadata():
crm/syncs/contacts.ts
nango.getMetadata() automatically reads metadata for the connection being executed.
Customer configuration pattern
A common customer configuration pattern is to ask the customer how their external custom fields map to your product model, then store that mapping as connection metadata.Records cache
The records cache is the storage layer for sync output. Sync functions write records withnango.batchSave(), nango.batchUpdate(), and nango.batchDelete(). Your app reads changed records through the records API or SDK.
Use the records cache for synced external data, not for function configuration. See Records cache.
Related guides
- Customize per customer - design the product workflow for customer-specific integration settings.
- Connection tags - distinguish attribution tags from runtime metadata.
- Set connection metadata API - replace metadata from your app.
- Update connection metadata API - patch metadata from your app.