How do I save a secured Tadabase file to Google Drive?

Here is the situation: some secured files are saved in Tadabase (File and Image Fields | Tadabase)

The problem: create a “Save to Drive” functionality? The idea would be to save a selected file (from a Table or List component) into a specific G-Drive folder with something like a “Save to Drive” action link/button.

The solution: how to do that?

  1. Directly saving to G-Drive using a Webhook + G-Script. Is it doable? Or are the secured files too hard to manipulate/copy programmatically without logged-in user action?
  2. Duplicate the storage of all files: each file would be saved into Tadabase (as a secured file) and in G-Drive (in an Drive without any permission). The action “Save to Drive” would to add the G-Drive file into another folder as a single file stored on a google drive can have multiple parent folders with different permissions.
    refs: Visão geral de arquivos e pastas  |  Google Drive  |  Google for Developers, Create and populate folders  |  Google Drive  |  Google for Developers, Shared drives overview  |  Google Drive  |  Google for Developers

Any recommendation on the best possible path: (1) or (2) or other?

Has anyone worked on something similar?

Thank you!

Ivan,

I’m hoping someone in the community can chime in, I’ve also asked one of our engineers to take a look if they have time.

However, a few things I must point out:

  1. Secured files won’t be possible to manipulate via API. Secure files only work without the file link first being generated by clicking on the link within Tadabase.

  2. The second options sounds like you’re wasting space on G-drive since you’re saving it twice. However, this to me sounds like a doable approach. You’d then create a webhook which runs to a script on Google and if you pass a variable to “Save to Drive” then it gets that file and moves it over.

Doing the 2nd part of (Action Link > Webhook > Google Script > Drive) likely isn’t too complex of a task.