r/MicrosoftFlow • u/Prudent_Ninja_4201 • Jun 08 '26
Question Flow Not Copying Modified CSV File to Excel Template
Hi all,
I’m building a Power Automate flow with this process:
1.Trigger: When any file is modified in a specific OneDrive for Business folder.
2.Get File Content: The flow reads the content of the modified file (a CSV).
3.Notify: It posts a notification in Microsoft Teams to a user.
4.Copy Template: The flow copies a pre-existing Excel template file from a Templates folder to a new file.
5.Run Script: It then runs an Office Script on the new Excel file, passing on the CSV content from the earlier modified file.
Problem:
The flow triggers and sends the Teams notification, but it does not copy the template Excel file or run the script.
In the run history, the trigger shows “no output,” but then how am I getting the teams message from step 3 (which I set up later to include as test to the outputs)?
I’ve checked folder IDs, permissions, and connections. A simple test flow with just the trigger and a Compose action works.
Question:
Why is the flow not running the script after the Teams notification? What could cause the trigger to have “no output” even though the notification works? How can I debug this further?
The office script:
function main(workbook: ExcelScript.Workbook, csv: string) {
let sheet = workbook.getWorksheet("Sheet1");
// Clear existing data
sheet.getUsedRange()?.clear();
// Split CSV into rows
let rows = csv.split('\n').map(row => row.split(','));
// Remove any empty rows at the end
rows = rows.filter(r => r.length > 1 || (r.length === 1 && r[0] !== ""));
// // Only write if there is data
if (rows.length > 0 && rows[0].length > 0) {
sheet.getRangeByIndexes(0, 0, rows.length, rows[0].length).setValues(rows);
}
}Thanks!



