Products / Google Drive Document Library / Docs

Show a Google Drive folder

Instead of listing documents in a spreadsheet, Resource Finder can show the files in a Google Drive folder. Drop a PDF into the folder, and it appears on your website.

  • Subfolders become category buttons. A file in a "Forms" subfolder gets the category "Forms". Files in deeper folders (Forms → 2026) keep their top-level category.
  • File type and date are filled in for you from Drive.
  • Descriptions: in Drive, right-click a file → File information → Details, and type a description. It shows under the title and is searchable.
  • Only files shared as "Anyone with the link" are shown. A private file in the folder is skipped, so nothing private ever reaches your website.

Takes about 10 minutes. You need the Google account that owns (or can open) the folder.

Spreadsheet or folder? Use a folder when your documents already live in Drive and you just want them listed. Use a spreadsheet when you want to write your own titles and descriptions, add tags, mark featured items, or link to things that aren't in Drive (web pages, videos, files elsewhere).

1. Prepare the folder

  1. In Google Drive, make a folder just for your website, such as "Website documents". Add subfolders for categories if you like: "Forms", "Minutes", "Reports".
  2. Right-click the folder → Share → Share. Under General access, choose Anyone with the link (Viewer), then Done. Files you add to this folder later are shared the same way automatically.

Important: everything in this folder is public. Keep drafts and private files somewhere else. To keep a file in the folder but off the website, start its name with an underscore (_draft budget.pdf). Subfolders starting with _ are skipped too.

School or work Google account? Some organizations don't allow sharing with "Anyone with the link" or running scripts. If the options are greyed out, ask your Google Workspace administrator, or use a personal Gmail account for the website folder.

2. Add the connector script

  1. Go to script.google.com and click New project. Name it "Website documents" (click "Untitled project" at the top).
  2. Delete everything in the editor.
  3. Open apps-script/DriveFolder.gs from your download in Notepad (or any text editor), copy all of it, and paste it into the editor.
  4. In the SETTINGS section near the top, replace PASTE-YOUR-FOLDER-LINK-HERE with your folder's link. Open the folder in Drive and copy the address from your browser bar. It looks like https://drive.google.com/drive/folders/1AbC…. Keep the quote marks.
  5. Click the Save icon (💾).

Optional: ask for read-only access. By default Google asks for broad Drive permission. To limit the script to reading:

  1. Click Project Settings (⚙ on the left) and tick Show "appsscript.json" manifest file in editor.
  2. Go back to the Editor (< > on the left) and open appsscript.json.
  3. Replace its contents with the contents of apps-script/appsscript.json from your download, and save.

3. Test it and approve permissions

  1. In the toolbar, choose testListFolder from the function dropdown, then click ▶ Run.
  2. Google asks you to approve permissions. Click Review permissions and choose your account.
  3. You'll probably see "Google hasn't verified this app." That's normal for a script you created yourself. Click Advanced → Go to Website documents (unsafe) → Allow. The script only reads the list of files in your folder. It runs in your Google account, and nothing is sent to us.
  4. The Execution log shows how many files will appear on your website, and lists the first few. If it says private files were skipped, share them as "Anyone with the link" (or move them out of the folder).

4. Publish it as a web app

  1. Click Deploy → New deployment.
  2. Click the gear ⚙ next to "Select type" and choose Web app.
  3. Set:
    • Execute as: Me
    • Who has access: Anyone. This lets your website read the list of shared files. It doesn't give anyone access to your Drive.
  4. Click Deploy, then copy the Web app URL. It starts with https://script.google.com/macros/s/ and ends in /exec.

