Manage data /Connect /

Sync events in Netlify Connect

This feature is available on Connect Enterprise plans.

Netlify Connect automatically syncs and updates your data layer to ensure that you always have access to the latest data.

This document covers the types of sync events that occur, what triggers automatic data syncs, and how to trigger a sync manually in the Netlify UI or through webhooks.

To learn how to access sync event logs and set up Slack notifications for failures, review monitor activity.

# Sync event types

There are two types of events that can occur in Connect:

  • Sync from all data sources: the system reads data source configurations, installs dependencies, and then retrieves data from all data sources. Once the data is retrieved, the system uses the information to build or update the GraphQL schema for the data layer
  • Sync from {data source type}: the system retrieves data from the specified data source

Netlify does a full sync to set up or update your data layer when you create a new data layer and when you add or update data source configurations, cross-references, and API scopes. Netlify also does a full sync when you manually trigger a sync. When a full sync occurs, the event is Sync from all data sources.

When there is a data update, such as newly published content in your CMS, Netlify syncs the updated data source. If the webhook notification from the data source includes a header to specify that only that data source should update, the event is Sync from {data source type}. If not, the update will trigger a full sync and the event will be Sync from all data sources.

Each successful sync generates a new data revision. You can review all available data revisions in the Revisions section on the data layer’s overview page. Learn more about data revisions.

# Automated syncs

One of the benefits of Connect is that it automatically updates your data layers to ensure they always have access to the latest data.

The API will use the pinned revision, even if syncs generate new ones

If you pin a data revision, successful syncs will continue to generate new revisions but the GraphQL API for your data layer will always use the pinned one.

Automated syncs occur in the following scenarios:

  • When you create a new data layer and when you add or update data source configurations, cross-references, and API scopes. This triggers a sync of all data sources and Netlify creates a new data revision and updates the GraphQL schema and API to reflect the change.
  • When data in a data source updates, such as when you publish new content in your CMS. Netlify is notified of the change and automatically creates a new data revision and updates your data layer.

# Manual syncs

If you are troubleshooting and want to manually trigger a refresh of all data in your data layer, you can start a sync from all data sources through the Netlify UI or a webhook.

Note that if your data layer’s API is using a pinned data revision, Netlify will generate a new revision to reflect the data sync but the API will continue to use the old data. Make sure to unpin the old data revision and/or pin the new revision once the data refresh is complete.

# Trigger a sync with the Netlify UI

  1. Navigate to the

    page for your team and select the data layer from the Data layers list.

  2. In the Activity section, select

    . Netlify will start syncing the data.

# Trigger a sync with the webhook

You can use webhooks in external systems to trigger a sync in Connect. Learn more about how to create and use webhooks for your data layer.

# Review data layer sync events

Netlify retains sync event logs for five days. Review the monitor activity doc to learn how to access logs for data layer sync events and how to set up Slack notifications for sync event failures.