{"id":51094816,"url":"https://github.com/gleanwork/sl-glean-microsoft-excel-addin","last_synced_at":"2026-06-24T05:30:57.685Z","repository":{"id":361020075,"uuid":"1242680610","full_name":"gleanwork/sl-glean-microsoft-excel-addin","owner":"gleanwork","description":"Excel Add-In for Microsoft Word, powered by Glean.","archived":false,"fork":false,"pushed_at":"2026-05-28T20:57:32.000Z","size":2848,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-28T22:21:04.800Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gleanwork.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-18T16:45:23.000Z","updated_at":"2026-05-28T20:57:36.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/gleanwork/sl-glean-microsoft-excel-addin","commit_stats":null,"previous_names":["gleanwork/sl-glean-microsoft-excel-addin"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/gleanwork/sl-glean-microsoft-excel-addin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gleanwork%2Fsl-glean-microsoft-excel-addin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gleanwork%2Fsl-glean-microsoft-excel-addin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gleanwork%2Fsl-glean-microsoft-excel-addin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gleanwork%2Fsl-glean-microsoft-excel-addin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gleanwork","download_url":"https://codeload.github.com/gleanwork/sl-glean-microsoft-excel-addin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gleanwork%2Fsl-glean-microsoft-excel-addin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34719086,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-24T02:00:07.484Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-24T05:30:55.926Z","updated_at":"2026-06-24T05:30:57.676Z","avatar_url":"https://github.com/gleanwork.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Glean in Excel\n\nGlean in Excel is a customer-deployable Microsoft Excel taskpane add-in. It lets users sign in with Glean OAuth, ask questions about selected workbook data, answer Glean clarification questions, and optionally let Glean make reviewed or auto-applied workbook updates.\n\nThis reference is a general Excel-aware assistant. It does not require customer-created Glean agents for the core experience.\n\n## Screenshots\n\n### Sign in\n\n![Sign in with Glean](assets/screenshots/sign-in.svg)\n\n### Instructions \u0026 Clarifying Questions\n\n![Clarifying questions with selectable options in the Glean in Excel taskpane](assets/screenshots/clarifying-questions.png)\n\n### Example Result\n\n![Excel workbook with the Glean in Excel taskpane showing a generated operations metrics table](assets/screenshots/excel-result.png)\n\n## Features\n\n- Glean OAuth Authorization Code + PKCE.\n- Dynamic Client Registration by default; static OAuth client fallback.\n- Excel selected-range context and capped workbook fallback previews.\n- Context transparency with preview tables and cap notices.\n- Glean Chat API with persistent `chatId` context and `New chat` reset.\n- Long-running chat support through API Gateway REST response streaming.\n- Structured Glean clarification questions via `ARTIFACT_USER_QUESTIONS`.\n- Follow-up prompt chips when Glean returns `followUpPrompts`.\n- Edit mode control: `Ask before edits` or `Auto-apply edits`.\n- Preview-before-write for workbook updates.\n- Microsoft 365 sideloading and centralized deployment-ready manifest generation.\n\n## Architecture\n\n```mermaid\ngraph LR\n  Excel[\"Excel Taskpane\"] --\u003e|\"static assets\"| CloudFront[\"CloudFront + S3\"]\n  Excel --\u003e|\"OAuth helpers\"| HttpApi[\"API Gateway HTTP API\"]\n  Excel --\u003e|\"streaming chat\"| RestApi[\"API Gateway REST API\"]\n  HttpApi --\u003e|\"config and OAuth\"| Lambdas[\"Lambda Proxies\"]\n  RestApi --\u003e|\"SSE stream\"| ChatLambda[\"Chat Stream Lambda\"]\n  Lambdas --\u003e|\"DCR cache\"| Dynamo[\"DynamoDB Config\"]\n  ChatLambda --\u003e|\"Chat API\"| GleanChat[\"Glean Chat API\"]\n  Excel --\u003e|\"OAuth\"| GleanOAuth[\"Glean OAuth\"]\n```\n\nThe taskpane is hosted from a private S3 bucket through CloudFront. Most `/api/*` routes use API Gateway HTTP API and Lambda. `/api/chat` is routed separately to a Regional REST API with Lambda response streaming so long-running Glean answers can stay responsive without the 30-second HTTP API cap.\n\n## Workbook Context\n\nThe add-in does not send the entire workbook by default.\n\n- If the selected range has visible content, Glean receives a capped preview of the selected range.\n- If the selection appears empty and workbook fallback is enabled, Glean receives a capped preview of used ranges across the workbook.\n- The selected range preview is capped at `25 x 15`.\n- Workbook fallback is capped at `25 x 15` per sheet across up to 8 sheets.\n- Total context text is capped at 25,000 characters.\n- The UI shows when context is capped so users can select a smaller range when needed.\n\n## Glean Clarifying Questions\n\nGlean can return structured clarification prompts as `ARTIFACT_USER_QUESTIONS` messages. The add-in renders these as question cards with single-select or multi-select options and sends answers back through `artifactInfo.action.clarifyingQuestionResponses` on the same `chatId`.\n\nThis flow is isolated in `src/services/chat.ts` because it is legacy `/rest/api/v1/chat` artifact semantics.\n\n## Local Development\n\n### UI-only local dev\n\nUse this for fast taskpane UI iteration in a browser. It does not exercise Excel APIs or the AWS proxy routes.\n\n```bash\nnpm install\nnpm run dev\n```\n\nOpen `https://127.0.0.1:3000/taskpane.html`.\n\n### Excel sideload dev\n\nTo test Office.js behavior, load the add-in inside Excel. Office add-ins require HTTPS, so install trusted dev certificates first.\n\n```bash\nnpm run dev-certs\nDOMAIN_NAME=localhost:3000 GLEAN_INSTANCE=your-instance node deployment/scripts/generate-manifest.mjs\nnpm run sideload\n```\n\nFor local sideloading, create `public/config/runtime.json` before starting Vite:\n\n```json\n{\n  \"apiBaseUrl\": \"https://\u003cdeployed-domain\u003e/api\",\n  \"authMode\": \"sso\",\n  \"gleanInstance\": \"your-instance\",\n  \"oauthClientType\": \"dcr\",\n  \"oauthClientId\": \"\",\n  \"features\": {\n    \"writeBack\": true,\n    \"workbookPreview\": true,\n    \"fileUpload\": false,\n    \"customFunctions\": false\n  }\n}\n```\n\nThe frontend can run locally, but the backend `/api/*` routes are deployed as AWS Lambda/API Gateway resources. For full login and chat behavior, point `apiBaseUrl` at a deployed backend domain. A purely local backend proxy is not included in this reference.\n\n### Full end-to-end testing\n\nFor production-like testing, deploy to AWS and install the hosted manifest:\n\n```text\nhttps://\u003cyour-domain\u003e/manifest.xml\n```\n\n## Deploy to AWS\n\nCopy the environment file and fill in deployment-specific values:\n\n```bash\ncp deployment/config/prod.env.example deployment/config/prod.env\n```\n\nIf you need an ACM certificate and Route53 validation record for the configured domain:\n\n```bash\n./deployment/scripts/provision-certificate.sh prod\n```\n\nDeploy infrastructure:\n\n```bash\n./deployment/scripts/deploy-infrastructure.sh prod\n```\n\nCreate or update the Route53 alias:\n\n```bash\n./deployment/scripts/upsert-route53-alias.sh prod\n```\n\nDeploy the app and generated manifest:\n\n```bash\n./deployment/scripts/deploy-app.sh prod\n```\n\nInstall the hosted manifest from:\n\n```text\nhttps://\u003cyour-domain\u003e/manifest.xml\n```\n\n## Required Deployment Inputs\n\n- AWS profile/role with permission to deploy CloudFormation, S3, CloudFront, API Gateway, Lambda, DynamoDB, IAM, Route53, and ACM.\n- ACM certificate ARN in `us-east-1`, or permission to create one.\n- Route53 hosted zone for the add-in domain.\n- Glean instance slug.\n- OAuth mode:\n  - recommended: `OAUTH_CLIENT_TYPE=dcr`\n  - fallback: static OAuth client ID and secret\n- Admin email list for config/admin routes.\n\n## Validation\n\n```bash\nnpm run check\nnpm audit --omit=dev\n```\n\nManual QA checklist:\n\n- Sign in with Glean OAuth.\n- Ask about a selected range.\n- Verify capped context notices and preview table rendering.\n- Trigger a Glean clarification question and submit answers.\n- Ask for a small workbook update with `Ask before edits`.\n- Test `Auto-apply edits` on a safe range.\n- Click `New chat` and verify context resets.\n- Sign out and sign back in.\n\n## Security Posture\n\nUsers do not paste Glean API tokens. The add-in uses user-scoped OAuth and sends capped workbook context through a customer-owned backend proxy, which forwards requests to Glean. The UI shows what workbook context is being sampled, and workbook writes are approval-gated by default.\n\nSee `SECURITY.md` for reporting and deployment security notes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgleanwork%2Fsl-glean-microsoft-excel-addin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgleanwork%2Fsl-glean-microsoft-excel-addin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgleanwork%2Fsl-glean-microsoft-excel-addin/lists"}