First-party app
Formstack Documents

Formstack Documents

Generate documents from templates: merge data into Formstack Documents (WebMerge) templates and data routes, manage deliveries, and combine, convert, compress, encrypt or split PDFs.

stable Documents & FilesProductivity

About

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.

App id
io.w6w.formstack-documents
Version
0.1.0
Author
w6w
Licence
MIT
Categories
Documents & Files · Productivity

Overview

Formstack 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.

Build with Formstack Documents

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.

Copy Document

document-copy

Create a copy of a document under a new name (POST /documents/{id}/copy).

Create Document

document-create

Create a new document (template) of type html, pdf, docx, xlsx or pptx (POST /documents).

Delete Document

document-delete

Delete a document (DELETE /documents/{id}).

Create Document Delivery

document-delivery-create

Add a delivery (email, webhook, ...) to a document (POST /documents/{id}/deliveries).

List Document Deliveries

document-delivery-list

List the deliveries (email, webhook, ...) configured on a document (GET /documents/{id}/deliveries).

Get Document Fields

document-fields-get

List a document's merge fields; set attributes to include every field attribute (GET /documents/{id}/fields).

Get Document File

document-file-get

Get the file uploaded for a pdf/docx/xlsx/pptx document as base64 (GET /documents/{id}/file).

Get Document

document-get

Get one document's details, including its HTML when it is an HTML document (GET /documents/{id}).

List Documents

document-list

List the documents (templates) in the account, optionally filtered by search term or folder (GET /documents).

Merge Document

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.

Update Document

document-update

Update a document. Only the fields you send change; the type cannot be changed (PUT /documents/{id}).

Combine Files

file-combine

Combine several files (pdf, docx, xlsx, pptx, images, html) into one PDF or DOCX (POST /tools/combine).

Convert File to PDF

file-convert-to-pdf

Convert a docx, xlsx, pptx, image or html file to PDF (POST /tools/convert_to_pdf).

Compress PDF

pdf-compress

Compress a PDF file (POST /tools/compress_pdf).

Encrypt PDF

pdf-encrypt

Password-protect a PDF and set its permissions (POST /tools/encrypt_pdf).

Split 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).

Create Data Route

route-create

Create a data route that merges several documents from one POST (POST /routes).

Delete Data Route

route-delete

Delete a data route (DELETE /routes/{id}).

Create Data Route Delivery

route-delivery-create

Add a delivery (email, webhook, ...) to a data route (POST /routes/{id}/deliveries).

List Data Route Deliveries

route-delivery-list

List the deliveries configured on a data route (GET /routes/{id}/deliveries).

Get Data Route Fields

route-fields-get

List the merge fields across every document in a route's rules (GET /routes/{id}/fields).

Get Data Route

route-get

Get one data route's details (GET /routes/{id}).

List Data Routes

route-list

List the data routes in the account (GET /routes).

Merge Data Route

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.

Get Data Route Rules

route-rules-get

List a data route's rules (GET /routes/{id}/rules).

Update Data Route

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>"
      }
    }
  ]
}

Here are some of the things you can do

  • Copy Document

    perform
    document-copy
  • Create Document

    perform
    document-create
  • Create Document Delivery

    perform
    document-delivery-create
  • List Document Deliveries

    read
    document-delivery-list
  • Get Document Fields

    read
    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.

Install
npm install @w6w/sdk
yarn add @w6w/sdk
pnpm add @w6w/sdk
deno add npm:@w6w/sdk
Code
import { 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);
Install the CLI
npm install -g @w6w/cli
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.

What the agent gets

Credentials it can't read

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.

A tool surface scoped to the caller

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.

A durable workflow in one call

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.

Health-aware discovery

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).

Request MCP access

Health checks

Formstack Documents declares its own checks, so its health is a property of the app rather than something the host guesses at.

service

Formstack Documents status

The Formstack Documents component group on www.intellistackstatus.com (Intellistack, Formstack's parent brand). The verdict follows the REST API and web app components.

quota

API quota headroom