How to List Files from Google Drive into Google Sheets
Google Drive stores your files, but it does not give you a spreadsheet-style list you can filter, sort, or share with your team.
To list files from Google Drive in Google Sheets, use Drive Explorer Pro. Open the add-on inside your sheet, pick files from Google Drive, and it adds each file's name, link, size, and other details as rows — no coding required.
In this guide, you will walk through the Drive Explorer Pro workflow step by step. There is also an optional Google Apps Script method at the end if you need scheduled automation.
Table of Contents
Video Tutorial
Prerequisites
Before you start, make sure you have:
- A Google account with access to Google Drive and Google Sheets
- Read access to the Drive folder or files you want to list
- Edit access to the spreadsheet where the list should appear
- Permission to install add-ons from the Google Workspace Marketplace
If you only need to link one or two files, see how to link a Google Drive file to Google Sheets first. This guide is for building a full file list in rows.
Listing Files with Drive Explorer Pro
Drive Explorer Pro is a Google Sheets add-on that lists Drive files through a sidebar. You pick files in Google Drive, choose which details appear as columns, and add one row per file.
When to use: You want a file inventory in Google Sheets without writing code.
Why use Drive Explorer Pro
- List many files at once from a Drive file picker.
- Choose which columns to add: file name, URL, direct download link, size, MIME type, file ID, and more.
- Set file access before listing so shared links work when you send the sheet.
Install Drive Explorer Pro from the Google Workspace Marketplace:
Launching Drive Explorer Pro
-
Open the Google Sheets spreadsheet where you want the file list.
-
Click Extensions → Drive Explorer Pro → Open Drive Explorer Pro.

The sidebar opens on the right side of your sheet.
Configuring What Gets Listed (One-Time Setup)
Before you list files, set up the List Files tab once. Drive Explorer Pro can reuse these settings on the next run.
-
Open the List Files tab in the sidebar.
-
Under Start listing file from, choose:
- Currently Selected Cell for a new list starting at your cursor, or
- Append Below Existing Data to add new rows without overwriting old ones.
-
Under Select File Attributes to List, check the columns you want. Common choices:
- File Name Linked to URL — clickable file name
- File URL — standard Google Drive link
- Direct Download Link — link that starts a download (see how direct download links work)
- File Size (MB)
- Mime Type
- File ID
- Image Preview — thumbnail for image files
-
Drag attributes to set column order, then click Save Selected Settings as Default.

In the Settings tab, set File Access to Anyone with the link if people opening the sheet should also be able to open the listed files. Sharing the spreadsheet does not share the Drive files automatically.
Selecting Files and Building the List
- Go back to the List Files tab.
- Click Select existing files from Drive and List in Sheets.
- Browse to your folder and select the files. Hold Ctrl on Windows or Command on Mac to select multiple files.
- Click Select and wait until all rows appear. Do not close the sidebar while the list is being built.
Result: Each file appears on its own row with the columns you selected.

Click a link in the sheet to confirm it opens the file in Google Drive.
To refresh the list later, use Append Below Existing Data so new files are added without deleting existing rows.
Listing Files with Google Apps Script (Optional)
If you need a scheduled or fully custom workflow, you can list files with Google Apps Script instead. This method requires editing a short script and does not use Drive Explorer Pro.
When to use: You want automation on a timer or need to modify the script for a specific folder ID.
Opening the Apps Script Editor
-
Open the Google Sheets spreadsheet where you want the file list.
-
Click Extensions → Apps Script.

The Apps Script editor opens in a new browser tab.
Pasting and Configuring the Script
- Delete the placeholder code in the editor.
- Paste this script:
function listDriveFiles() {// Replace with your folder ID from the folder URL:// https://drive.google.com/drive/folders/FOLDER_IDconst folderId = 'FOLDER_ID';const folder = DriveApp.getFolderById(folderId);const files = folder.getFiles();const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();sheet.clear();sheet.appendRow(['File Name', 'File ID', 'File URL', 'File Size (MB)', 'Last Modified']);const rows = [];while (files.hasNext()) {const file = files.next();rows.push([file.getName(),file.getId(),file.getUrl(),(file.getSize() / (1024 * 1024)).toFixed(2),file.getLastUpdated()]);}if (rows.length > 0) {sheet.getRange(2, 1, rows.length, rows[0].length).setValues(rows);}}
function listDriveFiles() {// Replace with your folder ID from the folder URL:// https://drive.google.com/drive/folders/FOLDER_IDconst folderId = 'FOLDER_ID';const folder = DriveApp.getFolderById(folderId);const files = folder.getFiles();const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();sheet.clear();sheet.appendRow(['File Name', 'File ID', 'File URL', 'File Size (MB)', 'Last Modified']);const rows = [];while (files.hasNext()) {const file = files.next();rows.push([file.getName(),file.getId(),file.getUrl(),(file.getSize() / (1024 * 1024)).toFixed(2),file.getLastUpdated()]);}if (rows.length > 0) {sheet.getRange(2, 1, rows.length, rows[0].length).setValues(rows);}}
- Replace
FOLDER_IDwith the ID from your folder URL in Google Drive. - Click Save and name the project.
The script lists every file directly inside that folder (not subfolders) and writes one row per file.
Note:
getSize()returns0for native Google files such as Docs, Sheets, and Slides. Uploaded files such as PDFs, images, and videos show their size in megabytes.
Running the Script
- In the Apps Script editor, click Run.
- Choose your Google account and click Allow when Google asks for Drive and Sheets access.
- Return to your spreadsheet and confirm the columns are filled: file name, ID, URL, size, and last modified date.
Result: Your sheet holds a structured Drive file list you can filter, sort, or export.
To run the list on a schedule, add a time-driven trigger in Apps Script.
Limitation: This sample script does not list subfolders or extra fields such as MIME type. Extend the script if you need those.
Choosing the Right Method
| Drive Explorer Pro | Apps Script | |
|---|---|---|
| Best for | Listing files in a few clicks, no code | Scheduled or automated inventories |
| Coding required | No | Yes — paste and edit a short script |
| Pick files in a visual picker | Yes | No |
| Custom columns (download link, preview, MIME type) | Yes — checkboxes in the sidebar | Requires script changes |
| List subfolders | Select files from multiple folders in the picker | Requires script changes |
- Use Drive Explorer Pro for most file inventory workflows inside Google Sheets.
- Use Apps Script only when you need a scheduled audit or full control over the code.
If you also need to upload new files and log their links, see how to upload files to Google Drive and share a link. If you are building a photo or image catalog, see how to mass upload images in Google Sheets.
Related Free Tools
Building inventory or procurement trackers in Sheets? Pair your file list with PDFs these tools generate:
- Goods Received Note Generator — GRN PDFs for incoming stock
- Packing Slip Generator — shipment packing slips
- Stock Keeping Unit Generator — SKU codes for product rows
- Purchase Order Generator — PO PDFs to store alongside delivery files
- Browse all 29 free business tools
Conclusion
Drive Explorer Pro is the fastest way to list Google Drive files in Google Sheets — pick your files, choose your columns, and build a searchable inventory in rows.
- Use Drive Explorer Pro when you want names, links, sizes, and previews without code.
- Use Apps Script when you need scheduled automation and are comfortable editing a script.
Before sharing the sheet, confirm file access on the listed files. If a file is still Restricted, people may see Request access even when the link is in your spreadsheet.