Actions83
- 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
This node integrates with the Printcart API to manage templates within a print-on-demand or custom product design platform. Specifically, the "Create Template" operation allows users to create a new template associated with a project and a side of a product, including images and layout details.
Common scenarios where this node is beneficial include:
- Automating the creation of product templates in a print-on-demand workflow.
- Managing design assets programmatically for e-commerce products.
- Integrating template creation into larger automation workflows that handle product customization.
Practical example:
- A user wants to automatically generate a new product template when a new design is approved. They can use this node to create the template by specifying the project, side, preview image, template image, notes, layers, and viewport dimensions.
Properties
| Name | Meaning |
|---|---|
| Authentication | Method of authentication; currently supports only "API Token". |
| Project ID | The identifier of the project to which the template belongs. |
| Side ID | The identifier of the product side associated with the template. |
| Preview Image ID | The identifier of the preview image used for the template. |
| Template Image ID | The identifier of the main template image. |
| Note | A textual note or description related to the template. |
| Layer | The layer information for the template (likely describing design layers or elements). |
| Viewport Width | Numeric value representing the width of the viewport for the template (with one decimal place). |
| Viewport Height | Numeric value representing the height of the viewport for the template (with one decimal place). |
Output
The output is a JSON array containing the response from the Printcart API after creating the template. The structure corresponds to the API's response for a newly created template object, typically including fields such as template ID, project ID, side ID, image references, notes, layers, viewport dimensions, timestamps, and other metadata.
No binary data output is produced by 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://api.printcart.com/v1/templates. - The environment must have network access to the Printcart API.
- Proper configuration of the API token credential in n8n is necessary.
Troubleshooting
- Authentication errors: If the API token is invalid or missing, the node will fail to authenticate. Ensure the API token credential is correctly set up and has sufficient permissions.
- Missing required parameters: All properties marked as required must be provided; otherwise, the API may return validation errors.
- Network issues: Connectivity problems to the Printcart API endpoint will cause request failures.
- API errors: The API might return errors if the referenced project ID, side ID, or image IDs do not exist or are incorrect.
- To debug, check the error messages returned by the API in the node's output. Enabling "Continue On Fail" can help process multiple items even if some fail.
Links and References
- Printcart API Documentation (Assumed URL; replace with actual if known)
- n8n documentation on HTTP Request Node for understanding how API calls are made
- General guidance on API Authentication in n8n