Generate documents from templates: merge data into Formstack Documents (WebMerge) templates and data routes, manage deliveries, and combine, convert, compress, encrypt or split PDFs.
Formstack Documents ships in the w6w first-party pack. It declares 26 actions, 2 health checks, and the host runs its code in a sandbox that never sees the credential.
io.w6w.formstack-documentsFormstack Documents (formerly WebMerge) turns data into finished documents: you design a template once — an HTML page, a fillable PDF, or a Word, Excel or PowerPoint file with merge fields — and every merge fills it from the data a workflow sends and produces a PDF, Office file or email.
This app covers the whole template lifecycle: create, update, copy and delete documents, list them by folder or search term, read their merge fields and uploaded files, and attach email or webhook deliveries. Merge a document directly, or merge through a data route that applies conditions and loops to decide which documents to produce and combines them into one PDF. Merges can run in test mode and can return the generated file, base64-encoded, for a later step to store or send.
The PDF tools round it out — combine files, convert Word, Excel, PowerPoint, image or HTML files to PDF, compress, password-protect and split PDFs — so a workflow can assemble, secure and deliver a document packet without leaving w6w. Authentication is the account’s API key and secret; merging also needs the document’s own merge key, which the merge actions look up when it is not supplied.
Three routes to the same 26 actions. The Workflow tab is generated from Formstack Documents's own manifest and carries its real ids, so it is copy-pasteable; the Code and CLI examples are the same call for any action on any app, so every app-specific value in them is a blank you fill in.
document-copy Create a copy of a document under a new name (POST /documents/{id}/copy).
document-create Create a new document (template) of type html, pdf, docx, xlsx or pptx (POST /documents).
document-delivery-create Add a delivery (email, webhook, ...) to a document (POST /documents/{id}/deliveries).
document-delivery-list List the deliveries (email, webhook, ...) configured on a document (GET /documents/{id}/deliveries).
document-fields-get List a document's merge fields; set attributes to include every field attribute (GET /documents/{id}/fields).
document-file-get Get the file uploaded for a pdf/docx/xlsx/pptx document as base64 (GET /documents/{id}/file).
document-get Get one document's details, including its HTML when it is an HTML document (GET /documents/{id}).
document-list List the documents (templates) in the account, optionally filtered by search term or folder (GET /documents).
document-merge Merge data into a document at its merge URL, optionally in test mode and optionally returning the file (POST /merge/{id}/{key}). When no merge key is given it is looked up first.
document-update Update a document. Only the fields you send change; the type cannot be changed (PUT /documents/{id}).
file-combine Combine several files (pdf, docx, xlsx, pptx, images, html) into one PDF or DOCX (POST /tools/combine).
file-convert-to-pdf Convert a docx, xlsx, pptx, image or html file to PDF (POST /tools/convert_to_pdf).
pdf-split Split a PDF into one file per page, or extract/remove page ranges; the result is a ZIP (POST /tools/split_pdf).
route-create Create a data route that merges several documents from one POST (POST /routes).
route-delivery-create Add a delivery (email, webhook, ...) to a data route (POST /routes/{id}/deliveries).
route-delivery-list List the deliveries configured on a data route (GET /routes/{id}/deliveries).
route-fields-get List the merge fields across every document in a route's rules (GET /routes/{id}/fields).
route-merge Merge data through a data route at its merge URL — one POST, many documents (POST /route/{id}/{key}). When no merge key is given it is looked up first. With download set, two or more documents come back as a JSON envelope of base64 files rather than one PDF.
route-update Update a data route; include a rule's id to modify it in place (PUT /routes/{id}).
A workflow step names the app and the action, and the editor fills in the
connection when you pick one. This is the Step shape from the
workflow spec, carrying Formstack Documents's real ids.
{
"manifestVersion": "2",
"name": "formstack-documents-example",
"steps": [
{
"id": "document-copy",
"uses": {
"app": "io.w6w.formstack-documents",
"action": "document-copy",
"connection": "conn_YOUR_CONNECTION_ID"
},
"with": {
"id": "<id>",
"name": "<name>"
}
}
]
}document-copy document-create document-delivery-create document-delivery-list document-fields-get +21 more actions available
Every app-specific value here is a blank you have to fill in. An
app action is reached through the connection that authenticates it, so the
address is a connection id, not the app id — and connections belong to your account,
so a public page cannot know yours. Create one for Formstack Documents, then fill in
the three blanks: conn_YOUR_CONNECTION_ID, the action key, and the
parameters that action declares. The call itself is real — the shape is transcribed
from the studio's own snippet builder, which prints the same kind of blanks — but
nothing in it is specific to Formstack Documents. The Workflow tab is where this app's
real ids are.
npm install @w6w/sdkyarn add @w6w/sdkpnpm add @w6w/sdkdeno add npm:@w6w/sdkimport { W6wClient, isActionRun } from "@w6w/sdk";
// Reads W6W_BASE_URL and W6W_TOKEN from the environment when omitted.
const client = new W6wClient();
const envelope = await client.run({
urn: "conn_YOUR_CONNECTION_ID",
action: "document-copy",
payload: {
id: "<value>",
name: "<value>",
},
});
if (isActionRun(envelope)) console.log(envelope.value); npm install -g @w6w/cli w6w run conn_YOUR_CONNECTION_ID --action document-copy --payload '{"id":"<value>","name":"<value>"}' Give an AI agent Formstack Documents — without giving it Formstack Documents's credentials. One MCP endpoint exposes every app, function and workflow the caller is entitled to, as tools it can discover and run. Access is granted per team while we onboard.
One tool call{
"name": "w6w_invoke",
"arguments": {
"ref": "app:io.w6w.formstack-documents#document-copy",
"input": {
"id": "<id>",
"name": "<name>"
}
}
}
Every tool names its target with a single ref. The
app: form above doesn't name a connection at all — the
host resolves which of the caller's Formstack Documents connections to sign
with, and refuses rather than guesses when the answer is ambiguous.
The token is attached host-side, at the moment of the call. It is never a tool argument, never in the model's context, and never in a transcript — so a prompt injection has nothing to exfiltrate.
Tools are derived per end user from what that person has actually connected and is entitled to — not one shared bot identity carrying the union of everyone's access.
Multi-step work runs on the workflow engine and returns a run handle the agent can poll — retries, branching and state survive the conversation that started them.
Formstack Documents's declared health checks are on the surface too, so an agent can tell "the vendor is down" from "your credential expired" before it burns a retry on either.
The MCP surface is part of the hosted platform. Formstack Documents itself is MIT, and the runtime that executes it is source-available (FSL).
Formstack Documents declares its own checks, so its health is a property of the app rather than something the host guesses at.
The Formstack Documents component group on www.intellistackstatus.com (Intellistack, Formstack's parent brand). The verdict follows the REST API and web app components.