Categories: FAANG

Easy AI workflow automation: Deploy n8n on Cloud Run

n8n is a powerful yet easy-to-use workflow and automation tool for multi-step AI agents, and many teams want a simple, scalable, and cost-effective way to self-host it. With just a few commands, you can deploy n8n to Cloud Run and have it up and running, ready to supercharge your business with AI workflows that can manage spreadsheets, read and draft emails, and more. The n8n docs now tell you how to deploy the official n8n Docker image to our serverless platform, connect it to Cloud SQL for persistent data storage, call Gemini as the agents’ LLM, and (optionally) connect your workflows directly to Google Workspace.

Deploy n8n to Cloud Run in minutes

You can deploy the official n8n image directly to Cloud Run. This gives you a managed, serverless environment that automatically scales from zero to handle any workload, so you only pay for what you use. That means whenever you’re not actively using n8n, you’re not paying for any compute and your n8n data is persisted in Cloud SQL.

To first try out n8n quickly on Cloud Run, deploy it with this one command:

code_block
<ListValue: [StructValue([(‘code’, ‘gcloud run deploy –image=n8nio/n8n \rn –allow-unauthenticated \rn –port=5678 \rn –no-cpu-throttling \rn –memory=2Gi’), (‘language’, ”), (‘caption’, <wagtail.rich_text.RichText object at 0x7fc87b8c8a60>)])]>

This gives you a running instance of n8n that you can use to try out n8n and all its awesome features for workflow automation with the power of AI. Connect your first n8n agent to Gemini (provide your Gemini API key for the “Google Gemini Chat Model” credentials) and see it in action.

Then when you’re ready to use n8n for actual workflows, you can follow the steps in the n8n docs for a more durable, secure setup (using Cloud SQL, Secrets Manager, etc.). You can either use a Terraform script or follow along step-by-step through each gcloud command in the instructions.

Connect Google Workspace tools

A key benefit of hosting on Google Cloud is the ability to easily connect n8n to your Google Workspace tools. The n8n docs walk you through the steps to configure OAuth for Google Cloud, allowing your n8n workflows to securely access and automate tasks using Google tools like Gmail, Google Calendar, and Google Drive.

Here’s a demo showing an n8n instance on Cloud Run that uses Gmail and Google Calendar to schedule appointments on your behalf whenever an email hits your inbox with a request to meet:

The two AI agents in this n8n workflow call Gemini to do the following:

  • The Text Classifier reads your incoming emails to see which ones are asking for time to meet

  • The Agent checks your calendar for your availability, and sends a response with a suggested time

Cloud Run is great for all AI apps

Cloud Run is a versatile, easy-to-use runtime for all your AI application needs. Whether your agentic app was made with n8n, LangChain, ADK, or no framework at all, you can deploy it to Cloud Run. This collaboration on Cloud Run and n8n is another example of how we aim to simplify the process for developers to build and deploy intelligent applications.

Next steps

AI Generated Robotic Content

Recent Posts

Flux2klein little info

So in the past few weeks I have been dedicating long hours into finding optimal…

2 hours ago

Python Decorators for Production Machine Learning Engineering

You've probably written a decorator or two in your Python career.

2 hours ago

MixAtlas: Uncertainty-aware Data Mixture Optimization for Multimodal LLM Midtraining

This paper was accepted at the Workshop on Navigating and Addressing Data Problems for Foundation…

2 hours ago

Cost-efficient custom text-to-SQL using Amazon Nova Micro and Amazon Bedrock on-demand inference

Text-to-SQL generation remains a persistent challenge in enterprise AI applications, particularly when working with custom…

2 hours ago

How WPP accelerates humanoid robot training 10x with G4 VMs

Editor’s note: Today we hear from Perry Nightingale, SVP of Creative AI at WPP about…

2 hours ago

Dark Matter May Be Made of Black Holes From Another Universe

A model of the cyclic universe suggests that dark matter could be a population of…

3 hours ago