๐ฌ Consolidate data from 5 sources for automated reporting with SQL, MongoDB & Google tools
โก 1,109 views ยท ๐ฌ Document Extraction & Analysis
Description
How it works
This workflow consolidates data from five different systems โ Google Sheets, PostgreSQL, MongoDB, Microsoft SQL Server, and Google Analytics โ into a single master Google Sheet. It runs on a scheduled trigger three times a week. Each dataset is tagged with a unique source identifier before merging, ensuring data traceability. Finally, the merged dataset is cleaned, standardized, and written into the output Google Sheet for reporting and analysis.
Step-by-step
1. Trigger the workflow
- Schedule Trigger โ Runs the workflow at set weekly intervals.
2. Collect data from sources
- Google Sheets Source โ Retrieves records from a specific sheet.
- PostgreSQL Source โ Extracts customer data from the database.
- MongoDB Source โ Pulls documents from the defined collection.
- Microsoft SQL Server โ Executes a SQL query and returns results.
- Google Analytics โ Captures user activity and engagement metrics.
3. Tag each dataset
- Add Sheets Source ID โ Marks data from Google Sheets.
- Add PostgreSQL Source ID โ Marks data from PostgreSQL.
- Add MongoDB Source ID โ Marks data from MongoDB.
- Add SQL Server Source ID โ Marks data from SQL Server.
- Add Analytics Source ID โ Marks data from Google Analytics.
4. Merge and process
- Merge โ Combines all tagged datasets into a single structure.
- Process Merged Data โ Cleans, aligns schemas, and standardizes key fields.
5. Store consolidated output
- Final Google Sheet โ Appends or updates the master sheet with the processed data.
Why use this?
- Centralizes multiple data sources into a single, consistent dataset.
- Ensures data traceability by tagging each source.
- Reduces manual effort in data cleaning and consolidation.
- Provides a reliable reporting hub for business analysis.
- Enables scheduled, automated updates for up-to-date visibility.
๐ Nodes Used
Function, Google Sheets, Postgres, MongoDB, Microsoft SQL, Google Analytics
๐ฅ Import
Download workflow.json and import into n8n:
Workflow menu โ Import from File