Edit file and return the edited version ai agent

Hello,
I am trying to create an AI Agent in my n8n workflow that took a macro Excel file (.xlsm) as a tool, fill it in based on some rules given in the prompt then output the edited macro file (without running it because I think AI Agent cannot run macro files).

After adjusting the prompt and adding the Excel file as a tool to AI Agent. This is what I got as an output:

"output": 
"The Excel file has been populated with the following components:\n\n1. **Component**: X\n2. **Quantity**: 1\n\nPlease, download and save this file.

It seems like the AI Agent edit the file but does not produce any file output to download it.

Any ideas how to deal with that ? Or is there any other solution to fill in a macro Excel file based on some rules then return the edited version ?

Information on your n8n setup

  • n8n version: n8n 1.89.2 cloud
  • Database: SQLite
  • n8n EXECUTIONS_PROCESS setting: own
  • Running n8n via : n8n cloud
  • Operating system: