Ask AI
Skip to main content

Read file from cloud storage

Function: Read file from cloud storage

This action allows you to securely retrieve a specific file from your cloud storage bucket. You provide the complete location of the file and the necessary security credentials, and the system will fetch the file for further use in your application. This is useful for accessing documents, images, configuration files, or any other data stored in your cloud environment.

Input

  • Bucket URL (Text): The complete path to the file you wish to read, including the bucket name and the file's location within the bucket. For example, if your bucket is my-project-bucket and the file is reports/monthly_summary.csv, you would enter gs://my-project-bucket/reports/monthly_summary.csv. This input is required.
  • Access Token (Text): The security token or credential required to authenticate and authorize your application to access the specified cloud storage bucket. This input is required.

Output

  • Access token variable name (Text): This output provides the name of the variable that held the access token used for this file retrieval operation.

Execution Flow

Real-Life Examples

Here are some ways you can use the "Read file from cloud storage" action in your applications:

Example 1: Retrieving a daily sales report

Imagine you have daily sales reports stored in a Google Cloud Storage bucket, and you want to process the latest one.

  • Inputs:
    • Bucket URL: gs://my-company-data/sales/2023-10-27_sales_report.csv
    • Access Token: your_gcp_service_account_token_here
  • Result: The 2023-10-27_sales_report.csv file is retrieved from the cloud storage. The output Access token variable name will contain the name of the variable that stored your_gcp_service_account_token_here. You can then use this file in subsequent actions, like parsing its data or sending it via email.

Example 2: Accessing a customer profile image

Your application needs to display a customer's profile picture, which is stored in cloud storage.

  • Inputs:
    • Bucket URL: gs://customer-assets/profile_pictures/john_doe_profile.jpg
    • Access Token: another_gcp_token_for_assets
  • Result: The john_doe_profile.jpg image file is retrieved. The output Access token variable name will contain the name of the variable that stored another_gcp_token_for_assets. This image can then be displayed in your application's user interface.

Example 3: Loading a configuration file for an internal tool

An internal tool requires a specific configuration file that is updated periodically and stored in cloud storage.

  • Inputs:
    • Bucket URL: gs://internal-configs/app_settings/config_v3.json
    • Access Token: internal_app_gcp_token
  • Result: The config_v3.json file is retrieved. The output Access token variable name will contain the name of the variable that stored internal_app_gcp_token. The application can then parse this JSON file to apply the latest settings.