Automate XML Data Import to Google Sheets with n8n

Save hours of manual data entry by automating the import of XML data into Google Sheets using this n8n workflow. It fetches XML from a URL, parses it, and organizes it into a new spreadsheet seamlessly.
httpRequest
googleSheets
xml
+5
Workflow Identifier: 1831
NODES in Use: Manual Trigger, Sticky Note, HTTP Request, XML, Google Sheets, Set, Item Lists, Merge

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

What This Workflow Does

This workflow takes an XML food menu from a website and loads it into Google Sheets without any manual work.

It solves the problem of copying XML data by hand, which wastes time and causes mistakes.

The result is a new Google Sheet with all the food items neatly listed and labeled.


Who Should Use This Workflow

Anyone who gets food menu or similar XML data and wants to save hours entering data into sheets.

No need to know how to code because n8n does all steps automatically.


Tools and Services Used

  • HTTP Request node: Downloads the XML file from a web address.
  • XML node: Turns XML into JSON format to work with.
  • Item Lists node: Extracts items from the nested JSON array.
  • Google Sheets nodes: Create new spreadsheet, write headers, and add data rows.
  • Set node: Builds the header row from keys in the JSON data.
  • Merge node: Makes sure the sheet is ready before adding rows.

How This Workflow Works

Inputs

The starting input is a manual trigger inside n8n.

The workflow fetches XML data from a web URL (https://www.w3schools.com/xml/simple.xml by default).

Processing Steps

First, it downloads the XML file using the HTTP Request node.

Then the XML node changes the XML data into JSON to make it easier to handle.

Next, the Item Lists node pulls out each food item in the list from the JSON path breakfast_menu.food.

The Google Sheets node makes a new spreadsheet called “My XML Data”.

The Set node builds a header row from the keys of the first food item.

The Google Sheets node writes this header row into the new sheet.

The Merge node waits until the spreadsheet is ready.

Finally, the last Google Sheets node adds each food item as a row below the header.

Output

The output is a fully created Google Sheets spreadsheet with correctly labeled columns.

Each food item from the XML is shown in its own row for easy reading and analysis.


Beginner Step-by-Step: How to Use This Workflow in n8n

Import the Workflow

  1. Download the workflow file using the Download button on this page.
  2. Open the n8n Editor where workflows are managed.
  3. Choose “Import from File” and select the downloaded workflow to load it into n8n.

Configure the Workflow

  1. Add your Google Sheets OAuth2 credentials to n8n if not set up already.
  2. Check the HTTP Request node and change the XML URL if you want other XML data.
  3. If needed, adjust paths or spreadsheet titles in the nodes to match your data.

Test and Activate

  1. Run the workflow manually by clicking “Execute Workflow” inside n8n.
  2. Look at each node’s output to make sure the data is correct.
  3. After successful tests, turn on the workflow to use it in production.
  4. For automatic runs, replace the manual trigger with a scheduling node like Cron.

If running self-host n8n, visit self-host n8n for setup help.


Inputs and Outputs Explained

  • Input: Manual start triggers workflow. XML URL provides raw data.
  • Processing: XML converted to JSON, items extracted, spreadsheet created, headers set, rows appended.
  • Output: New Google Sheets spreadsheet with header row and all XML food items as data rows.

Edge Cases and Common Failures

  • Wrong XML URL may cause “Empty or missing XML response” error.
  • Invalid XML format can break parsing in the XML node.
  • Incorrect JSON path in Item Lists node leads to missing data rows.
  • Missing or expired Google Sheets API credentials stop sheet creation or data writing.
  • Wrong spreadsheet ID or file permissions cause failures when writing data.
  • Improper Merge node settings may cause timing issues during the workflow.

Customization Ideas

  • Change XML URL in HTTP Request node to import data from different sources.
  • Modify the JSON path in the Item Lists node to suit other XML structures.
  • Edit the spreadsheet title in the Google Sheets node that creates the sheet.
  • Add filtering nodes like IF or Function node after parsing to limit or filter the food items.
  • Use an existing spreadsheet by skipping the creation node and providing its ID instead.

Summary of Benefits and Results

✓ Automates XML data import into Google Sheets to save time and reduce errors.

✓ Creates a new spreadsheet with dynamic headers that match XML data keys.

✓ Outputs clear rows of data ready for analysis without manual edits.

→ Faster monthly reporting and better accuracy.

→ More time for useful tasks instead of copying and pasting.


Frequently Asked Questions

Update the URL parameter in the HTTP Request node named “Download XML File” to the new XML data source.
Failures happen if Google Sheets API credentials are missing, expired, or if the spreadsheet ID is incorrect.
Replace the Manual Trigger node with a Cron node to run the workflow on a defined schedule.
Check if the downloaded XML is valid and well-formed. Invalid XML can cause parsing failures.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free