Airtable Integration
Connect Airtable to SudoMock and generate mockups automatically when records are added or updated.
Perfect for Product Catalogs
Store designs in Airtable → Trigger mockup generation → Save results back to Airtable
Use Cases
Product Catalog Management
Auto-generate mockups when new designs are added
Team Collaboration
Designers upload, mockups generate automatically
Batch Processing
Update multiple records, generate all mockups at once
E-commerce Sync
Push generated mockups to Shopify/Etsy listings
Integration Methods
There are three ways to connect Airtable with SudoMock:
1. Airtable Automations (No Code)
Use Airtable's built-in automations with "Run a script" action to call SudoMock API.
2. n8n/Zapier/Make
Connect Airtable trigger to SudoMock action in your automation platform of choice.
3. Custom Script
Write a script that reads from Airtable API and calls SudoMock API.
Method 1: Airtable Automations
Set Up Your Airtable Base
Create a table with these fields:
- Design URL (URL) — Link to your design PNG
- Product Type (Single Select) — T-shirt, Mug, Poster, etc.
- Mockup URL (URL) — Will store generated mockup
- Status (Single Select) — Pending, Processing, Done
Create Automation
Go to Automations → Create automation → Choose trigger: "When record matches conditions" Set condition: Status = "Pending"
Add Script Action
Add action → "Run a script" → Paste this code:
1// Airtable Automation Script2// Input variables: designUrl, productType, recordId34const SUDOMOCK_API_KEY = 'YOUR_API_KEY';56// Template UUIDs for each product type7const TEMPLATES = {8 't-shirt': { mockup: 'tshirt-uuid', smartObject: 'so-uuid' },9 'mug': { mockup: 'mug-uuid', smartObject: 'so-uuid' },10 'poster': { mockup: 'poster-uuid', smartObject: 'so-uuid' }11};1213const template = TEMPLATES[input.productType.toLowerCase()];1415if (!template) {16 throw new Error(`Unknown product type: ${input.productType}`);17}1819// Call SudoMock API20const response = await fetch('https://api.sudomock.com/api/v1/renders', {21 method: 'POST',22 headers: {23 'X-API-KEY': SUDOMOCK_API_KEY,24 'Content-Type': 'application/json'25 },26 body: JSON.stringify({27 mockup_uuid: template.mockup,28 smart_objects: [{29 uuid: template.smartObject,30 asset: { url: input.designUrl }31 }],32 export_options: {33 image_format: 'webp',34 image_size: 2000,35 quality: 9536 }37 })38});3940const result = await response.json();4142if (!result.success) {43 throw new Error(result.detail);44}4546// Return mockup URL to update the record47output.set('mockupUrl', result.data.print_files[0].export_path);Update Record
Add another action → "Update record" → Set Mockup URL field to script output. Set Status to "Done".
Input Variables
designUrl→ Map to Design URL fieldproductType→ Map to Product Type fieldrecordId→ Map to Record ID
Method 2: Using n8n
For more complex workflows, use n8n with Airtable trigger:
1// n8n Workflow21. Airtable Trigger3 - Table: Products4 - Trigger On: Record Created562. HTTP Request (SudoMock)7 - Method: POST8 - URL: https://api.sudomock.com/api/v1/renders9 - Headers: X-API-KEY = YOUR_API_KEY10 - Body: {11 "mockup_uuid": "{{ $json.product_type_uuid }}",12 "smart_objects": [{13 "uuid": "{{ $json.smart_object_uuid }}",14 "asset": { "url": "{{ $json.Design_URL }}" }15 }]16 }17183. Airtable Update19 - Record ID: {{ $('Airtable Trigger').item.json.id }}20 - Fields: { "Mockup_URL": "{{ $json.data.print_files[0].export_path }}" }Method 3: Custom Script
For full control, use a script that processes all pending records:
1import Airtable from 'airtable';23const base = new Airtable({ apiKey: process.env.AIRTABLE_API_KEY })4 .base(process.env.AIRTABLE_BASE_ID);56const SUDOMOCK_API_KEY = process.env.SUDOMOCK_API_KEY;78async function processPendingRecords() {9 // Get all pending records10 const records = await base('Products')11 .select({12 filterByFormula: "{Status} = 'Pending'",13 maxRecords: 5014 })15 .all();1617 console.log(`Processing ${records.length} records...`);1819 for (const record of records) {20 try {21 // Update status to Processing22 await record.updateFields({ Status: 'Processing' });2324 // Generate mockup25 const response = await fetch('https://api.sudomock.com/api/v1/renders', {26 method: 'POST',27 headers: {28 'X-API-KEY': SUDOMOCK_API_KEY,29 'Content-Type': 'application/json'30 },31 body: JSON.stringify({32 mockup_uuid: getTemplateUuid(record.get('Product Type')),33 smart_objects: [{34 uuid: getSmartObjectUuid(record.get('Product Type')),35 asset: { url: record.get('Design URL') }36 }]37 })38 });3940 const result = await response.json();4142 if (result.success) {43 await record.updateFields({44 'Mockup URL': result.data.print_files[0].export_path,45 Status: 'Done'46 });47 console.log(`✓ ${record.id}`);48 } else {49 throw new Error(result.detail);50 }5152 } catch (error) {53 await record.updateFields({54 Status: 'Error',55 Notes: error.message56 });57 console.error(`✗ ${record.id}: ${error.message}`);58 }5960 // Respect rate limits61 await new Promise(r => setTimeout(r, 500));62 }63}6465processPendingRecords();Ready to Connect Airtable?
Get your API key and start generating mockups from your Airtable base.