Documentation Index
Fetch the complete documentation index at: https://docs.pinkfish.ai/llms.txt
Use this file to discover all available pages before exploring further.
What can you do with it?
Microsoft Word allows you to manage Word documents programmatically through the Microsoft Graph API. You can list Word files in your OneDrive, download documents for viewing or editing, upload new or updated documents, search for specific Word files, and create temporary shareable links. This integration is perfect for document management, automated file handling, and content sharing workflows. Note that direct document editing requires downloading, modifying locally, and re-uploading.
How to use it?
Basic Command Structure
/your-Microsoft-Word-connection [action] [required-parameters] [optional-parameters]
Parameters
Required:
action - The operation to perform with Word documents
List Documents
List all Word documents in your OneDrive
Parameters:
folder-path (optional) - Specific folder to list from
Example:
/your-Microsoft-Word-connection
action: list-documents
Response:
{
"value": [
{
"id": "0123456789abc!123",
"name": "Document1.docx",
"size": 102400,
"createdDateTime": "2024-03-15T10:30:00Z",
"lastModifiedDateTime": "2024-03-15T14:45:00Z"
},
{
"id": "0123456789abc!124",
"name": "Notes.docx",
"size": 51200
}
]
}
Get Document by Path
Retrieve a specific document by its file path
Parameters:
file-path (required) - Path to the Word document
Example:
/your-Microsoft-Word-connection
action: get-by-path
file-path: /Documents/Report.docx
Response:
{
"id": "0123456789abc!123",
"name": "Report.docx",
"size": 102400,
"webUrl": "https://onedrive.live.com/...",
"file": {
"mimeType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
}
}
Search Documents
Search for Word documents by name
Parameters:
search-query (required) - Search term (e.g., document name or .docx)
Example:
/your-Microsoft-Word-connection
action: search-documents
search-query: quarterly report
Response:
{
"value": [
{
"id": "0123456789abc!123",
"name": "Quarterly Report Q1.docx",
"size": 102400,
"parentReference": {
"path": "/drive/root:/Documents"
}
}
]
}
Download Document
Download a Word document
Parameters:
item-id (required) - The ID of the document to download
Example:
/your-Microsoft-Word-connection
action: download-document
item-id: 0123456789abc!123
Response:
{
"status": "downloaded",
"filename": "Document1.docx",
"size": 102400,
"contentType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
}
Upload Document
Upload a new or updated Word document
Parameters:
file-path (required) - Destination path for the file
content (required) - Binary content of the document
Example:
/your-Microsoft-Word-connection
action: upload-document
file-path: /Documents/NewReport.docx
content: [binary content]
Response:
{
"id": "0123456789abc!125",
"name": "NewReport.docx",
"size": 204800,
"webUrl": "https://onedrive.live.com/...",
"createdDateTime": "2024-03-15T16:00:00Z"
}
Create Shareable Link
Generate a temporary public link for a document
Parameters:
item-id (required) - The ID of the document
link-type (optional) - Type of link: view or edit (default: view)
expiration-hours (optional) - Hours until expiration (default: 24)
Example:
/your-Microsoft-Word-connection
action: create-share-link
item-id: 0123456789abc!123
link-type: view
expiration-hours: 48
Response:
{
"id": "share123",
"roles": ["read"],
"shareId": "u!aHR0cHM6Ly8...",
"expirationDateTime": "2025-03-17T12:00:00Z",
"link": {
"scope": "anonymous",
"type": "view",
"webUrl": "https://1drv.ms/w/s!..."
}
}
Notes
Word files use the MIME type application/vnd.openxmlformats-officedocument.wordprocessingml.document. There is no direct API for editing document content - documents must be downloaded, edited locally, and re-uploaded. Files open in desktop Word may be locked for editing via the API. Proper permissions (Files.ReadWrite or Files.Read) are required in Azure AD. The Paragon proxy is not supported for Word operations.