n8n Integration
Automate mockup rendering with n8n—the most powerful workflow automation tool. Trigger renders from Shopify orders, Google Sheets, webhooks, and 400+ apps.
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
Quick Setup
Use n8n's HTTP Request node to call SudoMock API. No custom nodes needed!
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" columnWebhook → 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_urlError 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 debuggingRate 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?
Join our community or contact support for workflow assistance.