Power Automate & Office Script 3
When I asked Copilot to generate an Office Script, the code was output surprisingly quickly. When I ran it in Excel on OneDrive, the data was neatly formatted and output to the Modify sheet.
So far, so good - but the problems started when I tried to create a flow using Power Automate.
❓Records of key interactions and confusions with Copilot
[Question 1] I was asked to create a table, but it was rejected.
→ Not supported because it was not realistic to create a table structure due to the variable number of rows.
As an alternative, we chose to return JSON using Office Script (solution B).
[Question 2] How to return Modify sheet as JSON using Office Script
Copilot suggests:
const resultRange = wsModify.getUsedRange();
return resultRange.getValues();
→ It worked, but it cannot be used to create an HTML table.
[Question 3] The "Create HTML table" action was suggested.
→ After many twists and turns in the setup process, I finally succeeded in creating a table.
[Question 4] I can't save after adding "Outlook - Send Email (V2)"
Despite showing the screenshot, Copilot responded with:
"I checked the screenshot and it looks like it includes the 'Create HTML File' action."
💢I couldn't help but comment, "It says create a table, doesn't it?"
[Question 5] The cause of the internal misunderstanding has been identified
Copilot says: Even if the action name is "Create HTML table", it may be treated internally as "Create HTML file"
→ I don't use that kind of action!
Results: Revision after revision
In fact, the "Create HTML table" action was failing.
Reason: This action can only be used with an array of objects (JSON format).
So I had to rewrite the Office Script again.
🔍 Lessons learned
Copilot's suggestions are fast, but they don't always work the way you say they do.
Especially in Power Automate, be careful of cases where the action name and behavior do not match.
You will need the ability to independently trace JSON structure, output format, and error causes.
When the screenshot doesn't work, I have to shift my focus back to myself.
✍️In lieu of summary
Copilot is a joy to use.
However, the time spent at the mercy of Copilot is by no means short.
In particular, proceeding under the assumption that "AI's suggestion = correct answer" can sometimes result in a roundabout approach.
Ultimately, "Copilot is just a guide."
If you misjudge the distance, you may end up lost in an unexpected maze.
This test was exactly that experience.
And the next time, when we finally tried to put the flow into practical use,
This time the specifications for sending emails have changed???

Comments