Word
Create, read and edit Microsoft Word documents from the agent.
Word
Lets the agent create, read, replace the content of and delete Word documents stored on OneDrive. It requires a Microsoft 365 connection configured in the workspace.
The Word documents have to be on OneDrive. Identify one by its ID (from a OneDrive action) or by its path on OneDrive (e.g. /Documents/report.docx).
The available operations
When you add this tool, choose which operations the agent is allowed to perform.
Create a document
Creates a new .docx on OneDrive, optionally with some initial content.
| Parameter | Required | Default | What it is |
|---|---|---|---|
| File name | Yes | — | The document's name (e.g. report.docx). The .docx extension is added if you leave it off |
| Destination folder | No | / | The destination folder's path on OneDrive (e.g. /Documents). Default: the root |
| Paragraphs | No | — | The document's initial content. Each item is either a string (plain text) or an object with text, heading (title, h1–h6), bold and italic |
| On conflict | No | rename | What happens when a file of the same name exists: rename, replace or fail |
Get the metadata
Returns a Word document's metadata (name, size, creation and modification dates and so on) without downloading the content.
| Parameter | Required | Default | What it is |
|---|---|---|---|
| Document ID | No* | — | The Word document's ID on OneDrive |
| Document path | No* | — | The document's path on OneDrive (e.g. /Documents/report.docx) |
*Give either the document ID or the document path — not both.
Get the content
Returns the download URL for a Word document's content, optionally exported to PDF or HTML.
| Parameter | Required | Default | What it is |
|---|---|---|---|
| Document ID | No* | — | The Word document's ID on OneDrive |
| Document path | No* | — | The document's path on OneDrive |
| Format | No | docx | The output format: docx (the original), pdf or html |
*Give either the document ID or the document path.
Replace the content
Replaces all of an existing Word document's content with new paragraphs of text.
| Parameter | Required | Default | What it is |
|---|---|---|---|
| Document ID | No* | — | The Word document's ID on OneDrive |
| Document path | No* | — | The document's path on OneDrive |
| Paragraphs | Yes | — | The document's new content. Each item is either a string (plain text) or an object with text, heading (title, h1–h6), bold and italic |
*Give either the document ID or the document path.
This replaces all of the document's existing content. What was there cannot be recovered.
Delete a document
Removes a Word document from OneDrive.
| Parameter | Required | Default | What it is |
|---|---|---|---|
| Document ID | No* | — | The Word document's ID on OneDrive |
| Document path | No* | — | The document's path on OneDrive |
*Give either the document ID or the document path.