Building a Print-on-Demand Pipeline with n8n
Create an automated POD workflow using n8n and SudoMock. From design upload to listing creation.
What We're Building
This pipeline automatically generates product mockups whenever you upload a new design. Here's the flow:
Prerequisites
- n8n account (cloud or self-hosted)
- SudoMock API key (get free credits)
- Cloud storage account (Google Drive, Dropbox, or S3)
- PSD templates uploaded to SudoMock
Step-by-Step Setup
Create the Trigger
In n8n, create a new workflow and add a Google Drive Trigger node (or your preferred storage). Configure it to watch your designs folder.
{
"resource": "file",
"event": "fileCreated",
"watchFolder": "POD Designs",
"fileTypes": ["image/png", "image/jpeg"]
}Add HTTP Request Node
Add an HTTP Request node to call SudoMock's render API. This generates your mockups.
{
"method": "POST",
"url": "https://api.sudomock.com/api/v1/renders",
"headers": {
"X-API-KEY": "{{ $credentials.sudomockApiKey }}",
"Content-Type": "application/json"
},
"body": {
"mockup_uuid": "your-tshirt-template-uuid",
"smart_objects": [{
"uuid": "your-smart-object-uuid",
"asset": {
"url": "{{ $json.webContentLink }}"
}
}],
"export_options": {
"image_format": "webp",
"image_size": 2000,
"quality": 95
}
}
}Multiple Products
Save Results
Add another Google Drive node to save the rendered mockups. Use expressions to create organized folder structures.
{
"operation": "upload",
"folder": "Mockups/{{ $json.design_name }}",
"fileName": "{{ $json.product_type }}_{{ $json.design_name }}.webp",
"binaryData": false,
"fileUrl": "{{ $json.data.print_files[0].export_path }}"
}Optional: Create Listings
Connect to Etsy or Shopify APIs to automatically create draft listings with your new mockups.
Complete Workflow JSON
Import this workflow directly into n8n to get started quickly:
1{2 "name": "POD Mockup Pipeline",3 "nodes": [4 {5 "name": "Google Drive Trigger",6 "type": "n8n-nodes-base.googleDriveTrigger",7 "position": [250, 300],8 "parameters": {9 "event": "fileCreated",10 "folderId": "your-folder-id"11 }12 },13 {14 "name": "Generate T-Shirt Mockup",15 "type": "n8n-nodes-base.httpRequest",16 "position": [450, 300],17 "parameters": {18 "method": "POST",19 "url": "https://api.sudomock.com/api/v1/renders",20 "authentication": "predefinedCredentialType",21 "nodeCredentialType": "httpHeaderAuth"22 }23 },24 {25 "name": "Save to Drive",26 "type": "n8n-nodes-base.googleDrive",27 "position": [650, 300],28 "parameters": {29 "operation": "upload"30 }31 }32 ],33 "connections": {34 "Google Drive Trigger": {35 "main": [[{"node": "Generate T-Shirt Mockup"}]]36 },37 "Generate T-Shirt Mockup": {38 "main": [[{"node": "Save to Drive"}]]39 }40 }41}Advanced Tips
Result
Related Resources
Ready to Try SudoMock?
Start automating your mockups with 500 free API credits.