Skip to main content
Best answer

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


Digismoothie

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 

Best answer by Troy Tessalone

@Digismoothie 

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

 

View original
Did this topic help you find an answer to your question?
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

Troy Tessalone
Forum|alt.badge.img+14

Hi @Digismoothie 

Good question.

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

 


Digismoothie
  • Author
  • Beginner
  • 3 replies
  • June 26, 2023

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

 


Troy Tessalone
Forum|alt.badge.img+14
  • Zapier Expert
  • 31047 replies
  • Answer
  • June 26, 2023

@Digismoothie 

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

 


Digismoothie
  • Author
  • Beginner
  • 3 replies
  • June 29, 2023

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


Troy Tessalone
Forum|alt.badge.img+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

 


Digismoothie
  • Author
  • Beginner
  • 3 replies
  • June 30, 2023

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


ken.a
Forum|alt.badge.img+6
  • Zapier Staff
  • 6411 replies
  • July 4, 2023

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! 🤗