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.
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 atdata.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. A401 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.