Receiving events
Create a webhook endpoint in Flowsign at Settings > Webhooks (my.flowsign.app/settings/webhooks), or with the API (see Webhooks).- Add a Webhook node, set it to accept
POST, and activate the workflow so it gets a production URL. - Paste that URL into the endpoint’s Endpoint URL field in Flowsign.
- Tick the events to subscribe to (for example Package completed) and save. Flowsign shows the endpoint’s signing secret once; store it.
POST with four headers and a JSON body:
data differs per event. See Events for every event’s shape.
Verifying the signature
Build the signed content from thex-flowsign-timestamp header, a ., and the raw body. Compute its hex HMAC-SHA256 with the endpoint secret and accept the delivery when it matches any v1= entry in x-flowsign-signature and the timestamp is within 5 minutes of your clock (see Webhooks). n8n parses the body into JSON by default, and re-serialising it back to a string isn’t guaranteed to match the exact bytes Flowsign signed. In the Webhook node’s options, turn on Raw Body so the unparsed body is available at $json.rawBody on the production URL.
Add a Crypto node next, with Action set to Hmac, Type set to SHA256, Value set to {{ $json.headers["x-flowsign-timestamp"] }}.{{ $json.rawBody }}, Encoding set to hex, and the secret in its Crypto credential. Follow it with an IF node checking that the Webhook node’s x-flowsign-signature header contains v1= followed by the Crypto node’s output, and stop the workflow on the false branch. The IF node does not check the timestamp; use the Code node below when you want that too.
To do the same in a Code node instead:
Calling the API
Use the HTTP Request node for any Flowsign API call. Base URL:https://my.flowsign.app. Every request needs:
Create the key at Settings > API keys and choose the workspaces it can act in; see Authentication. Store it in an n8n credential (Header Auth, with
Authorization as the header name and Bearer fsk_your_key_here as the value) rather than pasting it into the node.
List packages
Method GET, URLhttps://my.flowsign.app/api/v1/packages?status=IN_PROGRESS.
Create a package from a template
Method POST, URLhttps://my.flowsign.app/api/v1/packages/from-template, body type JSON:
role must match one of the template’s role names and every role must be filled; fields keys must be merge fields the template asks the sender for. A mismatch returns 422 with the unknown or missing names in details. status is "draft" (default) or "sent", which sends immediately. externalId is optional and makes the call idempotent: retrying with the same value returns the existing package instead of creating a duplicate.
Recipe: save signed PDFs to SharePoint or Google Drive
This workflow files every completed package as a PDF in a SharePoint document library or a Google Drive folder. It has three nodes: catch the event, download the PDF from Flowsign, and hand it to the storage node.1
Catch the completed event
Set up the Webhook node as in Receiving events, and subscribe the Flowsign endpoint to Package completed only.Flowsign sends the event once the signed copies are ready, so the workflow can download straight away.
2
Download the signed PDF
Add an HTTP Request node:
The response is the PDF itself: every document in the package merged into one file.
certificate=true appends the certificate of completion; leave it off for the documents alone.3
Save the file
Add the storage node with its File resource and Upload operation.
- Google Drive
packageId is pkg_test, which has no file, so the download node returns 404 until a real package completes.
Things to know:
- File names. Naming the file by
packageIdis always safe. To use the title instead, strip the characters SharePoint refuses (" * : < > ? / \ |) first, for example{{ $('Webhook').item.json.body.data.packageTitle.replace(/["*:<>?\/\\|]/g, '-') }}.pdf. Two packages can share a title, so keep the id in the name if the folder must never overwrite. - Filing by custom field.
data.metadatacarries the package’s custom field values, so a value such as{{ $('Webhook').item.json.body.data.metadata.client_code }}can pick the folder. - Separate files. For one file per document instead of a merged PDF, call
/download/zipand save the zip, or list the package withGET /api/v1/packages/{packageId}and download each document id with?documents=. - Large packages. A package too large to merge returns
413. Use/download/zipfor those. - Permissions. The key’s role needs the send packages permission, and the key must act in the workspace the package belongs to.

