Forum Discussion
CoPilot Agent for copying and renaming Excel spreadsheets
Hi gzimmerman​ !
I think the way to actually build what you're describing is a combination: a Copilot Studio agent for the conversation, plus a Power Automate flow that does the real file work behind the scenes. The agent captures what you ask (for example the source file and the new name), then triggers the flow to carry it out.
One thing worth knowing about your Teams setup: files in a Teams channel actually live in a SharePoint document library underneath. That's good news, because Power Automate's SharePoint connector has the actions you need, including copying a file to a destination with a new name. So your flow would roughly: take the source file, copy it into the target location, and set the new filename, all using SharePoint actions.
So the realistic path is:
- Build a flow in Power Automate that copies and renames the file in the SharePoint library behind your Teams channel.
- Create an agent in Copilot Studio and add that flow as an action.
- Set it up so the agent passes the file name and new name into the flow as inputs.
Fair warning, this is a low-code build rather than a one-line prompt, so expect to spend a bit of time wiring it up and testing permissions. But it's a well-trodden pattern and I think it'll do exactly what you want once it's in place.