12.01.2 Uploading Files to Google Drive
As an example, let's create a scenario where the outcome is the upload of files to a specific folder on Google Drive and subsequently obtaining a list of the names and identifiers of the files in that folder.
![](/img/notion/8db20d1a-f255-4a35-8a3a-5e628541445b/Untitled.png)
To successfully run this scenario, you need to add four nodes:
![](/img/notion/1908e362-5595-4ab6-989c-273c2973dfd8/Untitled.png)
- (1) A Trigger on Webhook node with a URL to which a POST request is sent with a Form-data body containing the file TestJson;
- (2) An Upload File node that uploads the provided file to a Google Drive folder. To configure the Upload File node correctly, you need to create a authorization, choose Google Drive, and select the desired folder:
![](/img/notion/8f5bb21c-bbf5-4777-9ca0-eba1a12c1a6b/Untitled.png)
- (3) A ListFiles node that provides information about the documents in the Google Drive folder as an array. To configure the ListFiles node correctly, create a authorization, choose Google Drive, select the target folder, and specify file parameters:
![](/img/notion/a2028fc9-983c-4161-945d-28fbe7bc5491/Untitled.png)
- (4) A Webhook Response node that returns a response with an array of documents in case of a successful scenario completion.
![](/img/notion/38902356-83a7-48b7-a5d7-9fa21d0b5d6e/Untitled.png)
The result of running the scenario will be an array of document parameters.
Upon the initial run and in an initially empty Latenode folder:
![](/img/notion/4d9ee877-e60e-4e04-ba5e-c4427a272422/Untitled.png)
![](/img/notion/a9f6abb0-94ec-4e86-a32b-962e828ff155/Untitled.png)
[
{
"id": "1MT_dJdfGlzTNtmr5NACqmivPRBV_Ef60",
"name": "TestJson.json"
}
]
Upon the second run:
![](/img/notion/807187d8-6691-460a-a5ab-dbab6b75ac84/Untitled.png)
![](/img/notion/4d98effd-3ff1-4842-8fe8-e4fc72166133/Untitled.png)
[
{
"id": "1S-zd6DRmHA0o4aZn0jAsEkqOof6JkisX",
"name": "TestJson.json"
},
{
"id": "1MT_dJdfGlzTNtmr5NACqmivPRBV_Ef60",
"name": "TestJson.json"
}
]