Get a variable collection by ID

webflow.getVariableCollectionById(collectionId)

Retrieves a variable collection by its ID.

Syntax

webflow.getVariableCollectionById(collectionId: string)

Parameters

  • collectionId: string - The ID of the variable collection to retrieve.

Returns

Promise<VariableCollection>

The a promise that resolves to a variable collection object.

Example

const collection = webflow.getVariableCollectionById("collection-4a393cee-14d6-d927-f2af-44169031a25b");
// returns a collection object
// {
// "id": "collection-4a393cee-14d6-d927-f2af-44169031a25b",
// }

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canReadVariablesAnyAnyAnyAny