Figma UpdateVariables

Figma UpdateVariables

Certified

Create, update, or delete Figma variables and variable collections in bulk

Calls the Figma POST /v1/files/: file_key/variables endpoint with the bulk-write envelope (variableCollections, variableModes, variables, variableModeValues), matching the Figma API's own field names and semantics — see the Figma REST API documentation for the shape of each entry, including the temporary-ID convention (action: CREATE entries use a client-chosen temporary ID that Figma remaps to a real ID in the response). Requires a Figma Enterprise organization plan with variables enabled — a 403 response is mapped to a dedicated error explaining that requirement. If you're not on an Enterprise plan, read/write variables from a client-side Figma plugin instead.

yaml
type: io.kestra.plugin.figma.variables.UpdateVariables

Create a variable collection and a variable in a Figma file (Enterprise plan required)

yaml
id: figma_update_variables
namespace: company.team

tasks:
  - id: update_variables
    type: io.kestra.plugin.figma.variables.UpdateVariables
    accessToken: "{{ secret('FIGMA_ACCESS_TOKEN') }}"
    fileKey: "abc123XYZ"
    variableCollections:
      - action: CREATE
        id: "temp_collection_1"
        name: "Design Tokens"
    variables:
      - action: CREATE
        id: "temp_variable_1"
        name: "primary-color"
        variableCollectionId: "temp_collection_1"
        resolvedType: COLOR
Properties

Figma access token

A personal access token generated from your Figma account settings (Account Settings > Personal access tokens), scoped to what the task needs to do. A valid OAuth 2.0 access token obtained through your own authorization flow also works — this plugin does not implement the OAuth flow itself, only PAT-style bearer tokens passed as-is.

The Figma file key

Found in the file's URL: https://www.figma.com/file/: fileKey/....

Defaulthttps://api.figma.com/v1

Figma API base URL

Defaults to the public Figma REST API. Override only to point at a self-hosted proxy or a test server.

SubTypeobject

Variable collections to create, update, or delete

See the Figma API documentation for the VariableCollection change entry shape.

SubTypeobject

Variable values to set per mode

See the Figma API documentation for the VariableModeValue change entry shape.

SubTypeobject

Variable modes to create, update, or delete

See the Figma API documentation for the VariableMode change entry shape.

SubTypeobject

Variables to create, update, or delete

See the Figma API documentation for the Variable change entry shape.

SubTypestring

Map of temporary ID to the real ID Figma assigned it

Only contains entries for CREATE actions that used a client-chosen temporary ID.