# Figma

> Collaborative interface design. Read a Figma file's structure and metadata, list and post comments for design review, and clean up comments, all with a personal access token.

App · Images & Design · 5 actions. Web page: https://docs.lodol.com/docs/integrations/figma

## Actions

### Delete Figma comment

Delete a comment from a Figma file by its comment id. Only the comment's author (or a file admin) can delete it. Deleting a top-level comment also removes its replies. Useful for cleaning up automated or resolved comments.

**Inputs**

- File key (`file_key`, text, required): The Figma file the comment is on. A file key or a full Figma file URL both work.
- Comment ID (`comment_id`, text, required): The id of the comment to delete (from 'List Figma comments' or the response of 'Post Figma comment').

**Outputs**: Empty object. Figma returns no content on a successful delete; the executor reports success.

- `status` (text): Always 'success' when the delete succeeded.

**Example output**

```json
{}
```

### Get Figma file

Get a Figma file's metadata and document tree by its file key. Returns the file name, the editor type (design, whiteboard, or slides), the last-modified timestamp, the current version id, a thumbnail URL, and the node tree (pages and their layers). Large files can return a lot of data, so use 'depth' to fetch only the top levels of the tree. Useful for reading a file's structure, checking when it last changed, or grabbing its thumbnail.

**Inputs**

