Google Drive automation: uploads, folders and share links

Google Drive automation in nana800 uploads files, creates folders, finds files, returns links and shares files by link, with no code. The block uses a Google access token you get in Google OAuth Playground, and a file up to 20 MB can be uploaded from text, from base64 or from a link. Each operation costs $0.002, and your balance is topped up to $3.50 for free every month.

Build it in the builder
  • Block run: $0.002
  • Free every month: $3.50
  • No card needed

What you can do

  • Save files from a link to Google Drive, such as documents and photos from customers, up to 20 MB
  • Create a file from text or base64, such as a report or a PDF from a previous block
  • Create folders, for example a separate folder for each customer or order
  • List the files of a folder or find files by name and type, up to 1000 at a time
  • Share a file or folder by link and pass the link on, for example to Telegram
  • Download files up to 5 MB to hand their content to the next block
  • Delete files and folders you no longer need

Blocks in the builder

  • Google Drive files and folders

    Action · $0.002 per run

    Eight operations: list, search, create_folder, upload_file, get_file, share_file, download_file and delete_file. Returns the file ID, a view link and a download link.

How to set it up

  1. 1

    Get a Google access token

    Open Google OAuth Playground, pick Drive API v3 and the drive scope (all files) or drive.file (only files created by this app). Press Authorize APIs, then Exchange authorization code for tokens, and copy the Access token. The token is the key the block uses to work with your Drive.

  2. 2

    Add the Google Drive block

    Create a scheme in the builder, add the button trigger for testing and add the Google Drive block. Paste the token into the access token field.

  3. 3

    Set up the upload

    Choose the upload_file operation and type a file name with an extension, for example report.pdf. Put a file address into the file link field, or text into the file content field. Put the ID from the folder address into the folder ID field, otherwise the file lands in the root of the Drive. If other people will open the file, choose true for sharing by link.

  4. 4

    Turn the scheme on and check the result

    Turn the scheme on and press the button trigger. The block result shows file_id and web_view_link, a view link you can pass to the next block, for example Telegram message send. If something went wrong, the reason is in error_message.

  5. 5

    Add a working trigger

    Replace the button with a working trigger, for example webhook for website leads, and leave the scheme on. Keep in mind that the token lives about an hour: for steady work, get a fresh token in your own service and pass it into the block from a previous block.

Frequently asked questions

Each block operation costs $0.002: an upload, a search, a link or a deletion. An enabled scheme costs $0.0042 per hour. Your balance is topped up to $3.50 for free every month, no card needed. A scheme kept on around the clock for a month spends most of that on scheme hours.

A token from OAuth Playground lives about an hour, then Google stops accepting it. For one-off tasks, get a new token the same way. For a scheme that runs all the time, get the token in your own service and pass it into the block from a previous block, for example from the answer of the request block.

You can upload a file up to 20 MB as text, as base64 or from a public http or https link. The block downloads files up to 5 MB: text comes in file_content, any file in file_content_base64. Google Docs, Sheets and Slides cannot be downloaded because they have no file behind them.

In the address bar: for a file it is the part after drive.google.com/file/d/, for a folder the part after drive.google.com/drive/folders/. You can also paste the whole link into the file ID field.

The link works for others only after you share the file: choose true for sharing by link when uploading, or run the share_file operation. If your Google Workspace admin has blocked public sharing, the block returns an error, but the file stays on the Drive.

No. The delete_file operation removes a file or folder for good. Before deleting, check that it is the right file, for example with the get_file operation.

Build your first scheme for free

Sign-up is free and needs no card. Every month the balance is topped up to $3.50 for free, enough for about 3,500 runs of basic blocks.

Build it in the builder