To check it, open that link in your browser. You should see a list of your files in plain text (starting with {"ok":true).

5. Put it on your website

Use the web app link wherever the instructions say "data link". The quickest is embed/4-google-drive-embed.html: replace PASTE-YOUR-DRIVE-WEB-APP-LINK with your link and paste the whole file into a Code Block or Custom HTML block. Every other snippet and option in INSTALL.md works the same way with a Drive link.

Don't paste the folder's own link (drive.google.com/drive/folders/…) into the snippet. Resource Finder will tell you it needs the web app link instead.

How fresh is the list?

The script keeps the list for 10 minutes so your page loads quickly. New files appear on your site within about 10 minutes. To update right away, open your web app link with ?refresh=1 on the end:

https://script.google.com/macros/s/…/exec?refresh=1

Change CACHE_MINUTES in the settings to adjust this (1 to 360).

Changing settings later

Edit the SETTINGS section and save. Then click Deploy → Manage deployments, click the ✏ pencil on your deployment, set Version to New version, and click Deploy. Your web app link stays the same.

SettingWhat it does
FOLDERThe folder to show (its link or ID)
INCLUDE_SUBFOLDERSfalse to show only files directly in the folder
SUBFOLDER_DEPTHHow many levels of subfolders to look in (default 3)
HIDE_EXTENSIONSfalse to show ".pdf" and similar in titles
CACHE_MINUTESHow long to reuse the list (default 10)
SKIP_PREFIXFiles and folders starting with this are hidden (default _)

Troubleshooting

"Couldn't open the folder." Check the FOLDER link, and that you're signed in to script.google.com with an account that can open that folder.

The page says the folder has no shared files. Share the folder (or the files) as Anyone with the link, then open your web app link with ?refresh=1.

A file is missing. It's private, its name starts with _, it's a shortcut, or it was added in the last 10 minutes. Run testListFolder again to see what the script finds.

The page says it returned a web page, not data. The deployment's Who has access isn't set to Anyone. Fix it under Deploy → Manage deployments.

Still stuck? Use the contact page at evergreencode.store. Installation help is included for 6 months.

Installation

Every install has the same two parts:

  1. Your data: a published Google Sheet, rows pasted into the page, or an uploaded CSV file.
  2. The snippet: one of the files in embed/, pasted where you want the library to appear.

With a Google Sheet, anyone on your team can add or edit resources without touching the website.

  1. Go to sheets.google.com, then File → Import → Upload and choose templates/resources-template.csv. Or just type the column names into row 1.
  2. Replace the example rows with your documents. To link a file stored in Google Drive:
    1. Right-click the file and choose Share.
    2. Set access to Anyone with the link.
    3. Copy the link and paste it into the URL column.
  3. Click File → Share → Publish to web.
  4. Under Link, choose the sheet tab with your list, change "Web page" to Comma-separated values (.csv), and click Publish.
  5. Copy the link it shows. It contains /pub? and ends in output=csv.

Use this link, not the address in your browser bar. A link ending in /edit will not work, and the finder will show a message if you paste one by mistake.

After publishing, changes in the sheet appear on your site within about 5 minutes. Google refreshes published sheets on its own schedule.

Or: show a Google Drive folder

If your documents already live in Google Drive, you can skip the spreadsheet. Resource Finder can list the files in a Drive folder, with subfolders as categories, using a small connector script in your Google account. Setup takes about 10 minutes: follow **SETUP-GOOGLE-DRIVE.md**, then use embed/4-google-drive-embed.html (or put the connector's web app link in data-src in any snippet). Everything in Step 2 below works the same way.

Step 2: Add it to your site

Resource Finder works on any website where you can paste HTML. The steps are the same everywhere:

  1. Add an HTML / code / embed block where the library should appear.
  2. Paste the contents of the embed file you chose.
  3. Put in your data link, then publish.

The embed files use the compact script (dist/resource-finder.min.js, about 22 KB). That keeps them under the size limits some builders put on code blocks.

Most builders only run custom code on the published page, not inside the editor. If you see code or a blank box while editing, check the live page.

Any website (HTML)

Put the <div data-resource-finder …> line where the library should appear. Then load the script once anywhere on the page:

  • Inline: paste the <script>…</script> part of embed file 1.
  • From a file: upload dist/resource-finder.min.js and use <script src="resource-finder.min.js" defer></script>.

The CSV must be on the same website or a Google Sheets "Publish to web" link. A CSV on another website only loads if that site allows it (CORS).

Carrd

  1. Add an Embed element and set Type to Code.
  2. Paste the embed file and set your link.
  3. Under Style, choose Inline.

Embeds need a Carrd plan that includes them.

Ghost

  1. In the post or page editor, type /html to add an HTML card.
  2. Paste the embed file and set your link.
  3. Publish.

Shopify

  1. Go to Online Store → Themes → Customize.
  2. Open the page template where the library should go, for example a "Resources" page.
  3. Click Add section and choose Custom Liquid.
  4. Paste the embed file, set your link, and click Save.

This works with Shopify's Online Store 2.0 themes, such as Dawn and the other free themes Shopify has offered since 2021. If Custom Liquid isn't in the list, your theme is older and doesn't support this method. Email us and we'll help.

Shopify limits a Custom Liquid section to 50 KB. The Google Sheet snippet fits easily. If you paste a long list of rows straight into the snippet and Shopify won't save it, use the Google Sheet option instead.

Squarespace (7.0 and 7.1)

Squarespace runs scripts in Code Blocks only on plans that allow custom code. If your plan doesn't, the block will show the code instead of the library.

  1. Open the page, click Edit, and add a Code block.
  2. Paste the embed file, replacing what's there, and set your link.
  3. Click Apply, then Save.

Webflow

  1. Drag a Code Embed element onto the page.
  2. Paste the embed file and set your link.
  3. Click Save & Close, then Publish. The library only runs on the published site, not in the Designer.

Code Embed needs a Webflow site plan that allows custom code.

Wix

  1. Add Embed Code → Embed HTML.
  2. Choose Code, paste the embed file and set your link.
  3. Resize the box so it's tall enough. Wix shows embeds in a fixed-height frame.

WordPress

Block editor:

  1. Add a Custom HTML block.
  2. Paste the embed file, set your link and click Update.

Uploading your own files:

  1. Upload dist/resource-finder.min.js and your CSV through Media → Add New. If your site blocks .js uploads, use the Google Sheet option instead.
  2. Copy each file's URL.
  3. Put them into embed/3-hosted-file-embed.html, and paste that into a Custom HTML block.

Some security plugins strip scripts from posts. If the block shows nothing on the live page, use a "header and footer scripts" plugin to load the script.

Two libraries on one page

Add data-url-key with a different value to each one, for example data-url-key="forms" and data-url-key="reports", so their saved searches don't mix. Each can use its own data-src.

Troubleshooting

What you seeFix
"Resources could not be loaded right now"Check the link opens a plain list of text in your browser. For Google Sheets, re-check Step 1.4: the format must be .csv.
The page shows the code as textYour platform or plan isn't running scripts in that block. Check the live page, and check your plan allows custom code.
Nothing at all appearsMake sure you pasted the whole snippet, including both <script> parts. Then open the browser console (F12 → Console) and look for a "[Resource Finder]" message, which explains the problem.
Edits in Google Sheets don't show upWait about 5 minutes and reload. Make sure you edited the same tab you published.
A row is missingEvery row needs a Title. A link that isn't a web address is removed. Check the console for the row number.
Columns are mixed upA cell containing a comma must be in quotes when you write a CSV by hand. Google Sheets and Excel do this for you.
A link opens the wrong fileCheck the URL column for that row. For Google Drive files, the sharing setting must be "Anyone with the link".

Changelog

1.1.0 (2026-10-30)

  • Google Drive folders. Show the files in a Drive folder instead of a spreadsheet: drop a file in the folder and it appears on your site. Subfolders become categories; type, date and Drive descriptions are filled in. Only files shared as "Anyone with the link" are listed. Set up with the included connector script (apps-script/DriveFolder.gs, guide in SETUP-GOOGLE-DRIVE.md) and the new embed/4-google-drive-embed.html.
  • Pasting a Drive folder's own link now explains that the connector's web app link is needed.

1.0.0 (2026-10-15)

First release.

  • Works on any website: install guides for Carrd, Ghost, Shopify, Squarespace, Webflow, Wix, WordPress and plain HTML, plus a compact 22 KB script for embed blocks.
  • Data: Google Sheets ("Publish to web" CSV), CSV file, or rows pasted into the page.
  • Search:
    • live search across title, description, category, type and tags
    • ignores accents, so "cafe" finds "Café"
    • highlights matches
  • Filters and sort:
    • category buttons, or a drop-down when there are more than 12 categories
    • file-type filter
    • sort by recommended, newest, oldest or A–Z
    • featured items stay at the top
  • Usability:
    • "Show more" paging
    • filtered views are saved in the page address
    • clear messages for empty results and loading problems
    • matches the site's font and colors, with one accent color and a grid or list layout
  • Fits into any site: shielded from common site-wide styles (paragraph, heading, list and button rules) so it looks right everywhere.
  • Accessibility and safety:
    • accessible labels, keyboard support and screen-reader announcements
    • all text is escaped and unsafe links are removed