Get File
figma.get_file
ActionBusiness appsconnection required
Calls the Figma API with the connection's credentials.
Fetch a Figma file's document JSON, optionally limited to some node ids or to a depth in the tree.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- OAuth 2.0
- Providers
- Figma
- Secret shape
- {"client_id": "…", "client_secret": "…", "refresh_token": "…"}, or {"personal_access_token": "figd_…"}
- Config it needs
- base_url, plan_api_id
- Resolved by
- config.connection_id, else node.connection_id
Configuration
6 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
file_key The Figma file key — the segment after /design/ or /file/ in the file URL. | string | Yes | — | — | — |
version A version id from the file's history; omit for the current version. | string | No | — | — | — |
ids Comma-separated node ids to restrict the returned document to. | string | No | — | — | — |
depth How deep to walk the tree: 1 returns pages only, 2 pages and their top-level objects. Omit for the whole document. | number | No | — | ≥ 1 | — |
include_vector_paths Export vector geometry as paths. This makes the response much larger. | boolean | No | false | — | — |
branch_data Include branch metadata for the file in the response. | boolean | No | false | — | — |
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"branch_data": false,
"include_vector_paths": false
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
name The file name as it appears in the editor. | string | — |
lastModified UTC ISO 8601 time the file was last modified. | string | — |
version The file's version number, incremented on every edit. | string | — |
thumbnailUrl A URL to a thumbnail image of the file. | string | — |
role The caller's role on the file: owner, editor or viewer. | string | — |
editorType Which editor the file belongs to, e.g. figma or figjam. | string | — |
document The DOCUMENT node — the whole node tree of the file. | object | — |
components A map from component id to that component's metadata. | object | — |
styles A map from style id to that style's metadata. | object | — |
{
"components": {},
"document": {},
"editorType": "",
"lastModified": "",
"name": "",
"role": "",
"styles": {},
"thumbnailUrl": "",
"version": ""
}See Get File run in a workflow.
In a technical demo we add the Figma connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.