DEV

Figma

Figma Connection

Put Figma to Work with @Human Automations and @Human Agents

The Figma Connection documents all Triggers, Actions and Query Operations available for creating automations via the Figma API.

What can you do with the Figma Connection?

  • Connect to the Figma API in a few clicks

  • Use the related Figma Operations (see below) in @Human Automations or @Human Agents

Trigger Operations

File Updated

Triggers on: files/file_updated

Triggered when a Figma file is updated.

Comment Created

Triggers on: comments/comment_created

Triggered when a new comment is created on a Figma file.

Action Operations

Action: Create Comment

Action: Create Image

Action: Delete Comment

Action: React to Comment

Query Operations

Example link

Example link

Obtaining Access Credentials

To obtain a Personal Access Token (PAT) for Figma, follow these steps:

  1. Log in to your Figma account at https://www.figma.com.

  2. Click on your profile icon (top-left) → Select Settings.

  3. In the upper sidebar, go to Security.

  4. Click Generate new token.

  5. Enter a description for the token (e.g., "API Access").

  6. Set an expiration date.

  7. Under Scopes, select the required permissions (e.g., files:read, files:write).

  8. Click Generate token.

  9. Copy the token immediately—it won’t be shown again. Store it securely; treat it like a password.

Configuring Webhooks

  1. Generate a Personal Access Token (PAT) in Figma with the webhooks:write scope enabled.

  2. Determine the scope for your webhook (Team, Project, or File) and locate its corresponding ID.

  3. Set up a public endpoint capable of receiving POST requests and returning a 200 OK status code.

  4. Register the webhook by sending a POST request to https://api.figma.com/v2/webhooks.

  5. Add the header X-Figma-Token using your Personal Access Token as the value.

  6. Include a JSON body specifying the event_type, the resource ID (team_id, project_id, or file_id), your endpoint URL, and a passcode for verification.

  7. Confirm registration by verifying the automated PING event sent by Figma to your specified endpoint.

Code (Apache v2.0): Service Connectivity and Metadata

Code (Apache v2.0): List of External Resources and Internal Mapping

Last updated