Skip to main content
Google Sheets already holds the list you want to render. Apps Script reads each row, calls the SudoMock render API, and writes the finished image URL back into the same row. There is nothing to install.

Before you start

  • An API key from your dashboard.
  • A template. Upload a PSD if you do not have one.
  • Artwork at a URL that loads without signing in, because SudoMock fetches it.
Two ids go into every render: the mockup uuid, and the uuid of the layer you fill. Both arrive together from List PSD mockups, where each entry carries its own uuid and a smart_objects array holding the uuid of every layer you can fill. That page has the call ready to copy in eight languages. Read the pair once and keep it.

Guide

1

Lay out the sheet

Put the header in row 1 and use four columns:
2

Store the key once

Open Extensions, Apps Script, then run this function a single time and delete it. The key lives in script properties from then on, so it never appears in the sheet or in a shared copy of the code.
3

Add the script

Paste this in place of the default code and save.
4

Run it from the sheet

Reload the spreadsheet. A SudoMock menu appears next to Help. Choose Render every row and grant the script permission the first time.
The loop skips any row that already carries a URL in column C. Put renderEveryRow on a time driven trigger and each run picks up where the last one stopped, so a long list finishes across several runs without rendering anything twice.

What comes back

The finished image URL arrives at data.print_files[0].export_path. That single string is what lands in column C, and the whole response, field by field, is on Render a PSD mockup.

When a render fails

Column D holds the message the API returned. A 401 means the stored key is missing or incomplete. A 422 names the field it rejected, usually an empty cell reaching the API as an empty string. A download failure means the design URL asks for a login. Every status is listed in Errors.