Run GitHub Actions workflows from Figma sending the selected page and all selected nodes as inputs.
Setup on Figma is straightforward. You just need to setup a new workflow clicking on the +
button. You'll need a GitHub Access Token to run workflows.
After that, you can select a page
and one or more nodes
from that page and click on โถ
. This will run the selected workflow, passing your selection as workflow' inputs.
Before running a workflow for the first time, you'll need to properly setup a GitHub Actions workflow ๐.
The GitHub Actions workflow needs to have a set of inputs (the same that the plugin will send):
on:
workflow_dispatch:
inputs:
fileKey:
description: Figma file key
type: string
required: true
page:
description: Stringified selected page (id, name)
type: string
default: '{}'
required: true
selection:
description: Stringified array of the selected nodes (id, name)
type: string
default: '[]'
required: true
Aside from this, you'll just need to configure the workflow as you prefer.
Checkout a working example from-figma.yaml
.
As you can see inside the above example, you can also transform/manipulate the received inputs in order to shape them as you want.
What do you think about exporting Figma content as PDF to an FTP Server, just clicking a button from Figma? Would it be cool, isn't it?
Take a look at this workflow and find out how this is totally feasible. Just clone the workflow and setup this Figma plugin ๐