Overview
Enable your agents to create, read, and manage Word documents and text files in OneDrive or SharePoint. Automate document creation, retrieve content, manage document properties, and streamline your document workflows with AI-powered automation.Prerequisites
Before using the Microsoft Word integration, ensure you have:- A CrewAI AMP account with an active subscription
- A Microsoft account with Word and OneDrive/SharePoint access
- Connected your Microsoft account through the Integrations page
Setting Up Microsoft Word Integration
1. Connect Your Microsoft Account
- Navigate to CrewAI AMP Integrations
- Find Microsoft Word in the Authentication Integrations section
- Click Connect and complete the OAuth flow
- Grant the necessary permissions for file access
- Copy your Enterprise Token from Integration Settings
2. Install Required Package
Available Actions
microsoft_word/get_documents
microsoft_word/get_documents
Description: Get all Word documents from OneDrive or SharePoint.Parameters:
select
(string, optional): Select specific properties to return.filter
(string, optional): Filter results using OData syntax.expand
(string, optional): Expand related resources inline.top
(integer, optional): Number of items to return (min 1, max 999).orderby
(string, optional): Order results by specified properties.
microsoft_word/create_text_document
microsoft_word/create_text_document
Description: Create a text document (.txt) with content. RECOMMENDED for programmatic content creation that needs to be readable and editable.Parameters:
file_name
(string, required): Name of the text document (should end with .txt).content
(string, optional): Text content for the document. Default is “This is a new text document created via API.”
microsoft_word/get_document_content
microsoft_word/get_document_content
Description: Get the content of a document (works best with text files).Parameters:
file_id
(string, required): The ID of the document.
microsoft_word/get_document_properties
microsoft_word/get_document_properties
Description: Get properties and metadata of a document.Parameters:
file_id
(string, required): The ID of the document.
microsoft_word/delete_document
microsoft_word/delete_document
Description: Delete a document.Parameters:
file_id
(string, required): The ID of the document to delete.
Usage Examples
Basic Microsoft Word Agent Setup
Reading and Managing Documents
Document Cleanup and Organization
Troubleshooting
Common Issues
Authentication Errors- Ensure your Microsoft account has the necessary permissions for file access (e.g.,
Files.Read.All
,Files.ReadWrite.All
). - Verify that the OAuth connection includes all required scopes.
- When creating text documents, ensure the
file_name
ends with.txt
extension. - Verify that you have write permissions to the target location (OneDrive/SharePoint).
- Double-check document IDs for correctness when accessing specific documents.
- Ensure the referenced documents exist and are accessible.
- Note that this integration works best with text files (.txt) for content operations.
- The
get_document_content
action works best with text files (.txt). - For complex Word documents (.docx), consider using the document properties action to get metadata.
Getting Help
Need Help?
Contact our support team for assistance with Microsoft Word integration setup or troubleshooting.