A markdown-first Azure Functions serverless agent that reviews new SharePoint PDF and DOCX files and posts an evidence-backed brief to one Microsoft Teams channel. Python tools own retrieval, validation, grounding, idempotency, and publication; the agent owns only the document review.
Preview sample: Connector Namespace, its Azure Functions extension, and
azure-connectorsare preview technologies. Use synthetic or non-sensitive documents only. This is a proof of concept, not a production reference architecture.
- Watches one configured SharePoint library folder for new files.
- Retrieves the file privately through an Entra-authorized connector.
- Extracts bounded Markdown with Azure AI Document Intelligence.
- Produces a summary, changes, risks, questions, and review focus grounded in exact source excerpts.
- Posts escaped HTML to one fixed Teams channel with at-most-once delivery.
- Suppresses duplicate versions and publishes factual notices for unsupported or failed documents instead of fabricating a review.
- An Azure subscription with permission to create resources and role assignments
- Azure Developer CLI (
azd) - Azure CLI
- uv and Python 3.13
- The preview Connector Namespace Azure CLI extension
- A least-privileged Microsoft 365 identity that can read the source folder and post to the destination channel
Install the Connector Namespace extension:
# macOS / Linux
curl -fsSL https://aka.ms/connector-namespace-cli-install | bash# Windows PowerShell
irm https://aka.ms/connector-namespace-cli-install-ps | iexazd auth login
az login
azd env new document-review
azd env set AZURE_LOCATION eastus2
azd env set CONNECTOR_NAMESPACE_LOCATION westcentralus
azd env set SHAREPOINT_SITE_URL "https://<tenant>.sharepoint.com/sites/<site>"
azd env set SHAREPOINT_FOLDER_PATH "/Shared Documents/Document Reviews"
azd env set TEAMS_GROUP_ID "<team-guid>"
azd env set TEAMS_CHANNEL_ID "19:<channel-id>@thread.tacv2"The SharePoint library defaults to Documents. Set
SHAREPOINT_LIBRARY_NAME only when the library has another title. See
Deploy for help finding the SharePoint and Teams values.
azd upThe postdeploy hook registers the SharePoint trigger and generates synthetic
PDF and DOCX files under samples/documents/. It does not grant Microsoft 365
consent or upload a document.
Open Connector Namespaces, select the deployed namespace, and authorize these connections with the least-privileged customer identity:
sharepoint-document-sourceteams-review-announcements
Wait until both connections show Connected or Enabled.
Upload samples/documents/project-atlas-review.pdf to the configured
SharePoint folder. The trigger polls every five minutes. The Teams channel
should receive one grounded review with a link to the source document.
Each successful version is claimed once. For another run, upload a newly named file or a new SharePoint version rather than reusing a completed version.
flowchart LR
SP[SharePoint folder] -->|file trigger| AGENT[Serverless Agent]
AGENT <-->|extract document| DI[Document Intelligence]
AGENT -->|post summary| TEAMS[Microsoft Teams]
The trigger and agent instructions live in
src/agents/document_review_announcer.agent.md.
Two Python tools form the deterministic boundary: one validates, claims,
retrieves, and extracts the file; the other validates evidence and publishes to
Teams. File bytes, extracted text, generated reviews, and Teams message bodies
are never persisted or written to application logs.
How it works | Use cases | Customize | Deploy | Troubleshooting
Connector Namespace has no local emulator, so the test suite exercises the full pipeline with fake SharePoint, Teams, Document Intelligence, and Table clients.
cd src
uv sync --locked
uv run pytestSee Troubleshooting for the optional local Functions host setup.
azd down --purge