Jump to content
  • 0

Upload files to Google Drive using Make


Barry

Question

Hello all,

In the new release of Caspio, 48, we have finally a new method to get files using only the file path! If you have been doing this with Make, it was required to use a complex scenario to get the file as it needed two calls to the APIand iterators(to get the externalKey and then to get the file). Now all of this can be done with a simpler scenario. I am sharing one simple setup that I am using to upload files to Google Drive when they are inserted at my Caspio table.

First, I have a Webhook in Caspio that sends the File field to Make when a record is inserted on my table that handles the files. This can be done by selecting the Webhooks module and using the url in Caspio to create the Webhook:
image.thumb.png.1755d17253dc42f6d70be653f14d5b2d.png

 

Then, after that module we add a custom API module, add module > Caspio > Make an API call(it is at the bottom of the list):

image.png.f6aa807f0059e15a92c0be40038ac3b5.png

 

That module has to be configured with the following options:

URL: /rest/v2/files/path

Method: GET

Headers,
Key: Content-Type
Value: application/octet-stream

Query String,

Key: filePath
Value:  {{1.data[].File_}}

In filePath we have to select the file field from the Webhook module:

image.png.4cf015ccd0769c71dda0495a5bece7f4.png

 

image.png.98d0404670d016d8773670e4872f2182.png

 

image.png.d1636bf3684d78b15b6ffcf5e88b6877.png

 

Then we can add any module that uploads files(like Google Drive) and use the response body and headers to upload:

image.thumb.png.e5d41984ca107f44cde4a16a1ac3f921.png

 

Hope this Post helps any of you that have struggled to upload files to other services using Caspio Webhooks/API.

 

 

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...