Microsoft 365

Write a OneDrive file

m365_files_upload · Changes data · Markdown

Writes a text file to a path in a mailbox user's OneDrive; replacing one waits for the owner.

$0.001 a call

From your agent’s balance. A call that fails costs nothing.

An example

Save the October returns report next to the policy.

Your agent callsm365_files_upload$0.001 a call

The example business is Hansen & Voss, a restaurant-equipment wholesaler in Hamburg with 60 staff. The reply is the one the tool really gives.

With these arguments
{
  "mailbox": "support@hansenvoss.example",
  "path": "Reports/october-returns.md",
  "content": "# Returns in October\n\n14 returns, 3 of them dishwashers."
}
What comes back
{
  "mailbox": "support@hansenvoss.example",
  "file": {
    "id": "01BYE5RZ5MYLM2SMX75ZBIPQZIHT6OAYPB",
    "name": "october-returns.md",
    "size": 56,
    "folder": false,
    "type": "text/plain",
    "modified_at": "2026-10-14T08:00:00Z",
    "link": "https://hansenvoss-my.sharepoint.com/personal/support/Documents/Reports/october-returns.md"
  }
}

Use it when

The agent saves a report or a note where the team will look for it.

What it does

Write a text file (up to 4 MB) to a path in a mailbox user's OneDrive. If the file exists it is kept and the new one renamed, unless if_exists is replace (which waits for the owner's approval by default) or fail. $0.001.

What comes back

mailbox; file: id, name, size, type, modified_at and link. Every reply also carries cost_usd and balance_usd.

Inputs

NameTypeWhat it is
mailboxstringOne of the mailboxes the agent may act as; optional when only one is connected. Up to 254 characters.
pathRequiredstring1 to 400 characters.
contentRequiredstringUp to 4,000,000 characters.
if_existsstringOne of: rename,replace,fail. Default: rename.

The call

Over MCP, call m365_files_upload on https://api.conecto.chat/mcp/microsoft365. Over REST:

Terminal
curl -X POST https://api.conecto.chat/v1/tools/m365_files_upload \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mailbox":"support@hansenvoss.example","path":"Reports/october-returns.md","content":"# Returns in October\n\n14 returns, 3 of them dishwashers."}'

When it refuses

A refused call costs nothing and says what to do next.

CodeWhenWhat to do
not_connected409Microsoft 365 isn't connected yet.Connect it with m365_connect.
not_allowed403The mailbox is not one the agent may act as.Use a connected mailbox; the owner adds one by connecting again.
vendor_rejected502Microsoft refused: the app lacks a permission or consent, or the request.Ask the admin to grant what the message names.
too_large413The content is over 4 MB.Split it into smaller files.

Give this to your agent.

Set up Conecto from https://conecto.chat/SKILL.md