Upload file to Google Drive with full remote folder path 1.1.3

This will create the folder for you if needed and upload the file

  1. joaomgcd
    These tasks use AutoWeb and the Google Drive API to upload a file to Google Drive and put it in a specific folder
    AutoWeb is in beta at this time. You can sign up for the beta here.

    Make sure you have the latest version of the Google Drive API in AutoWeb.

    If you can't import it from AutoWeb's server (if the server is down for example) you can import it directly from here. Open the link on your Android device and you should get the option to open it in AutoWeb.

    In this project you'll find 2 Tasks:

    Find Drive Folder Id

    Will find the folder ID in your Google Drive with the given name in %par1.
    It'll create the folders as needed.
    So, for example if you search for a folder named
    Code (Text):
    Testing 123/inner folder
    It'll first look for a Testing 123 folder. If not found, it'll create a folder with that name.
    Then it'll look for a folder named inner folder inside the Testing 123 folder and if it doesn't exist it'll create it.
    This will work for any folder depth.

    Create Drive File
    Will upload the file in %par1 to the remote Google Drive file in %par2
    So, for example if you call it with
    • %par1 set to /storage/emulated/0/Join/Files/happy-face1.jpg
    • %par2 set to Testing 123/inner folder/Smile.jpg
    It'll parse out the file and folder names from %par2.
    • File name will be Smile.jpg
    • Folder name will be Testing 123/inner folder
    It'll then call the Find Drive Folder Id task with the folder name Testing 123/inner folder so that the folder is properly created
    Then it'll check if a file with the name Smile.jpg already exists in that folder. If it exists, update the existing file, if not, insert a new one.
    You can also set %par2 to Testing 123/inner folder/ and it'll keep the original happy-face1.jpg file name and send the file to the specified folder with the same file name.

    Finally the task will return the Google Drive File ID to the calling task so that it can do anything it wants with the new file like getting metadata info on it.

    Call the Create Drive File task with the Perform Task action and set
    • Parameter 1: local file path (like /storage/emulated/0/Join/Files/happy-face1.jpg)
    • Parameter 2: remote file path (like Testing 123/inner folder/Smile.jpg or just Testing 123/inner folder/ to keep the file name as it is)
    • Return Value Variable: %fileid (so that you can do other stuff with the file if you want)

Recent Reviews

  1. the_mentor
    Version: 1.1.3
    Simple and works amazingly well.
  2. Vampie
    Version: 1.0
    Works flawless. :)
    Good job.