Create document from template
create-document-from-templateCreate a new document from a template, optionally pre-filling parties, signatories, and dynamic fields, and optionally starting the signing process immediately.
Use this tool when:
The user wants to generate a document based on an existing template
It is usually helpful to call get-template-info with include=["parties", "signatories", "dynamic_fields"] first to discover the template's parties, signatories, and dynamic fields so that the parties, signatories, and dynamic_field_values arguments can be populated correctly.
When completing dynamic fields, take note of the field's type when constructing the value. These are the rules to use when constructing the value string:
number: the numeric value in a string, using '.' as the decimal separator -> "1234.56"
currency: concatenate the ISO currency code and the numeric value with a ';' -> "EUR;1000.10" (for one thousand Euro and ten cents)
currency_duration: same as currency, but append another ';' followed by either
monthlyoryearly-> "EUR;1000.10;monthly" / "USD;1000.10;yearly"select: one of the options from the field's
select_valueslist -> "red"multi_select: an array of the selected values in the
valuesfield -> ["red", "blue"]bool: either of the strings "true" (displayed to the user as "Yes") or "false" (displayed to the user as "No") -> "true" / "false"
duration: a PHP-compatible duration specification -> "P6D" (6 days), "P2W" (2 weeks), "PT12H" (12 hours)
date: the date in the format "YYYY-MM-DD" -> "2026-12-31"
email, text, textarea, or any type not listed above: a string -> "test@example.com"
Setting start_signing=true will move the new document straight into the signing stage and invite the signatories to sign it; this fails if any required information (party data, mandatory dynamic field values, signature blocks) is missing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| parties | No | Specifics of the parties involved in the document, additional to any information from the template. | |
| signatories | No | The specific people who will sign the document | |
| document_name | No | The name of the new document. If omitted, the name of the template will be used | |
| start_signing | No | Whether to immediately start the signing process and invite the signatories to sign the document. This may fail if not all party or signatory data is completed, or mandatory dynamic fields do not have values | |
| template_uuid | Yes | UUID of the template to create the document from. Must be one of the template UUIDs returned by list-templates | |
| dynamic_field_values | No | Values for the template's dynamic fields. Signing can only start when all mandatory dynamic fields from the template have values provided. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | URL to open the document in fynk | |
| name | No | Name of the document | |
| tags | No | The tags on the document. Tags are the account's own classification labels (e.g. relationship type, commercial significance, region), so they show which categories this account uses and can be filtered on with filter_tags. | |
| uuid | No | Unique identifier for the document. Do not show to the user unless they ask for it | |
| stage | No | What stage the document is in currently | |
| teams | No | The teams the document is assigned to. | |
| locale | No | Locale code, e.g. en-GB, de-AT. Absent when the document has none set. Prefer describing the locale in natural language (e.g. 'British English') rather than showing the raw code. | |
| origin | No | How the document was created. | |
| parties | No | The contracting entities on the document. | |
| conditions | No | The document's conditions: rules over its dynamic fields deciding whether a passage of the document applies, and whether each currently holds. Use them to explain why a clause is or is not part of the document, and what would have to change to flip it. | |
| created_at | No | When the document was created. | |
| updated_at | No | When the document was last updated. | |
| archived_at | No | When the document was archived. Absent when the document is not archived. | |
| signatories | No | The individual people who sign the document. Distinct from parties: a signatory often signs on behalf of a party (e.g. a business), so a person may be a signatory without appearing as a party. | |
| _entity_type | No | Only relevant for tooling. Do not show to the user | |
| summary_text | No | A summary of the document content. Absent when the document has no summary. | |
| document_type | No | If present, indicates what kind of document this is. Absent when the document has no type assigned | |
| dynamic_fields | No | The document's dynamic fields and their values. | |
| signature_type | No | eIDAS assurance level used when signing the document. Absent when none has been chosen. | |
| workflow_state | No | Gives an indication of which stage transitions, etc are possible to perform on this document. This object is technical state, not display content: when relaying it to the user, always render it as natural-language prose and never echo raw field names or snake_case values (e.g. say 'signing cannot be started yet because not every signature block has been assigned to a signatory' instead of mentioning 'can_start_signing' or 'signature_block_signatory'). | |
| metadata_values | No | The document's metadata fields and their values. | |
| signature_blocks | No | The places in the document that are signed. A block is bound either to a single signatory or to a party, in which case every signatory of that party signs it. Every signatory needs a block covering them before signing can be started. | |
| sequential_signing | No | When true, signatories sign one at a time, in ascending order of their signing_order. | |
| source_template_uuid | No | UUID of the template the document was created from. Absent when it was not created from a template. | |
| external_signatory_invitation_message | No | Text shown in the email inviting external signatories to sign. Absent when no message is set. |