πŸ“ Manage Google Cloud Storage with AI image generation using GPT-4 Mini

⚑ 724 views Β· πŸ“ File Management

Description

Beginner’s Tutorial: Manage Google Cloud Storage Buckets and Objects with n8n

Watch the demo video below:

Watch the video

Who’s it for

How it works / What it does

This workflow demonstrates end-to-end usage of Google Cloud Storage with AI integration:

  1. Trigger: Start manually by clicking Execute Workflow.
  2. Edit Fields: Provide input values (e.g., bucket name or image description).
  3. List Buckets: Retrieve all existing buckets in the project (branch: view only).
  4. Create Bucket: If needed, create a new bucket to store objects.
  5. Prompt Generation Agent: Use an AI model to generate a creative text prompt.
  6. Generate Image: Convert the AI-generated prompt into an image.
  7. Upload Object: Store the generated image as an object in the selected bucket.
  8. Delete Object: Clean up by removing the uploaded object if required.

This shows the full lifecycle: Bucket β†’ Object (Create/Upload/Delete) combined with AI image generation.

How to set up

  1. Trigger the workflow: Use the When clicking Execute workflow node to start manually.
  2. Provide inputs: In Edit Fields, specify details such as bucket name or description text for the image.
  3. List buckets: Use the List Buckets node to see what exists.
  4. Create a bucket: Use Create Bucket if you want a new storage bucket.
  5. Generate prompt & image:
    • The Prompt Generation Agent uses an OpenAI Chat Model to create an image prompt.
    • The Generate an Image node turns this prompt into an actual image.
  6. Upload to bucket: Use Create Object to upload the generated image into your GCS bucket.
  7. Delete object (optional): Use Delete Object to remove the file from the bucket as a cleanup step.

Requirements

How to customize the workflow

βœ… By the end of this tutorial, you’ll understand how to:

πŸ”— Nodes Used

Google Cloud Storage, AI Agent, OpenAI Chat Model, OpenAI

πŸ“₯ Import

Download workflow.json and import into n8n: Workflow menu β†’ Import from File

πŸ“– Importing guide Β· πŸ”‘ Credential setup