- File key (`file_key`, text, required): The Figma file to read. Paste either the file key (the slug in a file URL) or a full Figma file URL such as https://www.figma.com/design/AbC123/My-File; the key is extracted automatically.
- Depth (`depth`, number): How many levels of the document tree to return. 1 returns just the pages, 2 also returns each page's top-level layers, and so on. Leave blank to return the entire tree (which can be very large). At least 1.
- Version (`version`, text): A specific version id to fetch (from the file's version history). Leave blank for the current version.
- Geometry (`geometry`, text): Set to 'paths' to include vector geometry for each node. Leave blank to omit geometry (smaller response). One of: `paths` (Include vector paths).
- Node ids (`ids`, text): Comma-separated node ids (e.g. '1:2,1:8') to return only those nodes, their children, and their ancestor chains instead of the whole document (much smaller when you care about a few frames). Top-level pages are always included. Leave blank to return the full tree (subject to 'depth').

**Outputs**: File metadata plus the document node tree. The 'document' node is the root; its children are the file's pages (CANVAS nodes).

- `branches` (list): Present only when requested with branch_data: metadata for the file's branches. Each item is {key, name, thumbnail_url, last_modified, link_access} (note: snake_case, unlike the camelCase top-level fields).
- `componentSets` (object): Map of node id -> component-set metadata.
- `components` (object): Map of node id -> component metadata, telling you which component each instance comes from.
- `document` (object): Root DOCUMENT node. Its 'children' are the pages (CANVAS nodes).
- `editorType` (text): Which editor the file uses: 'figma', 'figjam', or 'slides'.
- `lastModified` (text): ISO 8601 timestamp of the last edit.
- `linkAccess` (text): The file's share-link access level (e.g. 'view', 'edit', 'org_view', 'inherit').
- `mainFileKey` (text): Present only when the file is a branch (requires branch_data): the key of the main file.
- `name` (text): The file's name.
- `role` (text): The caller's role on the file: 'owner', 'editor', or 'viewer'.
- `schemaVersion` (number): Version of the response schema.
- `styles` (object): Map of style id -> style metadata used in the file.
- `thumbnailUrl` (text): URL of a rendered thumbnail image of the file.
- `version` (text): The current version id of the file.

**Example output**

```json
{
  "componentSets": {},
  "components": {
    "1:12": {
      "description": "",
      "key": "a1b2c3d4e5f6",
      "name": "Button / Primary"
    }
  },
  "document": {
    "children": [
      {
        "children": [
          {
            "id": "1:2",
            "name": "Landing / Hero",
            "type": "FRAME"
          },
          {
            "id": "1:8",
            "name": "Landing / Pricing",
            "type": "FRAME"
          }
        ],
        "id": "0:1",
        "name": "Page 1",
        "type": "CANVAS"
      },
      {
        "children": [],
        "id": "0:2",
        "name": "Components",
        "type": "CANVAS"
      }
    ],
    "id": "0:0",
    "name": "Document",
    "type": "DOCUMENT"
  },
  "editorType": "figma",
  "lastModified": "2026-07-20T18:42:11Z",
  "linkAccess": "view",
  "name": "Marketing Site Redesign",
  "role": "editor",
  "schemaVersion": 0,
  "styles": {
    "1:20": {
      "key": "f6e5d4c3b2a1",
      "name": "Brand / Coral",
      "styleType": "FILL"
    }
  },
  "thumbnailUrl": "https://s3-alpha.figma.com/thumbnails/example.png",
  "version": "5219384710"
}
```

### Get Figma user

Get the Figma user that the connected access token belongs to, including their id, display handle, email, and avatar URL. Useful for confirming which account a workflow is acting as, or as a lightweight connection check.

**Inputs**: None.

**Outputs**: The authenticated Figma user.

- `email` (text): Email address; present on /me, may be absent on comment authors.
- `handle` (text): Display name.
- `id` (text): Unique user id.
- `img_url` (text): Avatar image URL.

**Example output**

```json
{
  "email": "jordan@example.com",
  "handle": "Jordan Lee",
  "id": "778363821906345612",
  "img_url": "https://s3-alpha.figma.com/profile/example.png"
}
```

### List Figma comments

List the comments on a Figma file, including each comment's text, author, creation time, whether it has been resolved, and where it is pinned on the canvas. Replies are returned as their own comments with a 'parent_id' pointing at the thread's first comment. Useful for triaging design feedback or pulling open comments into a review.

**Inputs**

- File key (`file_key`, text, required): The Figma file whose comments to list. A file key or a full Figma file URL both work.
- As markdown (`as_md`, true/false): Turn on to return each comment's text as its markdown equivalent where applicable. Leave off for plain text.

**Outputs**: The file's comments, newest activity first.

- `comments` (list): Array of comment objects.

**Example output**

```json
{
  "comments": [
    {
      "client_meta": {
        "node_id": "1:2",
        "node_offset": {
          "x": 120.0,
          "y": 64.0
        }
      },
      "created_at": "2026-07-19T14:03:52Z",
      "file_key": "AbC123dEf456GhI789jkL0",
      "id": "9481726354",
      "message": "Can we bump the hero headline to 48px?",
      "order_id": "1",
      "parent_id": "",
      "reactions": [],
      "resolved_at": null,
      "user": {
        "email": "jordan@example.com",
        "handle": "Jordan Lee",
        "id": "778363821906345612",
        "img_url": "https://s3-alpha.figma.com/profile/example.png"
      }
    },
    {
      "client_meta": null,
      "created_at": "2026-07-19T15:11:08Z",
      "file_key": "AbC123dEf456GhI789jkL0",
      "id": "9481726355",
      "message": "Agreed, pushing that now.",
      "order_id": "2",
      "parent_id": "9481726354",
      "reactions": [],
      "resolved_at": null,
      "user": {
        "handle": "Priya Nair",
        "id": "883910244501299887",
        "img_url": "https://s3-alpha.figma.com/profile/example2.png"
      }
    }
  ]
}
```

### Post Figma comment

Post a comment on a Figma file, or reply to an existing comment. Provide the file and the message text; optionally reply within an existing thread by giving that comment's id. Returns the created comment, including its new id. Useful for leaving automated design feedback or notifying reviewers from a workflow.

**Inputs**

- File key (`file_key`, text, required): The Figma file to comment on. A file key or a full Figma file URL both work.
- Message (`message`, text, required): The comment text to post.
- Reply to comment (`comment_id`, text): To reply inside an existing thread, enter the id of the comment you are replying to. This must be a root comment (you cannot reply to a comment that is itself a reply). Leave blank to start a new top-level comment.

**Outputs**: The comment that was created.

- `client_meta` (object): Where the comment is pinned. One of: a canvas point (Vector) {x, y}; a frame offset {node_id, node_offset: {x, y}}; a Region {x, y, region_height, region_width}; or a FrameOffsetRegion. Null for a reply.
- `created_at` (text): ISO 8601 timestamp when the comment was created.
- `file_key` (text): Key of the file the comment belongs to.
- `id` (text): Unique comment id.
- `message` (text): Comment text.
- `order_id` (text): Ordering key Figma uses to sort comments.
- `parent_id` (text): Id of the parent comment when this is a reply; empty string for a top-level comment.
- `reactions` (list): Emoji reactions on the comment.
- `resolved_at` (text): ISO 8601 timestamp when the comment was resolved, or null if unresolved.
- `user` (object): A Figma user.

**Example output**

```json
{
  "client_meta": null,
  "created_at": "2026-07-24T09:15:00Z",
  "file_key": "AbC123dEf456GhI789jkL0",
  "id": "9481726400",
  "message": "Ship-ready: approving this frame.",
  "order_id": "3",
  "parent_id": "",
  "reactions": [],
  "resolved_at": null,
  "user": {
    "email": "jordan@example.com",
    "handle": "Jordan Lee",
    "id": "778363821906345612",
    "img_url": "https://s3-alpha.figma.com/profile/example.png"
  }
}
```
