shortcut

Creating Shortcut on Google Drive using Google Apps Script

Gists This is a sample script for creating a shortcut on Google Drive using Google Apps Script. Sample script Before you run the script, please enable Drive API at Advanced Google services. function createShortcut(targetId, name, folderId) { const resource = { shortcutDetails: { targetId: targetId }, title: name, mimeType: "application/vnd.google-apps.shortcut", }; if (folderId) resource.parents = [{ id: folderId }]; const shortcut = Drive.Files.insert(resource); return shortcut.id; } // Please run this function.