Resumable Upload in Google Drive using webMethods CloudStreams
Tags: google, integration, connector, tutorial
Published: 2021-08-05 12:23:17

---
title: Resumable Upload in Google Drive using webMethods CloudStreams
published: true
date: 2021-07-29 14:46:42 UTC
tags: #google, #integration, #connector, #tutorial
canonical_url: https://tech.forums.softwareag.com/t/resumable-upload-in-google-drive-using-webmethods-cloudstreams/243253
---

## Summary

This article describes how to upload files to **Google Drive** using webMethods CloudStreams provider.

## Prerequisites

- User should have a working **Google** account.

- Latest **CloudStreams** version installed with all the latest fixes.

- Latest CloudStreams connector for **Google Drive**.

## Steps

1. Create a Cloud Connector Service (CCS) for **Get Resumable Session** (under **Files** service) in **Google Drive**.
![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/6/c/6ce91255bd1b64c19e6a077f21f7b0ea353dfbe0_2_690x175.png)
2. Run the CSS by providing valid inputs as shown below. Make sure to provide proper value for **X-Upload-Content\_Type** depending on the file type to be uploaded.
> **supportsAllDrives** parameter must be set to true to upload the file to the **Shared drives** and enter the shared drive id to the parents’ field.
![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/5/4/5468049fbfe67d7eaa90ccd6d9a27acaaf8069d7.png)
3. Take a note of the **Location** under the **responseHeaders** of the output. It contains **upload\_id** that will be required in later steps.
![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/e/9/e997d1e908cb623623ab2c89f96a590dca5c5d7a_2_690x148.png)
4. Create another Cloud Connector Service for **Upload File** (under **Files** service) in **Google Drive**.
![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/5/d/5d6da4ec140cac8e6b250ddad7c5e039a146b784_2_690x209.png)
5. Create an empty flow service, and invoke the **pub.file:getFile** inside that flow service.
![image](https://aws1.discourse-cdn.com/techcommunity/optimized/2X/1/1c149507306a5b50eebac3ab26819dffcc86e281_2_690x160.png)
![image](https://aws1.discourse-cdn.com/techcommunity/original/2X/9/9012438adcf6ba13fab8cf03a31083800dcfa9f5.png)
6. Drag the CCS created in step 4 inside the flow service. The flow will appear as below.
![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/3/f/3fa3cfdfba13906e44f6d438ff3dc2d8e6287fdc.png)
7. Click on the **getFile** flow and select the pipeline tab. In the **Service In** section, double click on the fields and provide the required details.  
**filename** - The local path of the file that needs to be uploaded. For example, C:\Users\Desktop\abc.pdf  
**loadAs** - stream
![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/7/2/721b060bb1e78c851dcd0ff0a8d2b49adf67882c.png)
![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/3/c/3ccce431040639c14ad550d6b9272335a2951b40.png)
8. Click on the CCS flow (dragged to the flow service in step 6) and select the pipeline tab. Fill in the required details and do the mappings as shown below.  
**upload\_id** - The same id received from the response in step 3.
![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/4/6/46e1af54b59249c4f8044838aca49f1c47aed9f2.png)
9. Once all the inputs are specified, run the flow service.
10. After successful execution, the file will be uploaded to the **Google Drive**.
![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/c/6/c6a9473726a534fae8385f9f39bc1670ee578e2f.png)
![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/4/5/4577a808c3e0b68398661117ae6c95b6fc8a649d_2_690x269.png)

[Read full topic](https://tech.forums.softwareag.com/t/resumable-upload-in-google-drive-using-webmethods-cloudstreams/243253)