Skip to main content

Figma integration

Last updated on Nov 20, 20264 min read

In short​

With the Figma integration you give the AI Variation Builder a design instead of a text description. You connect Figma once with a personal access token. After that, you paste the link to a Figma frame into the AI chat in the visual editor, and the AI builds the variation from that design.

What you need​

  • A Figma account that can open the file with your design
  • Permission to create a personal access token in Figma
  • Access to the AI Variation Builder in the visual editor

Step 1: Create a personal access token in Figma​

  1. In the Figma file browser, click the account menu in the top-left corner and select „Settings“.
  2. Open the „Security“ tab.
  3. Scroll to the „Personal access tokens“ section and click „Generate new token“.
  4. Enter a token name, for example „Varify access token“, and choose an expiration.
  5. Assign these two scopes: current_user:read and file_content:read. Varify only asks for these two scopes. The full list of scopes is in the Figma developer documentation.
  6. Press Return / Enter to generate the token.
  7. Copy the token right away. Figma only shows it once.
Figma dialog „Generate new token“ with the token name „Varify access token“, a 90-day expiration and the scopes current_user:read and file_content:read ticked.
important

A personal access token gives access to Figma as if you were that user. Treat it like a password: paste it only into Varify, and do not share it in chats, tickets or documents.

A token stops working when its expiration date is reached. If the integration stops reading your designs later, create a new token and save it in Varify again (see step 2).

Step 2: Connect Figma in Varify​

  1. In Varify, open „AI connectors“ in the left navigation.
  2. On the Figma card, click „Connect“.
  3. Paste the token into the field and click „Save token“.
The Figma card in Varify after clicking „Connect“: a field for the personal access token with the buttons „Save token“ and „Cancel“.

The card now shows the status „Connected“. Connectors are set up once for your team, so your colleagues do not need their own token to use them. To remove the connection, click „Disconnect“ on the Figma card.

The „AI connectors“ page in Varify: the Figma card shows „Connected“ with a „Disconnect“ button, the Google Analytics 4 card shows „Not connected“.
  1. In Figma, select the frame you want Varify to build, not the whole file.
  2. Right-click the frame and choose „Copy/Paste as“ → „Copy link to selection“.
Figma with a frame selected and the context menu open: „Copy/Paste as“ → „Copy link to selection“ is highlighted.

The link contains the ID of the selected frame (node-id), so Varify knows exactly which design to read.

The Figma account that created the token must be able to open this file. If it cannot, Varify cannot read the frame either.

Step 4: Build the variation in the visual editor​

  1. Create a new experiment or open an existing one. The visual editor opens.
  2. Open the AI Variation Builder, as described in Prompt Based Experiments (PBX).
  3. Optional: select the element on the page that the design should relate to. Without a selected element, describe in your prompt where the design belongs.
  4. Paste the Figma link into the prompt and say what the AI should do with it, for example: „Add the Figma Design below the selected element:“ followed by the link.
  5. Send the prompt.
The AI Variation Builder in the visual editor with a selected element and the prompt „Add the Figma Design below the selected element:“ followed by a Figma link.

The AI reads the frame, writes the JavaScript for the variation and, with „Auto-apply code“ switched on, applies it in the editor right away. In its reply, the AI describes what it built, so you can check it against your design.

The visual editor after the AI has applied the JavaScript: the purple card from the Figma design appears below the customer logos, and the AI describes what it built.

You can keep refining the result with follow-up prompts. If you edit the generated code by hand, click „Save & apply“ to run your version.

Tips for better results​

  • Placeholder content is taken over as it is. Text such as „Lorem ipsum“, a placeholder name or a placeholder logo box appears in the variation, so replace placeholders in Figma first or tell the AI which content to use.
  • Links and behavior are not part of a static design. A button in the design does not link anywhere until you tell the AI the target URL.
  • Be clear about the position. Say whether the design goes above, below or instead of the selected element.
  • Do not put personal data into designs or prompts. The same notice as in Prompt Based Experiments applies.

The AI Variation Builder uses AI credits as described in Prompt Based Experiments (PBX).

Troubleshooting​

If the AI cannot read your design, check the following:

  • The Figma card in „AI connectors“ shows „Connected“.
  • The token has not expired and has the scopes current_user:read and file_content:read.
  • The Figma account behind the token can open the file.
  • The link comes from „Copy link to selection“ and contains a node-id.