n8n Integration
Automate mockup rendering with n8n - the most powerful workflow automation tool. Use our official community node for seamless integration.
Official Community Node
RecommendedInstall our official n8n community node for the easiest integration experience. Native operations, built-in credentials, and automatic updates.
Perfect for Print on Demand
Connect Etsy/Shopify orders → Generate mockups → Upload to Printful/Printify automatically
Why n8n + SudoMock?
Visual Workflows
Build complex automations without code
Self-Hosted Option
Keep your data secure on your own servers
400+ Integrations
Connect to any app in your stack
Powerful Transformations
Process data between steps with JavaScript
Community Node Setup (Recommended)
Our official community node provides the best integration experience with native operations and built-in credentials.
Install the Community Node
In your n8n instance, navigate to Settings → Community Nodes:
Search for:
n8n-nodes-sudomockClick Install and restart n8n when prompted.
Create SudoMock Credentials
After installation, add your API credentials:
- Go to Credentials in n8n sidebar
- Click Add Credential
- Search for SudoMock API
- Paste your API key (starts with
sm_)
Get Your API Key
Add SudoMock Node to Workflow
Search for "SudoMock" in the nodes panel. Available operations:
Render Mockup
Generate a mockup with your design
List Mockups
Get all your uploaded mockup templates
Get Mockup Details
Retrieve smart object info for a mockup
Upload Mockup
Upload a new PSD template
Quick Example: Render a Mockup
1// SudoMock node configuration2{3 "operation": "render",4 "mockupId": "{{ $json.mockup_uuid }}",5 "smartObjects": [6 {7 "uuid": "{{ $json.smart_object_uuid }}",8 "assetUrl": "{{ $json.design_url }}",9 "fit": "cover"10 }11 ],12 "format": "webp",13 "size": 1920,14 "quality": 9515}
Alternative: HTTP Request Node
If you prefer not to install community nodes, you can use n8n's built-in HTTP Request node.
Add HTTP Request Node
In your n8n workflow, add an HTTP Request node and configure it:
- Method:
POST - URL:
https://api.sudomock.com/api/v1/renders - Authentication: Header Auth
Configure Authentication
Add your API key as a Header Auth credential:
- Header Name:
X-API-KEY - Header Value:
{{ $credentials.sudomockApiKey }}
Set Request Body
Configure the JSON body with your mockup details:
1{2 "mockup_uuid": "{{ $json.mockup_id }}",3 "smart_objects": [4 {5 "uuid": "{{ $json.smart_object_id }}",6 "asset": {7 "url": "{{ $json.design_url }}",8 "fit": "cover"9 }10 }11 ],12 "export_options": {13 "image_format": "webp",14 "image_size": 1920,15 "quality": 9516 }17}
Workflow Examples
Shopify Order → Mockup Generation
Automatically generate product mockups when a new Shopify order comes in:
Workflow: New order triggers → Fetch design URL → Render mockup → Store result
1// n8n Function Node: Prepare render request2const order = $input.first().json;34return {5 json: {6 mockup_uuid: "your-tshirt-mockup-uuid",7 smart_object_id: "design-area-uuid",8 design_url: order.line_items[0].properties.find(9 p => p.name === "design_url"10 )?.value,11 order_id: order.id12 }13};
Google Sheets Bulk Processing
Process a spreadsheet of designs and generate mockups in bulk:
1// Example Google Sheet structure:2// | Design Name | Design URL | Mockup URL |3// |-------------|-------------------------------------|------------|4// | Summer Tee | https://cdn.example.com/summer.png | |5// | Beach Vibes | https://cdn.example.com/beach.png | |67// The workflow will:8// 1. Read each row from Google Sheets9// 2. Send design_url to SudoMock10// 3. Write the rendered mockup URL back to "Mockup URL" column
Webhook → Real-time Rendering
Accept webhook requests and render mockups in real-time:
1// Webhook Payload Example2{3 "event": "design_uploaded",4 "design_url": "https://cdn.example.com/new-design.png",5 "mockup_template": "tshirt-front",6 "callback_url": "https://your-app.com/mockup-ready"7}89// n8n will:10// 1. Receive webhook11// 2. Map mockup_template to mockup_uuid12// 3. Render with SudoMock13// 4. POST result to callback_url
Error Handling
Use n8n's built-in error handling to manage failures gracefully:
1// Add an Error Trigger node after HTTP Request2// Configure retry logic:34{5 "maxRetries": 3,6 "retryDelay": 1000,7 "retryCondition": "{{ $response.statusCode >= 500 }}"8}910// For 4xx errors, route to error handling workflow:11// - 401: Re-authenticate or notify admin12// - 429: Wait and retry (rate limited)13// - 400: Log invalid request for debugging
Rate Limiting
Storing Credentials Securely
Create a reusable credential in n8n for your SudoMock API key:
- Go to Credentials in n8n sidebar
- Click Add Credential
- Select Header Auth
- Name: "SudoMock API Key"
- Header Name:
X-API-KEY - Header Value: Your API key
Pro Tip: Use Separate Keys
Performance Tips
Use Parallel Execution
Enable "Execute in parallel" for the HTTP Request node to render multiple mockups simultaneously (up to your plan's concurrency limit).
Cache Mockup UUIDs
Store mockup_uuid and smart_object_uuid mappings in a Code node or database instead of hardcoding them.
Use WebP Format
WebP files are ~30% smaller than PNG with similar quality. Faster downloads, lower storage costs.
Need Help?
Check out the GitHub repository for issues, feature requests, or contact support.