Actions23
- Template Actions
- AI Tool Actions
- Form Actions
- Submission Actions
- Submitter Actions
Overview
This node integrates with the DocuSeal API to create and manage document templates, including creating templates from HTML content. The "Create From HTML" operation under the "Template" resource allows users to generate a new document template by providing raw HTML content. This is useful for automating document generation workflows where templates are defined dynamically or programmatically in HTML format.
Common scenarios include:
- Automatically generating contract or agreement templates from HTML snippets.
- Creating branded email templates or reports that can be reused and filled with data.
- Quickly converting existing HTML documents into reusable templates within DocuSeal.
Example: A user provides an HTML string containing a styled invoice layout, names the template "Invoice Template," and optionally configures form fields and folder placement. The node sends this to DocuSeal, which creates a new template ready for use in document generation or submission workflows.
Properties
| Name | Meaning |
|---|---|
| HTML Content | The raw HTML markup used to create the template. This should be a complete HTML snippet representing the document layout. |
| Template Name | The name assigned to the new template. |
| Additional Fields | Optional extra settings for the template: |
| - External ID | A custom identifier for the template, useful for referencing it externally. |
| - Folder Name or ID | Specifies the folder where the template will be stored. |
| - Fields Configuration | Defines form fields associated with the template. Each field includes: |
| • Field Name: Identifier for the field. | |
| • Field Type: Type of input (Checkbox, Date, Image, Initials, Number, Radio, Select, Signature, Text). | |
| • Required: Whether the field must be filled. | |
| • Role: The role responsible for filling the field. |
Output
The node outputs JSON data representing the created template as returned by the DocuSeal API. This typically includes details such as the template ID, name, creation date, and any configured fields.
If the operation succeeds, the output JSON contains the full template object. If an error occurs, the output may contain an error message describing the failure.
No binary data output is produced by this operation.
Dependencies
- Requires an active connection to the DocuSeal API via an API key credential configured in n8n.
- Network access to the DocuSeal service endpoint.
- Proper permissions on the DocuSeal account to create templates.
Troubleshooting
- Invalid HTML Content: If the provided HTML is malformed or incomplete, the API might reject the request. Ensure the HTML is valid and well-formed.
- Missing Required Fields: The "HTML Content" and "Template Name" properties are mandatory. Omitting them will cause errors.
- Invalid Folder Name/ID: Specifying a non-existent folder may cause the API to fail. Verify folder identifiers before use.
- API Request Failures: Network issues or invalid API credentials will result in errors. Confirm API key validity and network connectivity.
- Field Configuration Errors: Incorrectly structured fields configuration (e.g., missing field names or invalid types) may cause the request to fail.
Common error messages:
"Invalid file URL"— Not applicable here since HTML content is sent directly."Failed to create template"— General failure; check API response for details."At least one field must be updated"— Not relevant for creation but appears in update operations.
Links and References
- DocuSeal API Documentation (for detailed API endpoints and payload formats)
- HTML Specification (to ensure valid HTML content)
- n8n Documentation on Creating Custom Nodes