>_
SudoMock
Popular

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!

1

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
2

Configure Authentication

Add your API key as a Header Auth credential:

  • Header Name: X-API-KEY
  • Header Value: {{ $credentials.sudomockApiKey }}
3

Set Request Body

Configure the JSON body with your mockup details:

n8n JSON Body (with expressions)
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": 95
16
}
17
}

Workflow Examples

Shopify Order → Mockup Generation

Automatically generate product mockups when a new Shopify order comes in:

Shopify TriggerGet Product DesignSudoMock RenderUpload to S3

Workflow: New order triggers → Fetch design URL → Render mockup → Store result

Function Node: Extract Design URL
1
// n8n Function Node: Prepare render request
2
const order = $input.first().json;
3
4
return {
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.id
12
}
13
};

Google Sheets Bulk Processing

Process a spreadsheet of designs and generate mockups in bulk:

Google SheetsLoop Over ItemsSudoMock RenderUpdate Sheet
Bulk Processing Workflow
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 | |
6
7
// The workflow will:
8
// 1. Read each row from Google Sheets
9
// 2. Send design_url to SudoMock
10
// 3. Write the rendered mockup URL back to "Mockup URL" column

Webhook → Real-time Rendering

Accept webhook requests and render mockups in real-time:

Webhook Integration
1
// Webhook Payload Example
2
{
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
}
8
9
// n8n will:
10
// 1. Receive webhook
11
// 2. Map mockup_template to mockup_uuid
12
// 3. Render with SudoMock
13
// 4. POST result to callback_url

Error Handling

Use n8n's built-in error handling to manage failures gracefully:

Error Handling Configuration
1
// Add an Error Trigger node after HTTP Request
2
// Configure retry logic:
3
4
{
5
"maxRetries": 3,
6
"retryDelay": 1000,
7
"retryCondition": "{{ $response.statusCode >= 500 }}"
8
}
9
10
// For 4xx errors, route to error handling workflow:
11
// - 401: Re-authenticate or notify admin
12
// - 429: Wait and retry (rate limited)
13
// - 400: Log invalid request for debugging

Rate Limiting

SudoMock rate limits depend on your plan. Use n8n's "Split In Batches" node to process large datasets without hitting limits.

Storing Credentials Securely

Create a reusable credential in n8n for your SudoMock API key:

  1. Go to Credentials in n8n sidebar
  2. Click Add Credential
  3. Select Header Auth
  4. Name: "SudoMock API Key"
  5. Header Name: X-API-KEY
  6. Header Value: Your API key

Pro Tip: Use Separate Keys

Create separate API keys for production and test workflows. This makes it easy to track usage and revoke keys if needed.

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.