Integrations/Google Sheets
Google Sheets

Google Sheets + ScreenshotDEV

Spreadsheets and data workflows

Use Google Apps Script to capture screenshots from spreadsheet data and write results back to cells. Perfect for enriching URL lists with screenshots, building monitoring dashboards, or generating visual reports from sheet data.

Key features

  • ✓UrlFetchApp.fetch() — built-in HTTP client in Apps Script
  • ✓Read URLs from cells, write screenshot URLs back
  • ✓=IMAGE() formula to display screenshots inline
  • ✓Time-driven triggers for scheduled captures
  • ✓fetchAll() for batch processing multiple URLs
  • ✓No external dependencies — runs in Google's infrastructure
Step by step

How to set it up

Install, configure, and start capturing.

1

Open Apps Script

In your Google Sheet, go to Extensions → Apps Script. This opens the script editor.

2

Write the screenshot function

Use UrlFetchApp.fetch() to call the ScreenshotDEV API. Parse the JSON response to get the screenshot URL.

function captureScreenshot(url) {
  var apiUrl = "https://api.screenshotdev.com/v1/screenshot"
    + "?url=" + encodeURIComponent(url)
    + "&access_key=ak_live_your_key"
    + "&format=png"
    + "&store=true";

  var response = UrlFetchApp.fetch(apiUrl, {
    muteHttpExceptions: true
  });

  var data = JSON.parse(response.getContentText());
  return data.screenshot_url;
}
3

Process URLs from a column

Read URLs from column A, capture screenshots, and write the results to column B. Use =IMAGE() in column C to display thumbnails.

function captureAll() {
  var sheet = SpreadsheetApp.getActiveSheet();
  var urls = sheet.getRange("A2:A").getValues();

  for (var i = 0; i < urls.length; i++) {
    if (!urls[i][0]) continue; // skip empty rows

    var screenshotUrl = captureScreenshot(urls[i][0]);
    var row = i + 2;

    // Write screenshot URL to column B
    sheet.getRange(row, 2).setValue(screenshotUrl);

    // Add =IMAGE() formula in column C
    sheet.getRange(row, 3).setFormula(
      '=IMAGE("' + screenshotUrl + '")'
    );
  }
}
4

Set up a trigger (optional)

Go to Triggers in Apps Script (clock icon) to run the function on a schedule — hourly, daily, or weekly.

Full example

Complete Apps Script

/**
 * Capture screenshots for all URLs in column A.
 * Writes screenshot URL to column B,
 * =IMAGE() formula to column C.
 *
 * Column A: URL to capture
 * Column B: Screenshot CDN URL (auto-filled)
 * Column C: Inline thumbnail (auto-filled)
 */

var API_KEY = "ak_live_your_key";

function captureScreenshot(url) {
  var apiUrl = "https://api.screenshotdev.com/v1/screenshot"
    + "?url=" + encodeURIComponent(url)
    + "&access_key=" + API_KEY
    + "&format=png"
    + "&store=true"
    + "&width=1280"
    + "&block_ads=true";

  var response = UrlFetchApp.fetch(apiUrl, {
    muteHttpExceptions: true
  });

  if (response.getResponseCode() !== 200) {
    return "Error: " + response.getResponseCode();
  }

  var data = JSON.parse(response.getContentText());
  return data.screenshot_url;
}

function captureAll() {
  var sheet = SpreadsheetApp.getActiveSheet();
  var lastRow = sheet.getLastRow();

  if (lastRow < 2) return;

  var urls = sheet.getRange(2, 1, lastRow - 1, 1).getValues();

  for (var i = 0; i < urls.length; i++) {
    var url = urls[i][0];
    if (!url) continue;

    var row = i + 2;

    // Skip if already captured
    var existing = sheet.getRange(row, 2).getValue();
    if (existing) continue;

    var screenshotUrl = captureScreenshot(url);

    sheet.getRange(row, 2).setValue(screenshotUrl);
    sheet.getRange(row, 3).setFormula(
      '=IMAGE("' + screenshotUrl + '")'
    );

    // Respect rate limits
    Utilities.sleep(500);
  }
}

/**
 * Add a custom menu to trigger manually.
 */
function onOpen() {
  SpreadsheetApp.getUi()
    .createMenu("ScreenshotDEV")
    .addItem("Capture all URLs", "captureAll")
    .addToUi();
}

Pro tip: Add a custom menu with onOpen() so anyone with the sheet can trigger captures manually. Use Utilities.sleep(500) between requests to respect rate limits.

Start with 100 free API calls →

No credit card required

Use cases

What people build with Google Sheets

URL enrichment

Paste a list of URLs and automatically enrich each row with a screenshot thumbnail. Great for lead research and prospecting.

Monitoring dashboard

Track multiple pages in a sheet. Schedule daily captures and see visual changes over time.

Asset generation

Generate screenshots for a batch of URLs — product pages, blog posts, or landing pages — and export the CDN URLs.

Client reporting

Capture client websites periodically and embed thumbnails in shared sheets for visual progress tracking.

FAQ

Google Sheets + ScreenshotDEV — Common questions

Do I need any special permissions?
Apps Script will ask for permission to make external HTTP requests (the script.external_request scope) the first time you run the function.
Is there a rate limit in Apps Script?
Apps Script has its own quotas (20,000 URL fetch calls per day for consumer accounts). Add Utilities.sleep(500) between calls to respect ScreenshotDEV rate limits.
Can I display the screenshot in the cell?
Yes. Use the =IMAGE() formula with the screenshot URL. It renders the image inline in the cell and scales with row height.
How do I run it on a schedule?
In Apps Script, go to Triggers (clock icon) → Add Trigger. Select your function, choose time-driven, and pick the frequency (hourly, daily, weekly).

Google Sheets + screenshots.
Ready in minutes.

100 free API calls per month. No credit card. No complex setup.

Google Sheets Integration — ScreenshotDEV