Last updated: May 29, 2024

<span aria-hidden="true" id="exploring-the-googlestore-robot-in-re-loadit-series"></span>

# Exploring the /google/store Robot in Re-Loadit series

![Samuel Ogundipe](/assets/images/teammates/samuel.png?dpl=dpl_EaRBV7VUa5qo1qfBKDnoq2VsKW7d)

**Samuel Ogundipe**

Technical Writer · Lagos, Nigeria · Show bio

[](https://github.com/samuelayo)

This blog post is the fourth installment in the series that we're calling **Re-loadit**. In this series, we will be covering a number of Transloadit's features that haven't yet received a proper introduction to our users.

Similar to other Robot introductions, we will give you some examples, explain the key functionality of the Robot and offer some tips on how to get started. We hope you'll enjoy learning more about leveraging Transloadit's breadth of features.

<span aria-hidden="true" id="the-googlestore-robot"></span>

## The /google/store Robot

Over the last few years, developers have been steadily moving away from local systems to the cloud for storing data. One important reason to move to the cloud is better protection of your data, particularly in the event of a natural disaster.[Some reports⁠](https://www.prnewswire.com/news-releases/the-cloud-storage-market-size-is-expected-to-grow-from-usd-3070-billion-in-2017-to-usd-8891-billion-by-2022-at-a-compound-annual-growth-rate-cagr-of-237-300597852.html)have confirmed this and predict that the cloud storage market will grow to $88.91 billion by 2022, marking an enormous annual growth rate of 23.7%. Billions of people and thousands of companies are opting for online storage because it’s comfortable, convenient, secure and economical. One of the more popular cloud storage services out there is Google Cloud Storage.

We want to ensure our users have the freedom to integrate this service directly into their Transloadit Templates.

That is why we introduced the [/google/store](/docs/robots/google-store.md) Robot, which has been part of the Transloadit Robot family since early 2018.

![/google/store Robot](/_next/static/immutable/media/opengraph-image.2fdsxkgq1phvb.png)

<span aria-hidden="true" id="what-can-it-do"></span>

## What can it do?

The [/google/store](/docs/robots/google-store.md) Robot will export all encoding results from your Assembly to a Google storage bucket of your choice.

So you could, for instance, have your users upload a video, then use the[/video/thumbs](/docs/robots/video-thumbs.md) Robot to make thumbnails of the video, before exporting the thumbnails to Google Cloud Storage — all in a single Assembly.

Let's take a step-by-step look at how you would go about creating such an Assembly!

<span aria-hidden="true" id="creating-the-assembly"></span>

## Creating the Assembly

Before we can get started with creating our Assembly, we need to get the service account JSON file. This is necessary for our Assemblies to use the Google Cloud API. To generate your JSON file, go to the[service account section⁠](https://console.cloud.google.com/iam-admin/serviceaccounts) of the Google Cloud Console to create a new service account. After giving the new service account a role, in the final step, click on **create key**, and select JSON as the type (The key will be downloaded automaticaly).

We highly recommend you store your access token in the[Template Credentials](/c/template-credentials/) here at Transloadit. To do so, first select Google Storage as your credential type, then fill in your Google Project Id and bucket name, as well as the JSON file we downloaded earlier.

This keeps your access key encrypted in our database and helps prevent malicious users from gaining access to it. As you can see in the screenshot below, I've named my Google credentials\_my\_google\_cred\_. We will need this name later when we begin creating our Assembly.

![My Template Credentials](/_next/static/immutable/media/2019-01-13-google-store-template-credential.378hm067kob-a.png)

These are the Assembly Instructions I used after setting up my Template Credentials correctly:

```json
{
  "steps": {
    ":original": {
      "robot": "/upload/handle"
    },
    "thumbnailed": {
      "use": [":original"],
      "robot": "/video/thumbs",
      "result": true,
      "ffmpeg_stack": "{{stacks.ffmpeg.recommended_version}}"
    },
    "exported": {
      "use": ["thumbnailed"],
      "robot": "/google/store",
      "credentials": "my_google_cred",
      "path": "invoices/${file.original_basename}.${file.ext}"
    }
  }
}

```

In the first two Steps, the [/upload/handle](/docs/robots/upload-handle.md) Robot uploads a video file to Transloadit and the[/video/thumbs](/docs/robots/video-thumbs.md) Robot then takes screenshots of the video.

In the next Step, the screenshots are exported to the[/google/store](/docs/robots/google-store.md) Robot. The `credentials` parameter accesses the Google Storage credentials, which I stored in my Template Credentials under the name *my\_google\_cred*. The `path` parameter then stores the exported images into a folder named`screenshots` in my Google storage and names each file by their original filename. If you are worried about collisions, you could add additional[Assembly Variables](/docs/topics/assembly-instructions.md#assembly-variables) to this path, such as an MD5 hash (`${fle.md5hash}`), or the `${unique_prefix}`.

To try out my newly created Template, I run the following Node.js code, taking the webpage I want as an argument. Feel free to try it out yourself!

```javascript
const { Transloadit } = require('transloadit')

const transloadit = new Transloadit({
  authKey: process.env.TRANSLOADIT_AUTH_KEY,
  authSecret: process.env.TRANSLOADIT_SECRET_KEY,
})

const options = {
  params: {
    steps: {
      ':original': {
        robot: '/upload/handle',
      },
      thumbnailed: {
        use: [':original'],
        robot: '/video/thumbs',
        result: true,
        ffmpeg_stack: 'v3.3.3',
        count: 1,
      },
      exported: {
        use: ['thumbnailed'],
        robot: '/google/store',
        credentials: 'my_google_cred',
        path: 'screenshots/${file.original_basename}.${file.ext}',
      },
    },
  },
}

transloadit.addFile('video', process.argv[2])
transloadit.createAssembly(options, (err, result) => {
  if (err) {
    throw err
  }
  console.log({ result })
})

```

<span aria-hidden="true" id="the-results"></span>

## The results

Our Assembly seems to be working perfectly! After running the Node.js code above, an image with the same name as my video file appears in my screenshots folder.

!\[The screenshots in my google bucket}(../../../../../../\_assets/images/blog/2019-01-13-google-store-result.png)

We hope this post has shed some more light on what the[/google/store](/docs/robots/google-store.md) Robot can do for you and how it can be implemented.

See you at the next post in our Re-loadit series!

[#file-exporting-service](/blog/tags/file-exporting-service.md)[#google-store-robot](/blog/tags/google-store-robot.md)[#integrations](/blog/tags/integrations.md)[#re-loadit](/blog/tags/re-loadit.md)[#video-thumbs-robot](/blog/tags/video-thumbs-robot.md)[#upload-handle-robot](/blog/tags/upload-handle-robot.md)

### 👩‍💻 Join 20k+ developers

Sign up for our [monthly newsletter](/newsletters.md) to receive direct links to 3 exclusive tech — and 2 product updates. No less, no more.

Your email:

Get access

## File uploading and encoding. Made simple.

Transloadit streamlines file handling for developers, trusted by brands like Coursera and The New York Times. We’re known for a reliable API, top-notch support, and a strong commitment to open source, with projects like [Uppy⁠](https://uppy.io) and [Tus⁠](https://tus.io) setting standards in file processing.

[Sign up](/c/)[Book a Demo](https://survey.typeform.com/to/kRg47Xi5)

No credit card needed

Cancel anytime
