Skip to main content

I am trying to create a Zap that will automatically duplicate a template google folder I already have in my drive. My issue starts because this template I already have contains multiple subfolders and 3 of those subfolders have their own subfolders. This subfolders within subfolders situation was why I had created the template in the first place. In an effort to simplify my process even more I want this template to be automatically duplicated and then renamed and relocated. 

 

I had tried creating a custom action with the new beta tool but, as I mentioned, it gets stuck with the subfolders and continues to to give me the error messages below. 

Can someone help me a way to do this? 

 

  • lemit:log] {"message":"Relay Error","error":{"cause":{"response":{"status":403,"requestId":"1a6cb81d-d489-4beb-b6e4-48e1baabae6a","text":"{\n \"error\": {\n \"code\": 403,\n \"message\": \"This file cannot be copied by the user.\",\n \"errors\": r\n {\n \"message\": \"This file cannot be copied by the user.\",\n \"domain\": \"global\",\n \"reason\": \"cannotCopyFile\"\n }\n ]\n }\n}\n","json":{"error":{"code":403,"message":"This file cannot be copied by the user.","errors":r{"message":"This file cannot be copied by the user.","domain":"global","reason":"cannotCopyFile"}]}}}}}}
  • 	emit:log] {"message":"Relay Error","error":{"cause":{"response":{"status":403,"requestId":"466e5cce-4c99-4f74-81b7-ddfedb32c422","text":"{\n \"error\": {\n \"code\": 403,\n \"message\": \"This file cannot be copied by the user.\",\n \"errors\": r\n {\n \"message\": \"This file cannot be copied by the user.\",\n \"domain\": \"global\",\n \"reason\": \"cannotCopyFile\"\n }\n ]\n }\n}\n","json":{"error":{"code":403,"message":"This file cannot be copied by the user.","errors":r{"message":"This file cannot be copied by the user.","domain":"global","reason":"cannotCopyFile"}]}}}}}}

    Failed to copy file with ID 1-rk0otcpZq6JBADvVOOat8K7d9NNe5AG: 403 - This file cannot be copied by the user.

Hi @Michelle C. 

Google Drive API does not provide a direct method to copy an entire folder and its contents.

You essentially have to copy/create each folder/file using logic in the Zap steps.

 

Create the Parent Folder

Then create each of the Subfolders (Level 1)

Then create each of the Subfolders (Level 2)

 

You can use the Looping app to create the Subfolders

NOTE: Only 1 Looping app can be used in a Zap.

 


Welcome to the Community, @Michelle C.! 🎉 

Troy’s correct, Google Drive’s API doesn’t currently support this. We do have an existing feature request for the ability to copy a folder and it’s subfolders/files though, so I’ve added your vote to that. We can’t make any promises around when/if it would be implemented, but you’ll definitely get an email notification from us once it is. 

In the meantime, your best bet would be to follow the approach Troy suggested to get the desired folder and sub folders added. Please do let us know if you run into any issues on that and we’ll be happy to assist further! 🙂


Reply