Who is this workflow for? This workflow automates the process of fetching data from a CSV file hosted at a specific URL and updating a Google Sheets document with the retrieved information..

What does this workflow do?

  • Manual Trigger: Initiate the workflow manually using the “When you click ‘Execute Workflow'” node.
  • Upload CSV: Fetch the CSV file from the specified URL https://opendata.ecdc.europa.eu/covid19/testing/csv/data.csv using the “Upload CSV” node.
  • Convert to JSON: The “Import CSV” node processes the uploaded CSV file, converting the data into JSON format for easier manipulation.
  • Generate Unique Key: The “Add Unique Field” node creates a unique identifier by combining the ‘countrycode’ and ‘yearweek’ fields from the JSON data. This key is used to manage data entries in Google Sheets.
  • Filter Data: The ‘Keep only DACH in 2023’ node filters the JSON data to retain records where ‘countrycode’ is ‘DE’, ‘AT’, or ‘CH’ and ‘yearweek’ begins with ‘2023’. This step ensures compliance with Google Sheets API limitations by processing a manageable subset of data.
  • Update Google Sheets: The filtered data is loaded into the designated Google Sheets document via the ‘Load to Spreadsheet’ node. The operation is set to ‘appendOrUpdate’, utilizing the specified document ID and sheet name. The previously generated ‘unique_key’ ensures accurate matching and updating of existing entries.

🤖 Why Use This Automation Workflow?

  • Efficiency: Automates data retrieval and updates, eliminating manual effort.
  • Consistency: Ensures data in Google Sheets is always up-to-date with the latest CSV information.
  • Scalability: Handles large datasets by filtering and processing only relevant data before updating.

👨‍💻 Who is This Workflow For?

This workflow is ideal for data analysts, project managers, and businesses that need to regularly import and manage data from external CSV sources into Google Sheets for reporting, analysis, or collaboration purposes.

🎯 Use Cases

  1. Sales Reporting: Automatically import weekly sales data from a central repository to a shared Google Sheet for team access.
  2. Inventory Management: Keep inventory levels updated by importing stock data from an external CSV source.
  3. Market Analysis: Regularly update market statistics by pulling data from publicly available CSV files into Google Sheets for analysis.

TL;DR

This workflow streamlines the import of CSV data from a designated URL into Google Sheets, ensuring that your spreadsheets are consistently updated with relevant and current information through an automated, efficient process.

Help us find the best n8n templates

About

A curated directory of the best n8n templates for workflow automations.