Auto-import (script)

Automatic import via Google Apps Script and Webhook

Step 4: Setting up automatic import

Auto-import creates tasks automatically when new data is added to the sheet. It uses Google Apps Script — the scripting language built into Google Sheets.

4.1. Turn on auto-import in DeepScan

  1. On the Google Sheet page find the block “Automatic import”
  2. Turn on the switch
  3. Enter the value DR (Domain Rating) — applies to every automatic task
  4. Copy Webhook URL and Secret key — you will need them in the script

4.2. Open the Apps Script editor

  1. Open your Google Sheets spreadsheet
  2. In the top menu click “Extensions” → «Apps Script»
  3. The code editor opens in a new tab
  4. Delete all existing code in the editor

4.3. Paste the script

  1. In DeepScan, in the “Automatic import” block, click “▶ Google Apps Script (guide)”
  2. Click “Copy” — the script with your URL and key is copied
  3. Paste the script into the Apps Script editor
  4. Click “Save” (the floppy icon or Ctrl+S)

4.4. Set up the trigger

  1. In the Apps Script editor, pick from the function dropdown (top bar) setupTrigger
  2. Click the button ▶ “Run”
  3. An authorization prompt appears:
    • Click “Review permissions”
    • Choose your Google account
    • If the warning “App isn’t verified” appears — click “Advanced settings” → “Go to project”
    • Click “Allow”
  4. The logs (at the bottom of the screen) show: The trigger was set up successfully!

4.5. Check the trigger

  1. In the Apps Script side menu (on the left) click the icon ⏰ “Triggers”
  2. The trigger should be: onSheetChange — type “On change”

4.6. Test it

  1. In the editor select the function testWebhook and click ▶ “Run”
  2. Check the logs — there should be a response 200
  3. Check DeepScan — the new tasks should appear
Important: The webhook URL must be reachable from the internet. For local development you need a tunnel (cloudflared or ngrok). On production (deepscan.pro) it works out of the box.