How to replace or move a file in Box before uploading an updated Google Drive file
Hi All - I am working on a project and what i need is the file that is upload to box to either move to a different box folder or be replace BEFORE the updated google drive file is uploaded to box everyday. I also can NOT change the name of the google file the name has to remain the same everyday
Why: the file needs to be either moved or replaced before the everyday upload because box is giving me a error message of "item with same name already exist" and i am unable to change the name of the google drive file
current zap flow:
error message in box currently because the 1st file upload from drive has been uploaded:
Page 1 / 1
Hi @christinaf
Try adding these Zap steps:
Action: Box - Find File
Action: Box - Move/Copy File
Hey @christinaf,
If there are some scenarios where the file name will not be the same, you should consider using paths to avoid any errors later on.
Hi @Troy Tessalone at what step in my current step up do you recommed i add those steps?
@christinaf
If you want to move the file before you upload the file then you would need to add those steps before the Zap step: Box - Upload File
U can use
Google Apps Script (GAS) for Automation
Trigger Script on File Upload: You can set up a Google Apps Script to trigger when a new file is uploaded to Google Drive. This script can then move the file to a different folder on Box or rename it before the next upload.
Script:
function onFileUpload(e) { // Check if the file is in the specific folder if (e.folderId === 'your_folder_id') { // Move the file to a different folder on Box or rename it // Use Box API to perform the action } }