Build Your First n8n Automation Workflow with Docker: A Step-by-Step Installation Request System
Automation doesn’t always require writing hundreds of lines of code.
With tools such as n8n, you can connect forms, applications, APIs, databases, and communication platforms together to build automated business processes through a visual workflow.
What Is n8n?
n8n (pronounced “n-eight-n”, short for “nodemation”) is a leading fair-code workflow automation platform designed to build data pipelines, connect applications, and deploy multi-step AI agents.
What is does is actually, instead of manually moving information from one application to another, you can create a workflow that handles the process automatically.
Today we will see how can we use n8n (locally), starting with a very simple workflow.
Each step is represented by a node.
A node performs a specific operation. One node might receive data, another might transform it, another might make a decision, and another might send information to an external service.
This makes n8n useful for automating processes involving:
- Forms
- Slack
- Databases
- REST APIs
- Webhooks
- Cloud services
- Internal applications
- AI services
Before building our workflow, however, let’s get n8n running locally.
Part 1: Setting Up n8n Locally with Docker Desktop
One of the easiest ways to experiment with n8n locally is to run it inside a Docker container.
If you’re using Windows, Docker Desktop provides a convenient way to run Docker containers without manually installing and configuring all of n8n’s dependencies.
Prerequisites
Before starting, make sure you have:
- Windows, macOS, or Linux
- Docker Desktop installed and running
- An internet connection
- A terminal such as PowerShell, Command Prompt, or Windows Terminal
Step 1: Verify Docker Is Running
- First, install Docker Desktop on your machine.
- Download and install Docker Desktop for your operating system.
- After installation, launch Docker Desktop.
You should see the Docker Desktop dashboard once the Docker engine has started successfully. The important thing here is that Docker needs to be running before we start the n8n container.
Step 2: Verify Docker Installation
Open your terminal.
On Windows, you can use:
- PowerShell
- Command Prompt
- Windows Terminal
Run:
docker --versionYou should receive output showing the installed Docker version.
You can also verify that Docker is running with:
docker infoIf Docker is running correctly, Docker will return information about the Docker engine.
If you receive an error indicating that the Docker daemon isn’t running, open Docker Desktop and wait until it finishes starting.
Step 3: Create a Persistent Docker Volume
- Open Docker Desktop.
- Click on the Volumes tab in the left-hand navigation sidebar.
- Click the Create (or + Create) button at the top right.
- Set the Volume name to:
n8n_data - Click Create.
Your persistent volume is now ready to store n8n’s workflow configurations, credentials, user info, and app data independently of the container.
Step 4: Run n8n Container via Docker Desktop
Option A: Search and Run directly from Docker Desktop GUI
Step 1. Pull the Image
- Go to the Search bar at the top of Docker Desktop.
- Search for:
n8nio/n8n(ordocker.n8n.io/n8nio/n8n) - Select the Images tab in the search results (if prompted) and locate
n8nio/n8n. - Click Pull to download the image onto your machine.
Step 2. Run the Container from your Local Images
- Once the download completes, go to the Images tab on the left sidebar menu.
- Find
n8nio/n8nin your list of local images. - Hover over it and click the Run button (or click the three dots
...next to it and select Run). - In the pop-up modal, expand Optional settings:
- Container name:
n8n - Host port:
5678(this maps port 5678 on your computer to port 5678 in the container) - Volumes:
Host path / Volume name: Select or type n8n_data
Container path: /home/node/.n8n
5. Click Run.
Option B: Using a docker-compose.yml File in Docker Desktop (Recommended for Easy GUI Management)
If you prefer using Docker Desktop’s Dev Environments or simply starting containers with a config file, you can create a file named docker-compose.yml
version: '3.8'
services:
n8n:
image: docker.n8n.io/n8nio/n8n
container_name: n8n
ports:
- "5678:5678"
volumes:
- n8n_data:/home/node/.n8n
restart: always
volumes:
n8n_data:
external: trueHow it works in Docker Desktop
- Detached Mode (
-d): Docker Desktop automatically runs containers in the background. You can check their status, view logs, or stop/restart them anytime under the Containers tab. - Port Mapping (
5678:5678): Once running, click the port link (5678:5678) directly inside the Docker Desktop Containers view, or open your web browser and go tohttp://localhost:5678. - Volume Mount (
n8n_data): The volume mounted to/home/node/.n8nensures all your workflows and settings remain safe even if you stop, delete, or recreate the container.
Alright now we have completed the docker setup successfully!!
Step 5: Open n8n in Your Browser
Now open:
http://localhost:5678You should see the n8n interface.
On the first launch, n8n will guide you through the initial setup, including creating your owner account.
After completing the setup, you’ll arrive at the n8n workspace.
Step 6: Creating the Installation Request Workflow
Once you have completed the above you will be redirected to the below screen,
Now that n8n is running, we’re ready to build the automation.
Now let us create a new workflow in n8n.
We’ll start with a Form Trigger.
Step 7: Add the Form Trigger
Every workflow needs something that starts it.
This is called a trigger.
For our workflow, the trigger will be a web form.
Select on Form Submission from the triggers and add it to the workflow.
The form will collect two pieces of information:
- Preferred installation date
For example:
Email:
john@example.comPreferred Installation Date:
2026-08-12The user interacts with the form, not the n8n workflow itself.
Once the form is submitted, n8n receives the information and starts processing it. Complete the configuration as shown below.
Step 8: Test the Form
Before continuing, test the form.
Submit something like:
Email:
tharindunirmala99@gmail.comInstallation Date:
2026-08-16After submitting the form, return to n8n.
Get Tharindunirmala’s stories in your inbox
Join Medium for free to get updates from this writer.
The Form Trigger should now contain the submitted data.
This introduces one of the most important concepts in n8n; data items.
Step 9: Understand n8n Data
n8n passes information between nodes as data items.
A simplified representation of our form submission could look like:
[
{
"email": "john@example.com",
"installDate": "2026-08-12"
}
]The outer structure is an array, while the individual item contains the submitted fields. This becomes particularly important when workflows process multiple items. Each node can receive data, perform an operation, and pass the resulting data to another node.
Step 10: Pin the Test Data
During development, you don’t want to submit the form every time you want to test a downstream node.
n8n provides a useful feature called pinning. Pinning allows you to preserve sample output from a node. Once the form data has been generated, pin the output.
Now you can work with that fixed dataset while developing the next steps of the workflow. This makes development considerably faster.
Step 11: Add the If Node
Now we can introduce business logic.
Our requirement is to
“ Send a Slack notification when the requested installation date is within the next seven days.”
To implement this, add an If node after the Form Trigger.
The If node allows us to evaluate a condition and route the data accordingly.
The workflow now looks like:
Form Trigger
↓
If Node
/ \
True FalseThe True branch means the condition has been satisfied.
The False branch means it hasn’t.
Step 12: Use Expressions
We need to compare the requested installation date with the current date.
We could hardcode today’s date, but that would make the workflow useless after the date changes.
Instead, we need a dynamic value.
n8n provides an expression system that allows us to reference dynamic data and functions.
One important value is:
$now$now represents the current date and time when the workflow executes.
This allows our workflow to calculate the seven-day window dynamically.
Step 13: Check Whether the Date Is Within Seven Days
The business requirement is:
Installation Date <= Current Date + 7 DaysIn other words:
Is the requested installation date within the next seven days?
Instead of manually entering a date, we use n8n’s expression functionality to calculate the date dynamically.
This is an important concept in workflow automation.
Static values are useful for testing, but dynamic expressions allow a workflow to remain useful over time.
For example:
Today
↓
Calculate +7 days
↓
Compare with requested dateTomorrow, $now changes automatically.
The workflow therefore continues to work without requiring us to modify the date manually.
Add the required configurations as shown below.
Ensure the conditions are valid and run Execute Step
$now to dynamically determine whether the installation is within seven days.Step 14: Understand the Two Branches
The If node now gives us two possible paths.
True
The installation request meets our requirement.
Installation <= Current Date + 7 DaysThe workflow should send a Slack notification.
False
The installation is more than seven days away.
Will not me implemented at this level, instead we will be including a No Operation, do nothing flow.
Now its time to Slack!!! (I mean to connect Slack…..)
Step 16: Connect Slack
Now let’s connect our automation to Slack.
Add a Slack node to the True output of the If node, following the below guide.
The Slack node allows n8n to communicate with your Slack workspace.
Configure your Slack credentials and select the channel where the notification should be sent.
The message could contain information such as:
New Installation RequestEmail: john@example.com
Requested Installation Date: 2026-08-12This installation is scheduled within the next 7 days.
The important part is that the message can use information dynamically from the form submission.
Instead of manually typing the user’s email or installation date, the Slack node can reference data coming from earlier nodes.
Follow the bottom guide and create a new app, select your workspace and allow access.
Make sure to copy the Bot token carefully and paste it in the Access Token under the Connection tab.
Once all is done, you can create a new channel “Installation-requests”
Also make sure to invite new App, Installation requests. You can do it by simply running the below command in the new channel
/invite @Installation RequestsMake sure to finalize the configurations as shown above and modify the Message text as shown below.
Step 17: Activate the Workflow
During development, you’re primarily testing the workflow. Once you’re satisfied with the results, you can activate it. Before doing so, verify:
- The form works.
- Required fields are configured correctly.
- The installation date is being received correctly.
- The seven-day calculation works.
- Both If branches work.
- Slack notifications reach the correct channel.
- Credentials are configured correctly.
- No test data is unintentionally being used in production.
Once everything is ready, activate the workflow.
The automation is now ready to process real requests.
Congratulations! You Built Your First n8n Automation
Congratulations! You have successfully completed your first n8n automation workflow.
In this tutorial, you started by setting up n8n locally using Docker Desktop and then built an installation request workflow from the ground up.
You learned how to:
- Run n8n locally with Docker
- Create a persistent Docker volume
- Build a Form Trigger
- Work with data items
- Pin test data
- Use expressions and
$now - Implement conditional logic with the If node
- Connect n8n with Slack
- Test different workflow paths
- Activate a workflow
The next step is to take a repetitive task from your own work and ask yourself:
Can I automate this with n8n?
Start small, experiment with different nodes, explore the n8n template library, and gradually build more sophisticated workflows.
Congratulations again on completing your first n8n automation. Happy automating!








