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
- On the Google Sheet page find the block “Automatic import”
- Turn on the switch
- Enter the value DR (Domain Rating) — applies to every automatic task
- Copy Webhook URL and Secret key — you will need them in the script
4.2. Open the Apps Script editor
- Open your Google Sheets spreadsheet
- In the top menu click “Extensions” → «Apps Script»
- The code editor opens in a new tab
- Delete all existing code in the editor
4.3. Paste the script
- In DeepScan, in the “Automatic import” block, click “▶ Google Apps Script (guide)”
- Click “Copy” — the script with your URL and key is copied
- Paste the script into the Apps Script editor
- Click “Save” (the floppy icon or
Ctrl+S)
4.4. Set up the trigger
- In the Apps Script editor, pick from the function dropdown (top bar) setupTrigger
- Click the button ▶ “Run”
- 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”
- The logs (at the bottom of the screen) show:
The trigger was set up successfully!
4.5. Check the trigger
- In the Apps Script side menu (on the left) click the icon ⏰ “Triggers”
- The trigger should be:
onSheetChange— type “On change”
4.6. Test it
- In the editor select the function testWebhook and click ▶ “Run”
- Check the logs — there should be a response
200 - 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.