Best answer

Create a new file in Google Drive - Upload a file - Rename the uploaded file to have the same name as the folder

  • 26 June 2023
  • 7 replies
  • 209 views

Userlevel 1

Hello I came across a problem in the automation process, I need to set up following automation: 

  1. I create a new sub-folder in Google Drive 
  2. After creation Zap uploads selected file to the new sub-folder created in Google Drive 
  3. After uploading the file to the newly created sub-folder, the selected zap should also change the name of the file to match the name of folder. (Optional) 

    E.G. 
    1. Main folder =SALES 
    2. I create a subfolder = CLIENT1, CLIENT 2, CLIENT 3 
    3. After creation of subfolder CLIENT 1,2,3 I need the zap to upload a Google document TEMPLATE_SALES, to each of the subfolder and change the name of the document to CLIENT1_SALES, CLIENT2_SALET etc. 

    I managed to create automation to upload the file, but I cannot figure out how to upload it to the newly created subfolder. Currently the file is only being uploaded to the main folder (SALES), when a new subfolder is created it does trigger the automation but the file is not uploaded to correct subfolder. 

    Anything that I am missing? 

    Thanks a lot 
icon

Best answer by Troy Tessalone 26 June 2023, 18:31

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

7 replies

Userlevel 7
Badge +14

Hi @Digismoothie 

Good question.

For the Folder field, map the GDrive Folder ID from the previous step.

 

Userlevel 1

Hello @Troy Tessalone

Thank you very much for your answer. The GDrive Folder ID really was what I wanted. 


One last question- how do I rename the document?

Lets say that I have created the sub-folder and name it IGOR. The document inserted in the new sub-folder is called Hiring, I would like to combine these two while inserting the document into the newly sub-folder and have it name: IGOR_Hiring - is it somehow possible?

Thank you a lot

 

Userlevel 7
Badge +14

@Digismoothie 

You can specify the file name using the File Name field in the GDrive Upload File action.

 

Userlevel 1

Hello @Troy Tessalone 

I am not sure if I understand - I have created this automation - where exactly should I look for the rename function? Is it a next step in the automation? 


Thank you for any help it is much appreciated

Userlevel 7
Badge +14

@Digismoothie 

Make sure to check the field descriptions for guidance.

If you are using the Copy File action, then there is a File Name field.

 

If you are using the Upload File action, then there are 2 fields:

File Name

File Extension

 

Userlevel 1

Thank you very much @Troy Tessalone I managed to make it work. 
 

Userlevel 7
Badge +6

Hi @Digismoothie,

Cool! We’re happy to hear everything is working now. Also, thanks to Troy for pointing you to the right direction!

If you have any other questions, please don’t hesitate to reach out. We’re always here and happy to help! 🤗