Google Sheets
Render jsontoimg templates from selected spreadsheet rows with an Apps Script add-on.
Install the jsontoimg Apps Script add-on (clasp). Map header columns to named layers, render selected rows, and write the signed GET /api/v1/img/{template} URL back to a URL column and/or an in-cell image. Same /api/v1 contract as REST and n8n.
This add-on is button-driven. It does not run on cell edit. For that, use n8n or HTTP. Workspace Marketplace publishing is not required.
Install
- Open the spreadsheet. Optionally open Extensions → Apps Script so a bound project exists.
- Install the CLI:
npm install -g @google/clasp - In
j2i-integrations/google-sheets:npm install,npm run build, thenclasp create --type sheets --title jsontoimg --rootDir dist(or copy.clasp.json.exampleto.clasp.jsonand setscriptId). npm run push— reload the sheet, then jsontoimg → Open. Authorize the script on first run.
Credentials
- Create an API key under Integrations → API keys.
- In the sidebar, open Settings.
- Paste the jsontoimg API key. Leave Base URL blank for
https://app.jsontoimg.com(a trailing/api/v1is stripped). - Click Test connection.
The key is stored in UserProperties for that Google account. Template, format, and column mapping are stored in DocumentProperties on the spreadsheet. Use a dedicated key you can revoke.
First render
- Pick a header row, template, and format.
- Map each named layer to a column header (text layers stringify; image layers take an
http(s)cell). - Pick a URL column and/or image column for write-back.
- Select data rows (cap 50; the header row is skipped) → Render selected.
Each row mints POST /api/v1/img/sign, warms the signed GET /api/v1/img/{template} URL (retries HTTP 503), writes that URL, then for raster formats inserts an in-cell image (SpreadsheetApp.newCellImage). PDF is URL-only.
Limits
- 50 selected rows per run
- Apps Script cannot subscribe to cell edits; use n8n or HTTP for automations
- In-cell images are raster only (
png/jpg/webp/avif)