This function downloads a file from Google Drive. Native Google file types, such as Google Docs, Google Sheets, and Google Slides, must be exported to a conventional local file type. This can be specified:

  • explicitly via type

  • implicitly via the file extension of path

  • not at all, i.e. rely on the built-in default

To see what export file types are even possible, see the Drive API documentation or the result of drive_about()$exportFormats. The returned dribble includes a local_path column.

  path = NULL,
  type = NULL,
  overwrite = FALSE,
  verbose = deprecated()



Something that identifies the file of interest on your Google Drive. Can be a name or path, a file id or URL marked with as_id(), or a dribble.


Character. Path for output file. If absent, the default file name is the file's name on Google Drive and the default location is working directory, possibly with an added file extension.


Character. Only consulted if file is a native Google file. Specifies the desired type of the downloaded file. Will be processed via drive_mime_type(), so either a file extension like "pdf" or a full MIME type like "application/pdf" is acceptable.


A logical scalar. If local path already exists, do you want to overwrite it?


[Deprecated] This logical argument to individual googledrive functions is deprecated. To globally suppress googledrive messaging, use options(googledrive_quiet = TRUE) (the default behaviour is to emit informational messages). To suppress messaging in a more limited way, use the helpers local_drive_quiet() or with_drive_quiet().


An object of class dribble, a tibble with one row per item.

See also

Download files, in the Drive API documentation.


# Upload a csv file into a Google Sheet
file <- drive_upload(
  type = "spreadsheet"
#> Local file:
#>  /home/runner/work/_temp/Library/googledrive/extdata/chicken.csv
#> Uploaded into Drive file:
#>  chicken <id: 10doj1GUqlw9ED-PjOewp9gZC36RgeCEXR_Pt4Wy_U6Y>
#> With MIME type:
#>  application/

# Download Sheet as csv, explicit type
downloaded_file <- drive_download(file, type = "csv")
#> File downloaded:
#>  chicken <id: 10doj1GUqlw9ED-PjOewp9gZC36RgeCEXR_Pt4Wy_U6Y>
#> Saved locally as:
#>  chicken.csv

# See local path to new file
#> [1] "chicken.csv"

# Download as csv, type implicit in file extension
drive_download(file, path = "my_csv_file.csv")
#> File downloaded:
#>  chicken <id: 10doj1GUqlw9ED-PjOewp9gZC36RgeCEXR_Pt4Wy_U6Y>
#> Saved locally as:
#>  my_csv_file.csv

# Download with default name and type (xlsx)
#> File downloaded:
#>  chicken <id: 10doj1GUqlw9ED-PjOewp9gZC36RgeCEXR_Pt4Wy_U6Y>
#> Saved locally as:
#>  chicken.xlsx

# Clean up
unlink(c("chicken.csv", "chicken.xlsx", "my_csv_file.csv"))
#> File deleted:
#>  chicken <id: 10doj1GUqlw9ED-PjOewp9gZC36RgeCEXR_Pt4Wy_U6Y>