n8n

How to Automate Google Sheets XML Data Import?

Turn any XML feed into a Google Sheet you can share. On each run it creates a new spreadsheet, adds clean column headers, and loads every item as a row. It suits teams that need quick imports of menus, catalogs, supplier lists, or any repeating XML records.

After you click run, the flow downloads an XML file from a URL, converts it into structured data, and breaks the list into single items. It then creates a fresh Google Sheet, builds the header from the field names in the first item, and writes that header. A merge step holds the data until the sheet is ready, then appends every record as a new row. You get a neat table without copy and paste and without manual mapping.

You only need n8n and a Google account with access to Sheets and Drive. Set your XML URL and connect your Google Sheets credential, then test. Expect a sheet named My XML Data with matching headers and rows ready for filters, charts, and sharing. This is great for supplier feeds, menu updates, or any XML list that needs to live in a spreadsheet. Use n8n version 0.197.1 or newer for the expression syntax and merge behavior used here.

What are the key features?

  • One click manual run starts the end to end import
  • HTTP request pulls an XML file from any URL you set
  • XML parser turns the file into structured data that n8n can read
  • Item splitter outputs one record per list item for clean rows
  • Creates a new Google Sheet with a clear title for each run
  • Builds the header row automatically from the first item’s field names
  • Writes the header to the sheet before any data rows
  • Merge step waits for the sheet setup to finish before appending data
  • Appends all records as rows so the table is ready to filter and share

What are the benefits?

  • Reduce manual import work from 30 minutes to 2 minutes per feed
  • Improve data accuracy by removing copy and paste errors by up to 90%
  • Connect web XML sources directly to Google Sheets with no code
  • Handle thousands of rows in one run without extra effort
  • Create consistent, ready to analyze tables every time

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Google Sheets. See the Tools Required section above for links to create accounts with these services.
  3. Confirm your n8n version is 0.197.1 or newer so the expression syntax and merge behavior work as expected.
  4. Open any Google Sheets node in the workflow. In the 'Credential to connect with' dropdown, click 'Create new credential'. Choose Google Sheets OAuth2, name it clearly, and follow the on screen steps to grant access to Drive and Sheets.
  5. In the Create new spreadsheet file node, select your Google Sheets credential. Update the title if you want a different name and pick the correct Drive if your account uses multiple Drives.
  6. Open the HTTP Request node and set the URL to the XML feed you plan to import. Test the URL in a browser to make sure it returns XML.
  7. Open the XML node and keep the default settings. If your XML structure is nested, note the path to the list of items you need.
  8. Open the Split out food items node and set the field path to the array that holds your items, for example menu.items.item. This must match your feed.
  9. Open the Set node labeled Define header row. Leave the expression that builds column names from the first item, or adjust if you need a custom header order.
  10. Click Execute Workflow. After it runs, copy the spreadsheetId shown in the Google Sheets nodes or open Google Drive to find the new file.
  11. Validate results: check the first row for proper headers and confirm each item became one row. If values are nested or blank, adjust the item path in the Split node.
  12. Troubleshoot access issues: if no file is created, recheck the Google Sheets credential, confirm Drive access, and ensure the account has permission to create files in the selected Drive.
  13. Optional scheduling: add a Cron node before the HTTP Request node if you want automatic runs, then disable the Manual Trigger node.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Google Sheets

Sign up

Free: $0 (Google Sheets API usage has no additional cost; quota limits apply)

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.