Batch-generate a Recraft icon set from a Google Sheet
Fill an entire icon set on autopilot. Every hour, a spreadsheet drives Recraft to generate on-brand SVG icons and drop share links back in each row.
Every hour on a cron trigger, run a batch icon generator driven by a Google Sheet. This is a fully deterministic pipeline: read the sheet, generate any missing SVGs through Recraft, upload each SVG to Google Drive, and write the share URL back to the row. No reasoning or branching decisions.
Expose these configuration constants at the top of the workflow so an operator can tune the set without editing code: spreadsheetId (the Google Sheets ID of the icon-set workbook), sheetTab (the tab name, default 'Icons'), promptColumnHeader (default 'prompt'), svgUrlColumnHeader (default 'SVG URL'), driveFolderId (the destination Google Drive folder), stylePrefix (a shared string prepended to every prompt so the whole set stays visually consistent, for example 'Flat two-color line icon on white background, 2px stroke, rounded corners: '), and maxRowsPerRun (default 40).
Step 1. Read the icon-set tab with Google Sheets Get Values. Fetch a wide range that covers the header row and all data rows, for example 'Icons!A1:Z1000'. Parse the first row as headers and resolve the column indexes for promptColumnHeader and svgUrlColumnHeader by name, not by fixed letter, so the workflow keeps working if columns are reordered.
Step 2. Walk the data rows in order. Collect rows where the prompt cell is non-empty AND the SVG URL cell is empty. Stop collecting once maxRowsPerRun rows have been queued. This empty-cell check is what makes the workflow idempotent, so re-running it never regenerates rows that already have a link.
Step 3. For each queued row, in order, run the three-step per-row pipeline:
3a. Call Recraft Generate Vector Image (SVG) with prompt = stylePrefix + rowPromptText, n = 1, size = '1:1', response_format = 'url'. Read data[0].url from the response and fetch the SVG bytes.
3b. Call Google Drive Upload File (Multipart). Target driveFolderId as the parent, filename '<sanitized-prompt>.svg' (slug the row prompt, cap around 60 chars), and mimeType 'image/svg+xml'. Capture the returned file id and webViewLink; if webViewLink is not populated, construct 'https://drive.google.com/file/d/<id>/view' from the file id.
3c. Call Google Sheets Update Values, targeting the single cell for that row's SVG URL column (for example 'Icons!E17'), with valueInputOption = 'USER_ENTERED' so the URL renders as a clickable hyperlink.
Step 4. Error isolation. If any single row fails (Recraft non-2xx, upload failure, or update failure), log the error with the row number and prompt text and continue with the next row. Do not abort the whole run. The next hourly run will naturally retry the failed row because its SVG URL cell is still empty.
Design notes to bake in. Rate-limit safety: keep maxRowsPerRun at or below 40 so a full run stays comfortably under Recraft's 100-images-per-minute and 5-requests-per-second limits even with retries; if you want a faster ramp, add a small delay between calls instead of raising the cap blindly. Consistency: the stylePrefix is what makes every icon in the set look like it belongs together, so always concatenate it in front of the row prompt and never send a raw cell value to Recraft. Idempotency: the only signal that a row has been processed is a non-empty SVG URL cell, so write that cell last, after the Drive upload succeeds.
What does this prompt do?
- Reads your icon-set tab in Google Sheets each hour and finds every row that still needs an SVG.
- Sends the row's short description to Recraft with a shared brand style, so every icon in the set looks like it belongs together.
- Saves each finished SVG to a designated Google Drive folder and writes the share link back to the same row.
- Skips rows that already have a link, so you can rerun the workflow safely as new prompts are added.
What do I need to use this?
- A Google account with edit access to the spreadsheet and the destination Drive folder
- A Recraft account with API access and enough credit to cover a set's worth of icons
- A Google Sheet that has a prompt column and an SVG URL column ready to fill
- A short brand style description (or a saved Recraft brand style) that every icon should follow
How can I customize it?
- Change the hourly schedule to run more or less often, or only during business hours
- Tune the shared style description to match a rebrand: line weight, palette, or overall vibe
- Raise or lower the per-run row limit depending on how fast you want to fill the set
FAQs
What if I add more rows after the workflow already ran?
Can I lock in my own brand style, not just a text description?
How many icons will it produce per hourly run?
Where do the actual SVG files end up?
Do I need to edit anything after setup?
Related templates
Every Monday, check every S3 bucket for public exposure, missing encryption and weak backup settings, then get the risks ranked in Slack.
Every weekday at 7am, sign in to the tender portals you track, filter new notices against your bid criteria, and open a deal for the ones worth chasing.
Every weekday at 4pm, spot the threads that went quiet, stage a ready-to-send nudge in your mailbox, and get a ranked Slack recap.
Keep a spreadsheet of your most important senders, and every email from one gets labeled, posted to your team channel, and logged automatically.
The moment an order is fulfilled, we register it with Yotpo so the review request is timed off real delivery, and we log every sync so failures never go unnoticed.
Every night at 11pm we compare the day's Shopify orders with your Zoho Books invoices and payments, and flag only what does not match.
Turn a spreadsheet into a full icon set.
Stop hand-generating icons one at a time. Set up the sheet once and let each new row fill itself.