Upload files to a website from a list in a Google Sheet

How to upload files to a website from a list in a Google Sheet: install the Chrome extension, click Build with Browser agent, tell the agent what you want, and follow its prompts. A working bot is built and tested in minutes.

Here is how the automation works. To upload files to a website from a Google Sheet, list the file paths in the sheet, loop through them with Loop through data, and inside the loop open the page and hand each path to an Upload a file step, which puts the file into the page's upload field as you would by hand. It runs on your own machine with the desktop app, since the files are on it.

Author
Alex Barlow
Published

Build the file upload from a description


Describe it and click the button: the agent builds and tests the uploader in your Chrome extension. Run it with the desktop app, since the files are on your computer. For files that live in Google Drive rather than on your computer, see upload every file in a Google Drive folder.

  1. Read the file paths from my Google Sheet
  2. Open the upload page on my site
  3. Upload each file into the file field
  4. Wait for the upload to finish before the next
Click to launch the Chrome extension. Not installed? You can create an account and try it free.Opens the Chrome extension. Free account to try.

You need a Google Sheet with one file path per row in column A, for example /Users/you/Documents/report.pdf, with no header row, and the URL of the page with the upload field, with a login for the site if it needs one.

The video shows the agent building the file upload from the four lines above, in a few minutes.

Build the file upload step by step


The steps the agent builds, as the Builder shows them: each step by its name, with the fields to set under it. Add them yourself in this order in the step-by-step builder, or open the agent's result there to adjust it.

  • 1.0 Read data from a Google Sheet
    • Spreadsheet: your sheet
    • Sheet name: the tab with one file path per row
  • 2.0 Loop through data
    • repeats for every row in [google-sheet-data]
    • 2.1 Go to page
      • URL: the upload page's address
    • 2.2 Upload a file
      • File Input Field: the page's file field
      • File Path: the path column of [google-sheet-data]
    • 2.3 Wait
      • Wait time: 5000
    • 2.4 Click element
      • Select: the page's submit button, where the page needs one

Common questions about the file upload


Why is the website's upload field not found?

The step is pointed at the button rather than the field. Click File Input Field again and select the field itself, not the button that opens the file picker. Some custom upload widgets hide the real field; paste a custom CSS selector such as input[type=file]. When a run fails, hand it to the agent and it repairs the step.

Why does the file not upload to the website?

The path is wrong or the run is in the cloud. Check the path in the sheet is the full path on this computer and that the folder is readable. The automation uploads from your machine, so the run must be a desktop run.

How do I make each upload finish before the next file?

Raise Wait time on the Wait step. Large files need longer.

Can I upload files to a website from a Google Sheet without code?

Yes. The automation is built from the four lines above, with no code: the sheet lists the files, and the Upload a file step puts each one into the page's field as the file picker would.

Does it work on any website's upload field?

Yes, on any page with a standard file field. A custom upload widget hides the real field behind a button; the automation needs the field itself, which the custom CSS selector input[type=file] finds on most pages.

Can I upload files from Google Drive instead of my computer?

Yes. Use Upload a file from Google Drive, which works in the cloud too, and see upload every file in a Google Drive folder.

How do I get help with uploading files from a Google Sheet?

Get in touch with support, or ask in the axiom.ai community.

Related guides