Create document from PDF upload
create-document-from-pdf-uploadCreate a new document from a PDF previously uploaded via create-document-pdf-upload-url.
Use this tool when:
The user wants to import an existing PDF into fynk as a draft document for further processing, OR
The user wants to record an already-signed PDF in fynk by setting initial_stage to "done"
Call create-document-pdf-upload-url first to obtain file_upload_uuid, then upload the PDF to the URL it returns with a multipart/form-data POST, as that tool describes, before calling this tool. initial_stage is required and must be either "draft" or "done"; ask the user which they want if it isn't clear from context. Depending on the account's settings, template_uuid may be required (it copies checkpoints, document type, metadata, parties, etc. from a template).
Only pass auto_apply_ai_analysis when the user has expressed whether AI analysis results should be applied to the document automatically; omit it to use the account's default setting.
The team_uuids, tag_uuids, and account_party_uuid arguments expect UUIDs, which can be discovered via list-account-teams, list-account-tags, and list-account-parties respectively.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_name | Yes | The name of the file being uploaded | |
| tag_uuids | No | UUIDs of the tags to apply to the document. UUIDs can be obtained from list-account-tags | |
| team_uuids | No | UUIDs of the teams to assign the document to. May be required depending on the account's settings. UUIDs can be obtained from list-account-teams | |
| document_name | No | The name of the new document. If omitted, the file_name will be used. Ask the user if they would like to give their own name for the document | |
| initial_stage | Yes | The new document will be created in this stage. Prompt the user for this if they don't supply it | |
| template_uuid | No | UUID of the template to copy Checkpoints, document type, metadata, parties, etc from. If present, must be one of the template UUIDs returned by list-templates. May be required depending on the account's settings. | |
| file_upload_uuid | Yes | UUID given by create-document-pdf-upload-url | |
| account_party_uuid | No | Optional UUID of the account party to add to the document as the internal party. UUID can be obtained from list-account-parties | |
| auto_apply_ai_analysis | No | If true, results of the AI analysis of the document (metadata, parties, etc.) are applied to the document automatically instead of being left for manual review. If not sent, the account's auto_apply_ai_analysis_by_default setting from get-account-info is used. |
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. |