I’m working on an n8n automation that processes two Excel spreadsheets. The first spreadsheet has parent tickets with their unique IDs. The second spreadsheet contains a list of active tickets that need to be processed.
My goal is to use an AI node (ChatGPT) to analyze the active tickets and match them with the appropriate parent ticket IDs from the first file. Then I want to write those parent ticket IDs back into the second Excel file.
I’ve created most of the workflow but I’m stuck on the part where I need to update the second Excel file with the matched parent ticket IDs. I attempted using an AI agent connected to ChatGPT and also tried HTTP requests, but neither approach worked for me.
Has anyone successfully implemented a similar workflow where you need to cross-reference data between two Excel files and update one of them with matched values?
I hit this exact problem last month building an invoice matching workflow. After struggling with AI like you mentioned, I switched to the Code node with JavaScript to handle the matching myself. Just read both Excel files into arrays, then loop through to compare ticket IDs and assign parent IDs where they match. The trick is getting your data formatted right before you start - I wasted hours debugging because my ID formats didn’t match between files. Once you’ve got the matched data, use the Spreadsheet File node in append mode to write back to the second file. Way more control than trying to make AI nodes do the matching.
try using the Set node for linking parent IDs once matched, then apply the Spreadsheet File node in write mode to update the second Excel. don’t overcomplicate it with AI—these basic nodes should work just fine!
I faced a similar challenge when trying to match purchase orders in two Excel files. The solution that worked was to import both files using separate Spreadsheet File nodes, then apply the Merge node with the setting “Enrich A with B,” ensuring the join field aligns with your ticket IDs. Consistency in column names is crucial before merging. Finally, utilize another Spreadsheet File node to write the enriched data back into your second file, selecting “Update” to modify existing entries. This method bypasses AI and enhances workflow reliability.