How to Build Automated Data Workflows with n8n
Last updated Apr 24, 2026

n8n lets you connect data sources, transform records, and send automated reports without writing code. Setup takes under an hour on n8n Cloud. The core idea is a chain of nodes: one node queries your database, the next filters results, the last sends a Slack message or writes to a spreadsheet. Once built, the workflow runs on a schedule and you stop assembling reports by hand.
What n8n Is
n8n (pronounced "n-eight-n") is an open-source workflow automation platform. It was built to let developers and non-technical users connect apps and services through a visual editor without writing integration code from scratch. As of early 2026, n8n supports over 400 integrations including Postgres, MySQL, Google Sheets, Airtable, Slack, Gmail, Stripe, HubSpot, Notion, and any HTTP API.
The platform runs either on n8n Cloud, a managed hosted service, or self-hosted via Docker on your own server. For data reporting workflows, n8n Cloud is the practical starting point. There is nothing to maintain, and the free trial allows up to 5 active workflows and 2,500 executions per month.
n8n's primary advantage over simpler tools is its support for multi-step pipelines. You can pull from several sources, merge the data, apply logic, and push to multiple destinations in a single workflow run. That architecture matches how most data reporting actually works: data lives in more than one place, and the useful number is derived from comparing across sources.
Getting Started on n8n Cloud
Go to n8n.io, sign up, and create a workspace. No credit card is required for the trial. After setup, you land in the workflow editor.
Click "Create Workflow." You start with an empty canvas. The left side of each workflow needs a trigger: something that determines when the workflow runs. For reporting, the most common trigger is "Schedule Trigger." Click it, set the interval (every Monday at 8am, daily at 9am, the first of each month), and save.
With the trigger in place, add nodes by clicking the + button that appears after any node in the chain.
Connecting Data Sources
Postgres: Search for "Postgres" in the node panel. Select "Execute Query" as the operation. Click "Add Credentials" and enter your host, port, database name, username, and password. In the SQL field, write your query. n8n returns each row as a JSON object with column names as keys.
Google Sheets: Search for "Google Sheets" and authenticate via OAuth. Select the spreadsheet and the specific sheet tab. n8n returns each row as a JSON object. This covers data your team maintains manually in Sheets: a revenue tracker, a customer list, a product backlog.
HTTP APIs: The "HTTP Request" node connects to any REST API. Set the URL, method, and headers. Authentication options include Bearer tokens, API keys, and Basic Auth. This covers SaaS tools that expose data via API: Stripe transactions, HubSpot contacts, Shopify orders.
To combine data from two sources, add a "Merge" node. Connect both source nodes to it and set the merge mode to "Combine By Key." Specify the shared field, a date or user ID or account number, and n8n joins the two streams automatically.
Transforming Data
Once data is in the workflow, you reshape it before sending it anywhere.
The "Filter" node keeps only rows matching a condition. Set a field, an operator (equals, contains, greater than), and a value. Useful for limiting results to the past 7 days or only customers in a specific region.
The "Sort" node reorders rows by a field. The "Aggregate" node summarizes a stream of rows into a single object containing sums, counts, or averages.
For more complex transforms, the "Code" node accepts JavaScript. A common pattern: take a list of daily transactions and group them by category.
const rows = $input.all();
const totals = {};
for (const row of rows) {
const cat = row.json.category;
totals[cat] = (totals[cat] || 0) + row.json.amount;
}
return Object.entries(totals).map(([category, total]) => ({ json: { category, total } }));
For teams without a developer, n8n's AI Transform node (available from n8n version 1.30 and above) accepts a plain-English description of the transformation and writes the JavaScript automatically. Most grouping, filtering, and formatting operations are covered without requiring code knowledge.
Sending the Output
After transforming data, the workflow pushes it to a destination.
Google Sheets: Use the "Google Sheets" node in Append mode. Each time the workflow runs, it writes a new row to a summary sheet. This is how teams build a rolling weekly KPI log that updates without manual input.
Slack: The "Slack" node posts a message to any channel or direct message. Compose the message text in a "Set" node first, inserting calculated values with n8n's expression syntax. Set a Slack webhook or authenticate with your workspace directly.
Email: The "Gmail" node or "Send Email" node delivers a formatted message to a distribution list. n8n supports HTML bodies, so the email can include a table of results.
Other tools: An HTTP Request node in POST mode sends data to any BI platform, internal dashboard, or CRM that accepts incoming data.
Scheduling and Activating the Workflow
After building and testing the workflow, activate it by toggling the "Active" switch in the top-right corner of the editor. An inactive workflow will not run on schedule. Active workflows run automatically at the trigger interval you defined.
For testing before activation, use the "Execute Workflow" button. This runs the entire chain manually and shows the output at each node, so you can confirm results before scheduling live runs.
n8n Cloud also maintains an execution log that shows every past run, its status, and the data at each node. If a workflow fails, the log pinpoints which node failed and why.
A Practical Example
A weekly operations report for a SaaS company:
- Schedule trigger fires every Monday at 8am
- Postgres node queries sign-ups and activations from the past 7 days
- Google Sheets node pulls last week's support ticket count
- Merge node joins both datasets by date
- Code node calculates activation rate and ticket-to-signup ratio
- Slack node posts a formatted summary to #weekly-ops
- Google Sheets node appends a row to the KPI log
Build time: under 2 hours the first time. Ongoing time after that: zero. Teams running this type of workflow report saving 3 to 5 hours per week that previously went to copying numbers between dashboards. A survey of n8n community members found that data reporting is the third most common use case after CRM automation and lead routing.
For teams that prefer to skip workflow setup entirely and ask questions directly over uploaded data files, VSLZ AI handles end-to-end analysis from a file upload with no configuration needed.
Common Issues
Credentials not saving: After adding credentials, close and re-open the node to confirm the connection is active. Some OAuth connections require a second authentication step to complete.
Dates not matching across sources: Postgres returns ISO timestamps while Google Sheets may use a locale-formatted date string. Use a Code node or n8n's built-in date formatting functions to normalize formats before merging.
Workflow runs but output is empty: Confirm the workflow is active and not just saved. Also verify the query returns data by running it in your database client directly before relying on n8n to surface an error.
Execution limit reached on the free tier: n8n Cloud's free trial allows 2,500 executions per month. A daily workflow with 10 nodes uses roughly 10 executions per run. Scale up to a paid plan or self-host if you exceed the limit.
Summary
n8n connects data sources, transforms records, and sends reports automatically. Setup takes under an hour on n8n Cloud. The core workflow pattern for data reporting is the same in almost every case: trigger, pull, transform, send. Building one workflow once replaces a recurring manual task permanently. Start with a single source and one output destination, test with the manual execution button, activate, and extend from there.
FAQ
Is n8n free to use?
n8n has a free tier on n8n Cloud that includes up to 5 active workflows and 2,500 executions per month. This covers most small team reporting setups. Paid plans start at $20/month for more executions and workflows. n8n is also fully open-source and can be self-hosted for free on any server with Docker, with no execution limits on self-hosted instances.
How do I connect n8n to Google Sheets?
In the n8n workflow editor, add a Google Sheets node and click 'Add Credentials.' You will be prompted to authenticate with your Google account via OAuth. After authentication, select your spreadsheet from the dropdown and choose the specific sheet tab. n8n can read rows, append rows, update specific cells, or delete rows depending on the operation you select.
Can n8n pull data from a Postgres database?
Yes. The Postgres node in n8n supports executing raw SQL queries. Add your database credentials (host, port, database name, username, password) and write a SELECT query in the SQL field. n8n returns results as a JSON array of row objects. You can use any valid Postgres SQL including joins, aggregations, CTEs, and parameterized queries with n8n expressions.
What is the difference between n8n and Make (formerly Integromat)?
n8n and Make are both visual workflow automation tools. The key differences: n8n is open-source and can be self-hosted, giving you full control over your data; Make is fully cloud-hosted. n8n supports writing custom JavaScript in the Code node for complex transforms; Make's equivalent (Router and Iterator modules) covers most common cases but with less flexibility. For data reporting workflows involving databases, n8n's Postgres, MySQL, and MongoDB nodes are more capable. Make tends to have a lower learning curve for simple app-to-app automations.
How do I schedule an n8n workflow to run automatically?
Add a 'Schedule Trigger' node as the first node in your workflow. Click it to set the interval: every X minutes, hourly, daily at a specific time, weekly on a chosen day and time, or monthly. After configuring the trigger, make sure the workflow is set to 'Active' using the toggle in the top-right corner of the editor. Inactive workflows do not run on schedule even if the trigger is configured correctly.


