---
title: Download from Google Cloud
description: Download files from a specified Google Cloud Storage bucket based on filters and patterns.
category: Storage
tags: [google cloud, gcs, file download, storage, integration]
---

# Download from Google Cloud

## Description

The **Download from Google Cloud** activity allows you to retrieve files from a designated directory within a Google Cloud Storage bucket.

This activity supports pattern-based file selection, date filtering (such as today, yesterday, or a custom range), and optional post-download actions like file deletion or moving to another directory.

Use this activity to:

- Automatically fetch new files from a cloud bucket for processing
- Filter files by name using regex
- Retrieve files based on date
- Manage downloaded files by deleting or moving them after download

> **Use case**:  
> After exporting reports to a Google Cloud bucket using a scheduled job, this activity can fetch only the latest reports (e.g., from today or yesterday), apply pattern matching (e.g., filenames starting with `sales_`), and forward them to downstream processing tools such as `CSVParser`, `DataTransformer`, or `EmailAttachment`.

## Input

_Not applicable_

## Output

| Output Type | Format        | Description                                  |
| ----------- | ------------- | -------------------------------------------- |
| **Files**   | File download | Downloaded files from the specified GCS path |

## Configuration Fields

| Field Name                | Description                                                                                                                            |
| ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| **Connection**            | Select a connection to Google Cloud Storage. Required for authentication.                                                              |
| **Project**               | Google Cloud project identifier.                                                                                                       |
| **Bucket**                | Name of the cloud storage bucket to download files from.                                                                               |
| **Working Directory**     | The directory path inside the bucket where files are located.                                                                          |
| **RegEx**                 | A regular expression pattern to match specific file names for download.                                                                |
| **Files For**             | Filter files based on time: <ul><li>All</li><li>Today</li><li>Yesterday</li><li>Today and Yesterday</li><li>Date Range</li></ul>       |
| **Start Date**            | Start date for file filtering (visible only if `Date Range` is selected under **Files For**).                                          |
| **End Date**              | End date for file filtering (visible only if `Date Range` is selected under **Files For**).                                            |
| **Delete After Download** | If enabled, files will be deleted from the bucket after successful download.                                                           |
| **Move After Download**   | If enabled (and **Delete After Download** is disabled), files will be moved to another directory in the bucket post-download.          |
| **Move Directory**        | Destination directory for moved files (required only if **Move After Download** is enabled and **Delete After Download** is disabled). |

## Sample Input

_Not applicable_

## Sample Configuration

| Field                 | Value                  |
| --------------------- | ---------------------- |
| `connection.id`       | `google-cloud-storage` |
| `project`             | `cloud-data-project`   |
| `bucket`              | `data-exports-bucket`  |
| `workingDirectory`    | `/daily-reports/`      |
| `regex`               | `^sales_.*\.csv$`      |
| `filesFor`            | `Today`                |
| `deleteAfterDownload` | `false`                |
| `moveAfterDownload`   | `true`                 |
| `moveDirectory`       | `/processed/`          |

## Sample Output

| Remote File Name            | File Name    | Size   | Download   |
| --------------------------- | ------------ | ------ | ---------- |
| /daily-reports/sales_01.csv | sales_01.csv | 120 KB | [Download] |
| /daily-reports/sales_02.csv | sales_02.csv | 95 KB  | [Download] |
