web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / "Create File" tool doe...
Copilot Studio
Suggested Answer

"Create File" tool doesn't work with Topic

(0) ShareShare
ReportReport
Posted on by 15
Hi!

I want to setup Copilot Agent that creates a file in OneDrive for each message sent by the user.

I created an Agent in Copilot Studio, set up the Topic for a "A message received" trigger (which means for each user's message), and added the tool "OneDrive - Create file" as an action.
In that tool, there are 3 parameters: Folder Path, File Name, and File Content. I tried to set them as dynamic value, as variable, as hardcoded text...

However, when I send a message to bot, I receive an error: The parameter with name 'file' is required to call the connector. And the behaviour is the same for any parameter values in the tool.
Also, exactly the same situation for SharePoint - Create File.

I tried to use the same tool in Agent Flows, adding it as an action after the trigger "When a new channel message is added" (Teams), and passing "Message body content" variable as File Content. And in this case it worked.

Am I doing something wrong? Or is it just not suitable for topic action? Any other approach to do that?

Thanks 
Categories:
I have the same question (3)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,488 Super User 2025 Season 2 on at
     
    The issue is, you are setting them to dynamic, but the person is merely sending you a message, there is no File Content etc to actually execute against.
     
    You need to either provide that in (hard coded values), variables, or have already captured that somewhere that provides it Globally to other Topics, otherwise there won't be anything there to pass in.
     
    That's why its failing.
  • CU17061645-1 Profile Picture
    15 on at
    Hi @Michael E. Gernaey

    I tried dynamic, hardcoded text, variables - and received the same error for all cases.

    Anyway, I've found another solution:

    1. I created an Agent Flows with the trigger "When the agent calls the flow"
    2. For that trigger I specified an input text parameter "Message"
    3. Then I added an action "Create file" (the same I tried for Topic). "File content" = "Message" parameter
    4. In my topic for the trigger "A message received", I added an action Tool (the one I created in Agent Flows) and pass the "Message" = "Activity.Text" variable

    Now it works. The only thing left: I don't see how to prevent the bot from answering user's question in such a case. But currently it's not critical for me

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 270 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 181 Super User 2025 Season 2

#3
S-Venkadesh Profile Picture

S-Venkadesh 93 Moderator

Last 30 days Overall leaderboard