I keep running into an issue of Google Drive’s “Find a file” requesting the file name.
However in my Zap’s context, the file name is unknown because it is based on whatever a user uploads through a Google Form.
Without creating a custom action, how can I ask Google Drive to find a file based on the direct URL I give it and then rename that file?
Are there step-by-step instructions on how to do this? If so, where are they?
The AI Copilot is not helpful in this context.
I have googled and searched searched the community forums multiple times. I can not seem to find anything that explains, step-by-step, how to find a Google Drive file by its URL
The goal is to later rename the file based on form entries from a Google Form.
Or perhaps there is a better way to do what I’m trying to do…?
For more context:
I am running a book prize.
Authors need to upload their photograph and book cover.
I am collecting these files through a Google Form.
The files need to be automatically re-named with corresponding author names and book titles.
→ In addition to fields collecting the two file uploads (author photo and book cover), the form also contains text fields to collect the author name and book title.
→ The file name of the file uploads are NOT known - it depends on what the user names their own file.
→ Google Forms automatically places these files into a folder in Google Drive. (Zapier is not needed for this)
→ Google Forms automatically creates a spreadsheet of responses, and provides a direct URL link to the uploaded files. (Zapier is not needed for this)
I am trying to:
Rename the file uploads from the Google Form based on entries submitted in form fields.
In the Google spreadsheet of form responses:
Column C collects author name
Column D collects book title
EXAMPLES
(In the examples below, “Row X” refers to any row, because each row represents a single form entry.)
Goal 1: Rename the first file like so:
{{Row X Column C}} photo - {{Row X Column D}}.{{file extension}}
This is intentionally the same as: {{author name}} photo - {{book title}}.{{file extension}}
This would become a file name like:
Mark Twain photo - Adventures of Huckleberry Finn.jpg
Goal 2: Rename the second file like so:
{{Row X Column D}} cover - {{Row X Column C}}.{{file extension}}
This is intentionally the same as: {{book title}} cover - {{author name}}.{{file extension}}
This would become a file name like:
Adventures of Huckleberry Finn cover - Mark Twain.png
It should not copy the file to rename it. If it does, it should delete the original copy.
Is this possible without a custom action?
I see the “Find file” action and the “update file/folder name” actions in the Google Drive app options. But the latter requires the “Find file” step, which requires the file name (using exact match or ‘filename contains’).
But the file name is not known… only the URL to the file goes into the Google spreadsheet noted above.
When I tried this solution: https://community.zapier.com/how-do-i-3/how-do-i-get-the-filename-from-google-drive-29409 it gave an error because it was expecting the domain to be “googleapis” instead of what I gave it, which is a direct link to the file. The direct link to the file uses the domain: drive.google.com (see screenshot attached)
Plus, if I look for “GDrive” as an app in a Zap, the only thing I get is “Google Drive”. So I don’t know if I’m supposed to be using something else.