Start inputs
Generate contract documents
Passed by the calling system
Headless & Integration package
Turn contract data from any app into a filled Word contract and Excel fee schedule, file both in your DMS and send the contract for e-signature.
About this package
Document generation pipeline produces contract documents without anyone opening Word. An application (your CRM, billing system or a back-office tool) posts the contract data: document type, customer, reference, start date, amount, term, signer and the URL of the Word template.
The Document templates table sets the title, file name pattern, DMS folder, retention period, body text and whether the document type needs a signature. The workflow fills the Word template's {{TITLE}}, {{CUSTOMER}}, {{DATE}}, {{AMOUNT}}, {{REFERENCE}} and {{BODY}} placeholders and, when an Excel template URL is passed, fills a fee schedule with the dates, total and monthly equivalent.
Both files are registered in your document management system with their metadata and retention. Document types that need a signature are sent to the signer through your e-signature service, and the signer gets an email with the signing link. Add rows for your own document types and point the two integrations at your DMS and e-signature provider.
Headless: your application posts the contract data and template URL to the start API or an inbound webhook.
Another system starts it over REST or an inbound webhook. No UI is needed; people only appear where a decision needs a human.
The flow
Contract data received
The calling app posts the document type, customer, reference, start date, amount, term, signer and template URL.
Look up the document type
The Document templates row gives the title, file name pattern, folder, retention, body text and signature rule.
Fill the Word template
The six placeholders are replaced with the contract values, including the term dates.
Build the fee schedule
When an Excel template is passed, the schedule is filled with the dates, total and monthly equivalent.
File in the DMS
The contract and schedule are registered with their metadata, folder and retention period.
Send for signature
Types that need a signature go to the e-signature service and the signer gets the signing link by email.
Forms
The inputs a caller passes when it starts a run, and the forms people complete when the process needs a decision.
Start inputs
Passed by the calling system
Headless
Every workflow can be started over REST, MCP or the CLI, whatever its trigger, with the sample input below. Runs start straight away on the published version; replace <workflow id> with the id the install created.
REST
curl -X POST "$USERTASKS_URL/api/v1/workflows/start" \
-H "Authorization: Bearer $USERTASKS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"workflow_id":"<workflow id>","variables":{"doc_type":"service_agreement","customer_name":"Fourth Coffee Limited","contract_reference":"CT-2026-118","start_date":"2026-11-01","amount":48000,"currency":"NZD","term_months":24,"signer_name":"Robin Diaz","signer_email":"robin.diaz@fourthcoffee.example.com"}}'CLI
usertasks workflows inputs <workflow id> # the start form: keys, types, required
usertasks workflows run <workflow id> --input doc_type=service_agreement --input customer_name="Fourth Coffee Limited" --input contract_reference=CT-2026-118 --input start_date=2026-11-01 … --waitInbound webhook
usertasks webhooks create <workflow id> # prints the hook slug and secret once
curl -X POST "$USERTASKS_URL/api/webhooks/inbound?hook=<slug>" \
-H "Authorization: Bearer <webhook secret>" -H "Content-Type: application/json" \
-d '{"doc_type":"service_agreement","customer_name":"Fourth Coffee Limited","contract_reference":"CT-2026-118","start_date":"2026-11-01","amount":48000,"currency":"NZD","term_months":24,"signer_name":"Robin Diaz","signer_email":"robin.diaz@fourthcoffee.example.com"}'What's included
| Type | Name | Details |
|---|---|---|
| Email template | Document ready to sign | Sent to the signer with the signing link. |
| Data table | Document templates | One row per document type: the title printed on the document, the file name pattern ({reference}, {customer}), the DMS folder, how long to keep it and whether it needs a signature. |
| Integration | Document management system | |
| Integration | E-signature service | |
| API reference | Create signature request | POST /signature-requests — Send the document for electronic signature to the signer and return the envelope and signing link. |
| API reference | Register document | POST /documents — Register a generated document in the DMS: the file is fetched from its URL and filed with its metadata and retention period. |
| Workflow | Generate contract documents | 24 steps — An application posts contract data; the document type sets the title, file name, folder, retention and signature rule; the Word template is filled, an optional Excel schedule is produced, the files are registered in the DMS and the contract is sent for e-signature. |
Document templates · 4 sample rows
Document typeTitleFile name patternDMS folderRetention (days)Signature requiredBody text
Requirements
Credentials never travel in a package. The install wizard asks for what your environment must provide, or installs it incomplete until you finish setup.
Integration “Document management system”Required
Integration “E-signature service”Required
Install
Works on UserTasks cloud and on any self-hosted instance. Installing creates the assets above; nothing runs until you complete setup and start it.
curl -fLO https://usertasks.com/gallery/document-generation-pipeline-1.0.0.utpkg
usertasks packages inspect document-generation-pipeline-1.0.0.utpkg # offline: checksum, hashes, signature
usertasks packages install document-generation-pipeline-1.0.0.utpkg --dry-run
usertasks packages install document-generation-pipeline-1.0.0.utpkg # prompts for each requirement
usertasks packages install document-generation-pipeline-1.0.0.utpkg --keep-incomplete --yes # in CI; finish with:
usertasks packages complete document-generation-pipeline -f values.yamlVerify the download
shasum -a 256 document-generation-pipeline-1.0.0.utpkg should print the file SHA-256. How gallery packages are signed.
Versions
Installing a newer version upgrades in place: local credentials and requirement values are kept, and changes you made are flagged first. How packages work
More packages
Headless & Integration
An AI agent classifies each helpdesk ticket and drafts a reply; confident, low-risk answers go out automatically and the rest wait for a person.
Needs:AI modelREST APIAssigneesInbound webhook
Headless & Integration
A synchronous order endpoint for your storefront: validate, price, fraud-screen, reserve stock, authorise payment and create the shipment in one call.
Needs:REST APIInbound webhookAssignees
Headless & Integration
A CRM "account updated" webhook is validated and fanned out to the ERP, billing platform and support desk, with every result written to a sync log.
Needs:REST APIInbound webhook