Excel File Processing: Load, Transform, and Save

Overview

This workflow demonstrates how to load an Excel file (or other spreadsheet formats) into n8n, convert it to JSON for manipulation, perform a transformation (calculating age from a date column), and then optionally save the result back to a new Excel file or upload it to various destinations. It is designed as a reusable template for any scenario where you need to process spreadsheet data programmatically.

Nodes and Their Roles

  • On clicking 'execute' (Manual Trigger) — No auth. Starts the workflow manually. It branches into three parallel paths for loading files: from local filesystem, from a public URL, and from cloud platforms (Google Drive, Microsoft OneDrive).
  • Read Binary File (Read Binary File) — No auth. Loads a local Excel file from a specified path (/files/customer-datastore.xlsx). Disabled by default.
  • Download Excel File (HTTP Request) — No auth. Fetches an Excel file from a public URL (https://internal.users.n8n.cloud/webhook/...). No authentication required.
  • Download from Google Drive (Google Drive) — OAuth2. Downloads a file from Google Drive using its file ID (1ffuj8v-s0h8LeEmrA2hBk-b7qKF_c9uT). Disabled by default.
  • Download from Microsoft OneDrive (Microsoft OneDrive) — OAuth2. Downloads a file from OneDrive using its file ID (549D14658E697C62!2087). Disabled by default.
  • Read Spreadsheet File (Spreadsheet File) — No auth. Converts the binary spreadsheet data (from any of the above sources) into JSON format that other nodes can process. No special options configured.
  • Work out Age (Set) — No auth. Adds a new field age to each row by calculating the difference between today's date and a created date column (format yyyy-MM-dd). Uses the expression {{ Math.trunc($today.diff(DateTime.fromFormat($json["created"], 'yyyy-MM-dd'), 'years').toObject().years) }}.
  • Write Spreadsheet File (Spreadsheet File) — No auth. Converts the JSON data back into an Excel file (.xlsx). The output filename is dynamically generated: customer-datastore_{today's date}.xlsx.
  • Write Binary File (Write Binary File) — No auth. Saves the resulting Excel file to the local filesystem at /tmp/{{$binary.data.fileName}}.
  • Upload to SFTP (FTP) — Username/Password or Key auth. Uploads the file to an SFTP server at path /home/n8n/{{$binary.data.fileName}}. Disabled by default.
  • Upload to Google Drive (Google Drive) — OAuth2. Uploads the file to Google Drive with the same filename. Disabled by default.
  • Upload to Microsoft OneDrive (Microsoft OneDrive) — OAuth2. Uploads the file to the root of OneDrive. Disabled by default.

Setup Instructions

  1. Enable the desired input nodes: By default, only the HTTP Request node is active. To use local files, enable Read Binary File and adjust the file path. To use Google Drive or OneDrive, enable those nodes and configure OAuth2 credentials in n8n.
  2. Configure credentials:
    • For Google Drive: Create a Google Cloud project, enable the Drive API, and set up OAuth2 credentials. Add the credential in n8n.
    • For Microsoft OneDrive: Register an app in Azure AD, grant Files.ReadWrite.All permission, and set up OAuth2 credentials.
    • For SFTP: Provide host, port, username, and password or private key.
  3. Adjust the transformation: The Work out Age node assumes a created column in date format. Modify the expression or add more transformations as needed.
  4. Choose output destination: Enable one or more of the output nodes (Write Binary File, Upload to SFTP, Google Drive, OneDrive) to save the processed file.

Use Cases and Variations

  • Data cleaning: Load a messy spreadsheet, apply filters, rename columns, and export a clean version.
  • Automated reporting: Fetch a daily report from a URL, calculate metrics, and upload to a shared drive.
  • Integration with other services: Replace the HTTP Request node with a webhook trigger to process files on demand, or add a Slack node to notify when processing is complete.
  • Multiple file formats: The Spreadsheet File node supports .xls, .xlsx, .csv, .ods, and more. Change the output format in the Write Spreadsheet File node.

This template provides a solid foundation for any workflow that needs to ingest, transform, and export spreadsheet data.

24 nodesmanual triggerData
Sticky NoteRead Binary FileWrite Binary FileGoogle DriveMicrosoft One DriveHTTP RequestSetFTP

Workflow JSON

{
  "meta": {
    "instanceId": "8c8c5237b8e37b006a7adce87f4369350c58e41f3ca9de16196d3197f69eabcd"
  },
  "nodes": [
    {
      "id": "05bd643c-6dd0-4f36-a586-3a06cc26893c",
      "name": "Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        200,
        780
      ],
      "parameters": {
        "width": 476.4578377639565,
        "height": 299.6468819708682,
        "content": "## Working with Excel files\n1. Load the spreadsheet file into the workflow (.xls, .xlsx, .csv).\n2. Convert the file with **Spreadsheet File** node. This allows other nodes to access the data.\n3. Transform and manipulate the spreadsheet data as needed\n4. [Optional] Convert back to a spreadsheet file\n5. [Optional] Save file locally or upload to a server\n\n\n\nℹ️ This template shows how to work with spreadsheet files themselves. Use the **Microsoft Excel 365** node to interact with the Microsoft Office 365 cloud platform. "
      },
      "typeVersion": 1
    },
    {
      "id": "84db705b-b45f-447f-b3e6-ac9650816e3b",
      "name": "Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        840,
        800
      ],
      "parameters": {
        "width": 261.5285597588645,
        "height": 244.71805702217537,
        "content": "### 1A. From a public URL"
      },
      "typeVersion": 1
    },
    {
      "id": "92b8375b-92a3-41ca-874e-d9c4567e21d4",
      "name": "Read Binary File",
      "type": "n8n-nodes-base.readBinaryFile",
      "notes": "Fetches a local file",
      "disabled": true,
      "position": [
        920,
        1140
      ],
      "parameters": {
        "filePath": "/files/customer-datastore.xlsx"
      },
      "notesInFlow": true,
      "typeVersion": 1
// ... truncated (copy to see full JSON)

How to Import This Workflow

  1. 1Copy the workflow JSON above using the Copy Workflow JSON button.
  2. 2Open your n8n instance and go to Workflows.
  3. 3Click Import from JSON and paste the copied workflow.

Don't have an n8n instance? Start your free trial at n8nautomation.cloud

Related Templates

AI-Powered CV Scanner with Google Sheets & Gemini

Overview This workflow automates the initial screening of job applicants by combining a web form, AI-powered CV analysis, and Google Sheets. When a candidate submits their application (name, email, and CV PDF), the workflow instantly extracts the text from the PDF using Mistral OCR, then sends it to Google Gemini for evaluation against a predefined job description. The AI returns a qualification score (0.0 to 1.0) and a detailed explanation, which are then logged alongside the candidate's details in a Google Sheet. This eliminates manual CV review, speeds up your hiring pipeline, and ensures every applicant is evaluated consistently. Workflow Steps Application Form (Form Trigger) — No auth required. This node presents a custom-branded web form to collect the candidate's Full Name, Email, and CV (PDF upload). The form is styled with a dark, glassmorphism theme and includes animated backgrounds. Once submitted, the workflow triggers automatically. Log Candidate Submission (Google Sheets) — OAuth2. Immediately after form submission, this node appends the candidate's name and email to the 'CVs' Google Sheet. This ensures the application is recorded even if the subsequent analysis steps fail. Extract CV Text (Mistral AI) — API Key auth. This node takes the uploaded PDF file from the form and uses Mistral's OCR API to extract all text content from the CV. It dynamically selects the binary file uploaded in the previous step. AI Qualification (LLM Chain) — This is the core analysis node. It uses a detailed prompt that includes: - A system message defining the AI as a professional, objective hiring assistant. - The full job description for a "Senior Frontend Developer" with core requirements and preferred qualifications. - Clear evaluation logic: candidates missing core requirements cannot score above 0.6; meeting all core requirements yields at least 0.75; preferred qualifications add bonuses up to 1.0. - The extracted CV text as context. - An instruction to output raw JSON only. Gemini 2.5 Flash Lite (Language Model) — API Key auth (Google AI Studio). This node provides the actual AI model (Google Gemini 2.5 Flash Lite) with a temperature of 0.4 for balanced, deterministic outputs. It powers the LLM Chain above. JSON Output Parser (Output Parser) — This node ensures the AI's response is valid JSON with the exact schema: (number) and (string). It prevents malformed responses from breaking downstream nodes. Add CV Analysis (Google Sheets) — OAuth2. After analysis, this node updates the candidate's row in the 'CVs' sheet by matching on the Email column. It writes the and from the AI's output into the corresponding columns. Create 'CVs' Spreadsheet (Google Sheets) — OAuth2. This node runs once when the workflow is first triggered manually. It creates a new Google Sheet named 'CVs' with columns: FullName, Email, QualificationRate, QualificationDescription. Setup Instructions Prerequisites A Google account (for Google Sheets) A Mistral AI account (free tier available) — Get your API key here A Google AI Studio account — Create an API key here Step-by-Step Google Sheets Credentials: In the three Google Sheets nodes, create or select an OAuth2 credential for Google Sheets. Grant access to create and edit spreadsheets. Mistral AI Credential: In the "Extract CV Text" node, create a new credential and paste your Mistral API key. Gemini Credential: In the "Gemini 2.5 Flash Lite" node, create a new credential and paste your Google AI Studio API key. Customize Job Description: Open the "AI Qualification" node and edit the section in the prompt to match your actual job posting. Activate the Workflow: Toggle the workflow to "Active" status. The "Application Form" node will generate a public URL you can share with candidates. Test: Use the "Start Here" manual trigger to initialize the Google Sheet, then submit a test application via the form URL. Use Cases & Variations Custom Job Roles: Replace the Senior Frontend Developer description with any role (e.g., Marketing Manager, Data Scientist, Sales Rep) by editing the prompt in the AI Qualification node. Different Storage: Replace Google Sheets with Airtable, Notion, or a database like PostgreSQL for storing applications and results. Multi-Round Screening: Add a Slack or email notification node to alert the hiring team when a candidate scores above a certain threshold (e.g., >0.8). Interview Scheduling: Connect the output to a Calendly or Google Calendar node to automatically invite high-scoring candidates for an interview. Batch Processing: Modify the trigger to accept a CSV upload of multiple CVs for bulk analysis. Enhanced Analysis: Add more output fields like "years of experience", "top skills", or "red flags" by updating the JSON schema in the Output Parser and the prompt.

18 nodes

Talk to Your Google Sheets Data Using OpenAI Chat Agent

This workflow transforms a Google Sheet into a live, conversational database. Using an AI agent powered by OpenAI's GPT-4.1-nano model, you can ask natural language questions about your spreadsheet data and receive accurate, context-aware answers — without writing any SQL or formulas. The agent can handle queries like total campaign spend, per-channel breakdowns, month-over-month trends, and cost-per-lead calculations. Workflow Steps Node-by-Node Breakdown Chat with Your Data (Chat Trigger) — This is the entry point of the workflow. It provides a chat interface (webhook) where users type their questions. No authentication is required to trigger the webhook; access can be secured at the workflow level. Memory (Buffer Window Memory) — Stores recent conversation history so the AI can reference previous exchanges. The buffer window keeps the last few messages to maintain context without excessive token use. No authentication required. OpenAI Chat Model (OpenAI GPT-4.1-nano) — The language model that processes user questions and generates answers. Uses API Key auth (you must provide an OpenAI API key). Parameters: model = , no additional options configured. Talk to Your Data (AI Agent) — The core agent that orchestrates the conversation. It receives user input, decides which tool to call (only the Google Sheets tool is available), and returns answers. Uses API Key auth (uses the same OpenAI credential as the model). Parameters include a system message: "Google Sheets Ask-… You are Ask-… Answer questions using Google Sheets ONLY via the tool below. Be precise and conservative. There is only one dataset. Don't ask what dataset it is. Use the data tool to answer the question." Analyze Data (Google Sheets Tool) — The tool the agent calls to read spreadsheet data. Uses OAuth2 authentication (Google Sheets). Parameters: document ID = ("Sample Marketing Data - n8n"), sheet name = "Data" (gid: 365710158). No additional options set. Sticky Notes (Information Only) — Provide setup instructions and tips. Not executable nodes. Setup Instructions Before using this workflow, you need: OpenAI Account — Visit OpenAI API Keys to generate an API key. Make sure you have billing set up at OpenAI Billing and have credits available. Google Account — You need access to a Google Sheet. The sample uses a specific sheet, but you can point it to any sheet with a similar structure: first row = column headers, rows 2–100 = data. To configure: In the OpenAI Chat Model node, create an OpenAI credential with your API key. In the Analyze Data node, create a Google Sheets OAuth2 credential (select your Google account and authorize access). Update the Document ID and Sheet Name to match your own Google Sheet. Optionally update the system message in the Talk to Your Data agent if you want to change the assistant's personality or instructions. Use Cases and Variations This workflow is perfect for: Marketing teams wanting instant answers about campaign performance, spend, and ROI. Sales operations analyzing pipeline data, deal stages, or conversion metrics. Small business owners asking questions about inventory, sales, or customer data without learning SQL. Adaptations: Replace Google Sheets with another data source tool (e.g., Airtable, Notion, PostgreSQL, MySQL) by swapping the "Analyze Data" node. Add more tools to the agent (e.g., a web search tool, a calculator) to expand its capabilities. Change the model to GPT-4o or GPT-3.5-turbo for faster/cheaper responses. Add a Slack or Webhook trigger instead of the chat trigger for a different user interface.

11 nodes

Convert Baserow Markdown to HTML via Webhook

This workflow automatically converts markdown content stored in a Baserow table to HTML. It is triggered by a webhook and can process either a single record (specified by a record ID) or all records in the table. After conversion, it updates the original record(s) with the resulting HTML, making it ideal for content management systems, blog posts, or any scenario where markdown needs to be rendered for web use. Step-by-Step Walkthrough Baserow sync video description — Webhook (no auth) This node starts the workflow when an HTTP request is received. It uses a unique path () and expects an optional query parameter to indicate a single record ID. No authentication is configured, so you should secure the webhook with a validation mechanism or by keeping the URL secret. Check if it's 1 record or all records — If (no auth) This conditional node checks whether the incoming request contains a parameter (i.e., a specific record ID). If it exists, the workflow proceeds to fetch and convert a single record; otherwise, it processes all records in the table. Get single record from baserow — Baserow (API Key auth) When a record ID is provided, this node retrieves that specific row from the Baserow table (ID ) in database . The row ID is dynamically set using the expression . Convert markdown to HTML (single) — Markdown (no auth) This node converts the content of the field (which contains markdown) into HTML. Options enabled include emoji support, simple line breaks, and backslash escaping of HTML tags. The output is stored in . Update single record in baserow — Baserow (API Key auth) The generated HTML is written back to the same record. The field ID (which corresponds to the HTML version of the description) is updated with the converted value. Get all records from baserow — Baserow (API Key auth) When no specific record ID is given, this node fetches all rows from the table (). No additional filters are applied. Convert markdown to HTML (all records) — Markdown (no auth) For each record retrieved, this node converts the field to HTML. Options are left at defaults (no emoji/simple line breaks). Update all records in baserow — Baserow (API Key auth) The converted HTML is updated back into every record’s field ID . Note that this updates all records sequentially; the node uses to target each row. (There are also nine error‑handler nodes connected to the webhook, which are not shown in detail but provide error logging or fallback behavior.) Setup Instructions Baserow – You need a Baserow account and an API token. In n8n, create a new Baserow credential (type: Baserow API) and enter your API token. You must also know your database ID () and table ID (). These can be found in the Baserow URL when browsing the table. Webhook – The workflow provides a unique webhook URL (e.g., ). Configure any external system (like a custom app, Zapier, or manual testing) to send a POST request to this URL. Optionally include a query parameter to update only one record. No other external services are required; the markdown conversion is handled natively by n8n. Use Cases and Variations Content Management System – Automatically convert markdown blog posts or descriptions stored in Baserow to HTML for display on a website. Email Campaigns – Convert markdown content to HTML before sending via an email service (you could add an SMTP node after the update). Batch Processing – The “all records” path is perfect for periodic re‑rendering of an entire table, e.g., after changing markdown conversion options. Variation – Instead of a webhook, you could trigger the workflow on a schedule to re‑convert stale records. Replace the webhook with a Schedule Trigger node and add a filter (e.g., only records updated in the last hour). Security – Since the webhook has no authentication, consider adding a Header Auth node or an HMAC validator to prevent unauthorized calls. This workflow is production‑ready, includes error handling, and can be easily adapted for other Baserow tables or different field mappings.

9 nodes

Ready to automate with n8n?

Get affordable managed n8n hosting with 24/7 support.