You are helping me build the following AI agent workflow. ## Goal GCS Management Image Gen: Manually triggers a workflow to generate an AI image from a text prompt and upload it to a specified Google Cloud Storage bucket. ## Specification - What it does: You manually trigger a workflow that uses OpenAI to turn your text prompts into AI-generated images and upload them directly to your Google Cloud Storage bucket. The process also handles optional cleanup by deleting the generated files once they are stored. - Trigger: Run manually (Manual ยท on demand) - Autonomy: Fully hands-off - Expected setup effort: about an afternoon - Tools/services involved: - n8n: Workflow orchestration platform - Google Cloud Storage: Cloud bucket and object management - OpenAI Chat Model: Generating creative text prompts - OpenAI: Image generation from prompts ## Known pitfalls, handle each one explicitly in your implementation 1. OpenAI image generation can be slow and expensive so implement caching for identical prompts to reduce costs and latency. 2. GCS upload failures may occur due to permission issues so verify the service account has write access to the target bucket beforehand. 3. Large generated images might exceed memory limits in n8n so configure chunking or stream uploads if handling high-resolution outputs. 4. Cleanup operations can accidentally delete active assets so add a confirmation step or use specific naming conventions for temporary files. ## Reference implementation https://n8n.io/workflows/7502 (workflow template) Fetch and inspect this before building. If it matches my stack, adapt it; if not, rebuild the pattern with my tools. ## Process requirements 1. Before building: ask me which of the listed tools I actually use and what my platform is (n8n / Make / code / other). Do not assume. 2. Adapt the pattern to my answers; do not force the reference stack. 3. Address every pitfall above; tell me how you handled each. 4. Provide a test plan I can run before letting this touch real data. 5. Ask before any step that sends messages, modifies data, or spends money. Source: https://usecasesforagents.com/use-case/automate-gcs-management-with-ai-image-gen/ via usecasesforagents.com