Actions80
- Account Actions
- Clipart Actions
- Clipart Storage Actions
- Design Actions
- Font Actions
- Image Actions
- Product Actions
- Project Actions
- Project Folder Actions
- Side Actions
- Storage Actions
- Store Actions
- Template Actions
- Webhook Actions
Overview
The node integrates with the Printcart API to manage templates within a print-on-demand or custom product design workflow. Specifically, the "Create Template" operation allows users to create a new template associated with a project and a side of a product, including preview and template images, notes, layers, and viewport dimensions.
This node is beneficial in scenarios where automated creation and management of design templates are needed, such as:
- Automating template setup for new products or projects.
- Integrating template creation into a larger design or production pipeline.
- Managing multiple templates programmatically without manual intervention.
Example use case: Automatically creating a new design template when a new product side is added, specifying the relevant images and layout parameters.
Properties
| Name | Meaning |
|---|---|
| Authentication | Method of authentication; currently supports "API Token". |
| Project ID | Identifier of the project to which the template belongs (required). |
| Side ID | Identifier of the product side associated with the template (required). |
| Preview Image ID | Identifier of the image used as a preview for the template (required). |
| Template Image ID | Identifier of the main template image (required). |
| Note | A textual note or description related to the template (required). |
| Layer | The layer information for the template, likely describing design layers or elements (required). |
| Viewport Width | Numeric width of the viewport area for the template, with one decimal precision (required). |
| Viewport Height | Numeric height of the viewport area for the template, with one decimal precision (required). |
Output
The output is a JSON array containing the response from the Printcart API after creating the template. This typically includes details of the newly created template such as its ID, associated project and side IDs, image references, notes, layers, viewport dimensions, and other metadata returned by the API.
No binary data output is involved in this operation.
Dependencies
- Requires an API token credential for authenticating requests to the Printcart API.
- The node makes HTTP POST requests to the endpoint
https://<sid>:<secret>@api.printcart.com/v1/templatesusing the provided credentials. - Proper configuration of the API token credential in n8n is necessary for successful execution.
Troubleshooting
- Authentication errors: Ensure that the API token credential is correctly configured and has sufficient permissions.
- Missing required fields: All required properties (Project ID, Side ID, Preview Image ID, Template Image ID, Note, Layer, Viewport Width, Viewport Height) must be provided; missing any will cause the API request to fail.
- Invalid IDs: Using incorrect or non-existent project, side, or image IDs will result in API errors.
- Network issues: Verify network connectivity to the Printcart API endpoint.
- API rate limits or server errors: If the API returns errors related to rate limiting or server problems, retry after some time or check Printcart service status.
Error messages from the API are propagated and can be inspected in the node's output for diagnosis.
Links and References
- Printcart API Documentation (hypothetical link, replace with actual if available)
- n8n documentation on HTTP Request Node for understanding how API calls are made internally.