Table of Contents

How to upload a file to Google Drive using Integromat

Alexander Gao Updated by Alexander Gao

Upload a file with Trigger automation block

Prepare Landbot
  1. Firstly, we have to build a bot flow to collect the file

The information that we collect will be stored in variables, which we will send them to Integromat.

In the example below, we are storing the name input in the variable @file, that we will use later.

  1. Then let's set a Trigger automation block.

Create Integromat scenario
  1. After set a Trigger automation block, let's open Integromat:

  1. We need to do is press Create A New Scenario:

  1. Then search Webhook, then click on its icon:

  1. Let's press continue button to move on:

  1. Then it will display this page:

  1. What we should do now is click on Webhooks:

  1. Integromat will ask you to select the type of Webhook, chooseย Custom Webhook.

  1. After click on Custom Webhook, a small window appears:

  1. Click on Add button:

  1. Let's give this hook a name:

  1. Don't click on OK yet, as we still have to copy the API address:

Prepare Landbot request to Integromat
  1. Let's get back to Landbot and paste the URL in the Trigger automation block, in the Paste the Webhook URL field:

  1. Go to the Set data (variables) to be sent section. Now we are going to set the variables we want to send to Integromat.
For Integromat to receive our data, we can send it with a random number or a random word.
  1. And click on Test webhook trigger button:
  1. If you scroll down, you will see the response from Integromat:

  1. As long as the status code is 200, means our request is successfully sent.

In Integromat set HTTP module:
  1. Go back to Integromat, click on OK:

  1. Let's press the add button, to add the module of HTTP:

  1. Click on Get a file:
  1. Click on the URL bar, choose file variable:

Set Google Drive module
  1. Let's press the add button, to add the module of Google Drive:

  1. Choose Upload a file:

  1. After login the account of Google Drive, let's select the folder, in which we want to put file:
  1. Now click on OK:

  1. Let's run the scenario now:

In Landbot complete the chat to upload the file
  1. Let's go back to Landbot and go to Share > Share with a link > Open:

  1. Then complete the chat:

  1. Now let's move to the folder of Google Drive which we selected:

So as we can see, the file has been already put in the folder, the operation is done!

What if I want to name the file?
  1. Also if you want to name the file, for it not shows as just with file.jpg, you can set a name block (related to 1st step):

  1. Then in Set data (variables) to be sent Trigger automation block, send the variables below (related to 15th step):

  1. Inside of the Google Drive module in Integromat, click on Map, below file name, delete the default one, add the data we get from Landbot.

How did we do?

Connecting MySQL with Integromat

Integromat trigger