Package Information
Available Nodes
Documentation
n8n-nodes-figprint
n8n community node for the Figprint Server API.
Installation
Follow the n8n community node installation guide:
https://docs.n8n.io/integrations/community-nodes/installation/
Credentials
Create a credential of type Figprint API.
Notes:
- Configure Base URL for your Figprint instance (self-hosted or 3rd-party cloud).
- Configure API Token if your server requires it (sent as
Authorization: Bearer <token>). - Optionally set Default X-Figma-Token (can be overridden per operation).
Node: Figprint
Note on workflow:
- Use Generate operations when you want server-side generation using just a
fileKey(and optionalframe). This does not require apreviewId. - Use Preview → Live Preview when you want a
previewId(e.g. to reuse a preview across multiple exports). The Export operation usespreviewId. - Use Export → Export From File Key (Quick) when you want a one-shot export directly from
fileKey(nopreviewIdrequired). The node calls/api/exportwithfile_key(GET for simple exports; POST when a JSON body is needed). - Label generation (Label → Generate Label, or Export → Export (POST) with
kind=label) does not usepreviewId.
Parameters
Resource
FramePreviewExportGenerateLabelFontStatus
Operation
List FramesGet Starter PayloadLive PreviewGet Preview HTMLExport From File Key (Quick)ExportExport (POST)PDF (Wrapper)Generate (Single)Generate MultiGenerate LabelList FontsFont DebugGet StatusGet Config
File Key
- Figma file key.
Frame
- Frame identifier/name (where applicable).
- Used by Preview → Live Preview and Generate → Generate (Single).
- Required for Label → Generate Label and Export → Export (POST) when
kind=label. - If File Key is set, the dropdown will populate from Frames → List Frames.
Preview ID (Preview only)
- Used by Preview → Get Preview HTML.
Merge Payload (JSON) (Preview only)
- Optional object merged into the preview.
Structured Payload (JSON) (Preview only)
- Optional structured payload object.
Pages Spec (JSON) (Preview only)
- Optional array describing pages.
Preview ID (Export only)
- Preview ID returned by Preview operations.
Kind (Export only)
pdf|png|html
Kind (Export → Export (POST))
pdf|png|html|label
Filename (Export only)
- Optional output filename (without extension).
Backend (Export only, PDF kind)
weasyprint|krilla(optional)
Export Body (JSON) (Export → Export (POST), non-label kinds)
- Optional JSON body for exporters that accept a POST body (future-proofing).
Label inputs (Export → Export (POST), kind = label)
- Same inputs as Label → Generate Label:
Label Format,File Key,Frame,DPI,Missing,Merge (JSON).
Generate inputs
- Generate (Single):
File Key, optionalFrame,Payload (JSON). - Generate Multi:
File Key, optionalPages (JSON),Order (JSON),Duplicates (JSON),Merge Payloads (JSON),Missing.
TODO (FigPrint)
To support a dynamic dropdown of available export kinds/plugins in n8n (instead of a fixed list), FigPrint would need to expose this via its API (for example GET /api/exporters returning available kind values; optionally GET /api/plugins for payload/content plugins). Today, /api/status only provides capability hints like render.pngAvailable.
Options
Hard Refresh
- Boolean flag to request frames with a hard refresh where supported.
X-Figma-Token
- Optional per-request override for the Figma token (
X-Figma-Tokenheader).
Preview options:
- Mask Text
- Font Debug
- Reverse Order
- Plugin Debug
Status options:
- Diag (Status → Get Status only)
Output
Frames → List Frames returns JSON.
Frames → Get Starter Payload returns JSON:
json.fileKeyjson.starterPayload
Preview → Live Preview returns JSON:
json.html: HTML string returned by the serverjson.previewId: value of theX-Preview-IDresponse header (if present)
Preview → Get Preview HTML returns JSON:
json.previewIdjson.html
Export → Export returns binary:
binary.data: the exported filejson.kind,json.previewId,json.filename,json.contentType
Export → PDF (Wrapper) returns binary:
binary.data: PDFjson.previewId,json.filename,json.contentType
Label → Generate Label returns binary:
binary.data: label text (text/plain)json.format,json.fileKey,json.frame,json.dpi,json.missing,json.filename
Generate → Generate (Single) returns JSON:
{ status: "ok" }
Generate → Generate Multi returns JSON:
{ status: "ok" }
Export → Export (POST) returns binary:
- For
kind=pdf|png|html: same shape as Export → Export. - For
kind=label: same shape as Label → Generate Label.
Fonts → List Fonts returns JSON.
Fonts → Font Debug returns JSON.
Status → Get Status returns JSON.
Status → Get Config returns JSON.
Examples
Flow diagrams (Mermaid)
One-step export from fileKey (recommended)
Use Export → Export From File Key (Quick) when you just want a file output (PDF/PNG/HTML) and don't want to manage previewId yourself. The node exports directly from fileKey, and will automatically switch to POST /api/export when you provide a merge payload or advanced request body.
flowchart LR
A[Upstream data
(Set/HTTP/Webhook/etc)] --> B[Figprint
Resource: Export
Operation: Export From File Key (Quick)]
B -->|binary.data| C[Next step
(S3/Email/Drive/etc)]
Preview → Export (PDF/PNG/HTML) using previewId
flowchart LR
A[Upstream data
(Set/HTTP/Webhook/etc)] --> B[Figprint
Resource: Preview
Operation: Live Preview]
B -->|outputs json.previewId| C[Figprint
Resource: Export
Operation: Export]
C -->|binary.data| D[Next step
(S3/Email/Glide/etc)]
B -. optional .-> E[Figprint
Resource: Preview
Operation: Get Preview HTML]
Label generation (no previewId)
flowchart LR
A[Upstream data
(Set/HTTP/Webhook/etc)] --> B[Figprint
Resource: Label
Operation: Generate Label]
B -->|binary.data (text/plain)| C[Next step
(Print/Store/Attach)]
A --> B2[Figprint
Resource: Export
Operation: Export (POST)
Kind: label]
B2 -->|binary.data (label text)| C
Server-side Generate (returns JSON status)
flowchart LR
A[Upstream data
(Set/HTTP/Webhook/etc)] --> B[Figprint
Resource: Generate
Operation: Generate (Single)]
A --> C[Figprint
Resource: Generate
Operation: Generate Multi]
B --> D[Downstream logic
(IF/Switch/Writeback)]
C --> D
Frames dropdown / load options
sequenceDiagram
autonumber
participant User as User in n8n editor
participant Node as Figprint node UI
participant API as Figprint Server API
User->>Node: Select File Key
User->>Node: Open Frame dropdown
Node->>API: GET /api/frames?fileKey=...
API-->>Node: { frames: [...] }
Node-->>User: Dropdown options (name/value)
Preview → Export (PDF) using previewId
- Figprint node: Resource =
Preview, Operation =Live Preview - Next Figprint node: Resource =
Export, Operation =Export- Kind =
pdf - Preview ID =
{{$json.previewId}}
- Kind =
Single-frame merge payload
In Preview → Live Preview, set Merge Payload (JSON):
{
"name": "Samuel Pull",
"orderId": "12345"
}
Structured payload example
In Preview → Live Preview, set Structured Payload (JSON):
{
"page1": {
"title": "Hello",
"subtitle": "World"
}
}
Roadmap
Roadmap/backlog is maintained in the repository.
Ideal API (proposed): single-step generate returns a file
Today, PDF/PNG/HTML exports are typically a two-step flow in n8n:
- Preview → Live Preview (returns
previewId) - Export (downloads the binary)
This works well, but the UX is clunky for common automation cases where you just want:
template/fileKey + payload + output kind → binary file.
Proposed endpoint
Goal: a single endpoint that renders and returns the final artifact (PDF/PNG/HTML/label) in one request.
POST /api/generate
Request (suggested)
{
"fileKey": "c1hHGLYqSb7WmBynG7sIJd",
"frame": "optional-frame-id-or-name",
"kind": "pdf",
"labelFormat": "zpl",
"dpi": 203,
"missing": "keep",
"payload": { "...": "merge fields" },
"structuredPayload": { "...": "optional structured input" },
"pagesSpec": [ { "frameID": "1", "...": "optional per-page overrides" } ]
}
Notes
kind:pdf | png | html | label- For
kind=label,labelFormat+dpiapply. payloadshould cover the existing merge payload use case.structuredPayloadandpagesSpecmirror what the Preview API already supports.
Response (suggested)
- Success returns raw bytes with a correct
Content-Type:application/pdfforpdfimage/pngforpngtext/html; charset=utf-8forhtmltext/plain; charset=utf-8forlabel
- Optional headers:
Content-Disposition: attachment; filename="<name>.<ext>"X-Preview-Id: <id>(useful for debugging/cache hits)
Error response (suggested)
Return JSON errors with HTTP status codes:
{ "error": "BadRequest", "message": "Missing fileKey" }
How this maps to the current n8n node
With this endpoint available, the n8n node could expose a single operation like:
Render (One Step)
Under the hood it would either:
- Call the new single-step endpoint directly, or
- (Fallback) do the current two-step Preview → Export flow for older servers.
License
MIT