Templates

n8n Workflow Automation

8min

n8n is a free and open-source workflow automation tool, that enables teams to automate tasks across different services.

Microtica offers a ready-to-use template to deploy an n8n application as part of our Free templates pack. You can deploy an n8n application on our demo Kubernetes cluster to get started. When ready, you can self-host n8n on your own AWS account and setup a production-ready solution in minutes.

One-click Deploy

Click Deploy with Microtica below and follow the template steps to deploy an n8n application on your AWS account.



Built-in environment variables

Below is a list of built-in environment variables provided in the n8n runtime.

Name

Description

Required

DatabasePassword

Password for the PostgreSQL database.

Yes

Custom environment variables

To simplify the initial setup, this template sets the default configuration for the n8n application. If you need to customize the configuration and use custom variables like N8N_SMTP_HOST, N8N_SMTP_PASS (see the full list of environment variables) you can to that in two ways.

Configure environment variables from Microtica Console

To configure environment variable from Microtica Console you need to first define the variables in the schema.json file. The input properties defined here will become available in the Microtica Console. With this approach you get consistent configuration for the application as well as strong validation rules.

JSON


Enhance security measures by using sensitive parameters, such as N8N_SMTP_PASS, as 'sensitive' within the schema.json file, thereby ensuring their encryption for better protection.

Next, to inject the environment variable in the application container runtime, just reference the variable using the {{ENV_VAR_NAME}} syntax.

YAML


Configure environment variables directly in the Kubernetes spec

To configure an environment variable directly in the Kubernetes spec you need to update the kube.config file.

Similar to the previous example, now provide the environment variable value directly in the spec.

YAML


Estimated AWS cost

The estimated cost of the AWS cloud depends on the configuration of the n8n infrastructure. Below is the cost estimation breakdown assuming the resources are running all the time:

  • EKS Cluster - $70/month
  • Application Load Balancer - $17/month
  • 2 x t3.large EC2 instances - $60/month

Total cost per month with this minimal configuration is approximately $150/month.

Optimize AWS cost

To save costs while using n8n in a non-production environment, consider running it from Monday to Friday, 8 hours per day. This schedule can help you achieve at least a 65% reduction in your cloud expenses.

In the Resources or Cost Dashboard, create a Saving Schedule to implement these cost-saving measures.

Document image