メインコンテンツにスキップ

Google-Drive-BULK-Access-remover

Automatically removes specified email addresses from ALL Google Drive files accessible by your account. Because manually removing ex-employees from hundreds of files is not how you want to spend your Friday evening.

AI Summary

Google Drive BULK Access Remover

Bulk removes specified email access from Google Drive files.

Target Users

Intermediate GAS users managing bulk removal of ex-employee access from Drive files.

Problems Solved

Ex-employee emails remain in permissions across hundreds of Drive files, making manual removal time-consuming and error-prone.

Script ID

  1. In GAS Editor: Click "Libraries +" → Paste into "Script ID" field → Click "Look up"
  2. "Google-Drive-BULK-Access-remover" will appear in the search results
  3. Select the latest version (highest number) from "Version" dropdown
  4. Click "Add"

Tags

Main Features
1
Bulk Processing

Processes multiple emails in one run using Drive API queries to find and remove access from shared files.

2
Auto-Resume

Manages 6-min limit with batches, saves state for auto-resume across multiple script runs.

3
Reporting

Provides email/file-type reports with success counts, errors, and processed file lists.

Examples

Main Functions

FunctionDescription
startEmailCleanupStarts bulk email cleanup.
runDiagnosticsRuns full system diagnostics.
checkStatusChecks process status.

Examples

Start Cleanup
/**
 * クリーンアップ開始
 * ・ターゲットメール設定: const TARGET_EMAILS = ['former.employee@company.com', 'freelancer@example.com'];
 * ・診断実行前確認: runDiagnostics();
 * ・メイン処理起動: startEmailCleanup();
 */
function startCleanup() {
  const TARGET_EMAILS = [
    'former.employee@company.com',
    'freelancer@example.com'
  ];
  runDiagnostics();
  startEmailCleanup();
}

Check Status
/**
 * 処理状況確認
 * ・現在状況表示: checkStatus();
 * ・緊急停止: stopProcess();
 * ・CONFIG調整例: const CONFIG = { BATCH_SIZE: 15 };
 */
function monitorProgress() {
  checkStatus();
  // CONFIG = { BATCH_SIZE: 15, MAX_EXECUTION_TIME: 280000 };
  // stopProcess(); // if needed
}

Run Diagnostics
/**
 * 診断テスト
 * ・Drive API接続確認: testDriveV3Access();
 * ・メール検索テスト: testEmailSearch();
 * ・全体診断実行: runDiagnostics();
 */
function testSetup() {
  testDriveV3Access();
  testEmailSearch();
  runDiagnostics();
}

Sample Code

Post a Sample

No sample codes for this library yet

Be the first to post a sample!

Post a Sample