SudoMock
Official Node

n8n Integration

Automate mockup rendering with n8n - the most powerful workflow automation tool. Use our official community node for seamless integration.

Official Community Node

Recommended

Install 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.

1

Install the Community Node

In your n8n instance, navigate to Settings → Community Nodes:

Search for:

n8n-nodes-sudomock

Click Install and restart n8n when prompted.

2

Create SudoMock Credentials

After installation, add your API credentials:

  1. Go to Credentials in n8n sidebar
  2. Click Add Credential
  3. Search for SudoMock API
  4. Paste your API key (starts with sm_)

Get Your API Key

Go to Dashboard → API Keys → Create New Key
3

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

Node Parameters
1// SudoMock node configuration
2{
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": 95
15}

Alternative: HTTP Request Node

If you prefer not to install community nodes, you can use n8n's built-in HTTP Request node.

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
2const order = $input.first().json;
3
4return {
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?

Check out the GitHub repository for issues, feature requests, or contact support.

n8n Mockup Node — Install & Setup | SudoMock Docs