Editing Excel data using LLMs

We have an excel sheet with email contracts from various industries. We would like to automate the following process: through a GPT prompt, we would like the program to extract the emails in a certain industry and send an automatic email to each of the addresses. Could you please help.

The Spreadsheet File node can read an Excel file (binary format) and convert it into JSON items that n8n can manipulate. You can then write a new Excel file with the changes using another Spreadsheet File node and save it (locally or uploaded).

LLMs in n8n (either Basic LLM Chain, Agent, or AI Agent) do not work directly with binary files; they need text or structured JSON to operate.

Therefore, it is possible to automate this process, but it requires two key transformations:

  1. Convert Excel → JSON (n8n items)
  2. Convert JSON → LLM-usable format (tabular structure, arrays, natural prompt)
  3. Transform results back to Excel if necessary.

The problem is transforming the results of LLM into excel file. As the LLM outputs the result in chat, I cannot extract the needed information and pass it to excal.