How to match parent ticket IDs from one Excel file to open tickets in another Excel file using n8n

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 open tickets that need to be categorized.

My goal is to use ChatGPT integration to analyze each open ticket and match it with the appropriate parent ticket ID from the first file. Then I want to write that parent ID back into the second Excel file.

I’ve set up 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 something similar? What nodes or methods would work best for writing the matched IDs back to the Excel file after the AI processing is complete?

This is super common with Excel operations in n8n. I fixed it by using a Code node to structure the data before writing to Excel. After ChatGPT processes your matches, format the output exactly how Excel wants it - row numbers, column references, clean data types. The standard Excel nodes crash when data isn’t perfectly formatted. Use a Code node to create an array where each object has the row index and parent ID value, then feed that to your Excel update. I also started batching updates instead of writing everything at once. Do 10-20 matches per batch to avoid timeouts. Make sure your ChatGPT output stays consistent too - I added validation in the Code node to catch malformed responses before they hit Excel.

I ran into the same thing building ticket workflows in n8n. Your matching logic is probably fine - it’s the Excel update part that’s tricky. Skip the HTTP requests and use the Microsoft Excel node instead. Way more reliable. You’ll need to set up Microsoft Graph API auth first, but after that the Excel node handles reading and updating cells without issues. Here’s what worked for me: read both Excel files, run your ChatGPT matching (sounds like that’s already working), then loop through the results and update each row in the second file using the Excel node’s update operation. Watch out for cell references - I messed this up initially. Make sure you’re hitting the right columns and rows when writing back those parent IDs. Also throw in some error handling for when ChatGPT can’t find matches. If you can’t get the Excel node auth working, there’s always the Spreadsheet File node for local files, but you’ll have to download and re-upload everything.

use the edit spreadsheet node after chatgpt finishes processing. I ran into the same excel update issues n it worked way better than the microsoft nodes. Just map ur parent ids to the right columns in the second file. also check that ur chatgpt prompt returns consistent id formats - inconsistent formatting breaks the matching.