The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Granola 8/8: Add Granola listing copy and setup documentation (#25577)
nitin22570c0ef26b
diff --git a/packages/twenty-apps/public/granola/CHANGELOG.md b/packages/twenty-apps/public/granola/CHANGELOG.mdindex 0e3d7f26ac8..2bf7a20a2ec 100644--- a/packages/twenty-apps/public/granola/CHANGELOG.md+++ b/packages/twenty-apps/public/granola/CHANGELOG.md@@ -2,4 +2,9 @@## 0.1.0-- Initial Granola application scaffold.+- Connect a workspace or personal Granola API key; the key type is detected and the signed webhook is registered automatically.+- Synchronize shared summaries and speaker transcripts into Call Recordings with conservative calendar matching.+- Import 31 days automatically, request up to 3650 days manually, and catch up daily.+- Scope sync to selected folders and descendants.+- Expose note sync and listing to workflows and AI, plus folder listing to AI.+- Preserve deleted Twenty records and exclude private scratchpad notes.diff --git a/packages/twenty-apps/public/granola/README.md b/packages/twenty-apps/public/granola/README.mdindex 75bdb7a9274..a7077ea5e5c 100644--- a/packages/twenty-apps/public/granola/README.md+++ b/packages/twenty-apps/public/granola/README.md@@ -1,9 +1,33 @@-# Granola for Twenty+# Granola-Implementation in progress. Sync meeting transcripts and shared summaries into Call Recordings, import history, and use notes in workflows and AI. Requires Granola Business or Enterprise and an API key. Private notes are excluded.+**Your Granola meeting summaries and transcripts, right inside your CRM.**-## Limitations+## ✨ What you get-- One Granola API key serves the whole Twenty workspace. Members cannot connect their own Granola accounts, so every recording comes from the notes that key can see. Use a workspace key to cover a team.+- **Granola summaries and speaker transcripts saved to Call Recordings**+- **Calendar links for clear matches**+- **New and edited notes synced as they happen**+- **Your last 31 days imported when you connect, and up to 3,650 days on demand**+- **Every folder, or up to 100 you pick**+- **Built for AI & automation**-When a Granola note matches multiple calendar event copies, the recording is imported without a calendar link because the app cannot determine which copy belongs to the note's owner.+## 💳 Billing++**Free to run**: no per-seat, per-note or per-import charge. AI actions use AI+credits on the model's token usage.++## 📌 Heads up++- **Needs Granola Business or Enterprise.** Create an API key in Granola under+ **Settings → Connectors → API keys** and paste it in the app's **Settings**+ tab.+- **One key syncs for the whole workspace.** Every member with access to Call+ Recordings sees what that key can reach. Use a workspace key to cover your+ team; a personal key syncs only what its owner can see.+- **Summaries and transcripts only.** Granola shares no audio or video, and+ private scratchpad notes are never imported.+- **Deletes don't sync.** Deleting a note in Granola keeps its Twenty recording,+ and a recording you delete in Twenty stays deleted.++**Self-hosting?** Live sync needs a public HTTPS server URL: see the+[setup guide](https://github.com/twentyhq/twenty/blob/main/packages/twenty-apps/public/granola/SETUP.md).diff --git a/packages/twenty-apps/public/granola/SETUP.md b/packages/twenty-apps/public/granola/SETUP.mdindex cd5772ff4f3..b34c452e0c8 100644--- a/packages/twenty-apps/public/granola/SETUP.md+++ b/packages/twenty-apps/public/granola/SETUP.md@@ -1,3 +1,63 @@-# Setup+# Set up Granola-Implementation in progress. Create a workspace API key in Granola Settings → Connectors → Workspace API keys. Install the app and save the key in its settings. Registration, history import, and folder selection follow in the stack.+1. In a Granola Business or Enterprise workspace, create an API key from **Settings → Connectors → API keys**. One key serves the whole Twenty workspace; members cannot connect their own Granola accounts yet. A workspace key reaches workspace-visible notes and spaces with API access enabled. A personal key also reaches its owner's notes and notes shared with them.+2. Install Granola in Twenty, then open **Settings → Applications → Granola → Settings**. You need application-management permission.+3. Paste the key and click **Connect**. The key is saved as a secret application variable. The API key card shows **Connecting** while the app checks the key, detects its type, registers a signed webhook, and queues the last 31 days of notes, then **Connected**.+4. If setup does not finish, the card shows why. **Invalid key** offers **Use another key**, which removes the saved key. **Unreachable** and **Setup incomplete** offer **Retry**. If the key itself cannot be saved, an error appears under the key field.+5. To restrict sync, choose **Some folders** and pick up to 100 folders. A picked folder includes its subfolders, and every click saves. Existing records outside a new filter are retained.+6. Use **Import history** for a larger window, from 1 to 3650 days. Notes appear gradually in Call Recordings. Repeating an import updates the same records.+7. To change the key, open **Danger zone**, click **Disconnect** and confirm, then paste the new key and click **Connect**. Disconnect deletes the Granola webhook with the old key first. If Granola refuses, the app only logs it, so check Granola for a leftover endpoint.++## Paused sync++Granola drops events while an endpoint is paused, and the app never re-enables it on its own. The card then shows **Paused**; click **Resume** to re-enable the endpoint, or recreate it if it was deleted. The daily catch-up imports notes updated in the last two days even while paused, so run a larger **Import history** after a longer outage.++## Limits++- Transcripts are fetched in up to 1,000 pages within 800 seconds. Notes beyond either limit are skipped without saving a partial transcript.+- Notes without a transcript keep their summary and show no transcript in Twenty.+- A recording links to a calendar event only when Granola's calendar event, or its invitees and start time, match exactly one Twenty event.++## Local development++```sh+yarn install --immutable+yarn lint+yarn typecheck+yarn test:unit+yarn twenty dev:build+```++For installation tests, start an isolated Twenty test instance with `yarn twenty docker:start --test`, then run `TWENTY_API_URL=http://localhost:2021 yarn test`. The integration configuration defaults to the scaffold's local dev instance at port 2020; the `--test` instance listens on 2021, hence the override above. Override `TWENTY_API_URL` and `TWENTY_API_KEY` only with credentials for an isolated test workspace: setup installs and teardown uninstalls this app.++The deployed function-execution tests need an authenticated QA user’s access token in `TWENTY_API_KEY`. The scaffold’s default API key can install the app and inspect its schema, but cannot authorize user-only function execution.++For real webhook QA, expose your Twenty server through a public HTTPS tunnel and configure its advertised server URL accordingly. Registration derives the delivery URL from the runtime's `TWENTY_API_URL`; the app rejects HTTP URLs. Granola requires the resulting HTTPS endpoint to be publicly reachable. A browser-only tunnel does not expose the webhook server.++## API import++Live sync must be set up first. Use a Twenty bearer token belonging to a user with application-management permission:++```sh+curl --request POST "$TWENTY_API_URL/s/granola/backfill" \+ --header "Authorization: Bearer $TWENTY_API_KEY" \+ --header 'Content-Type: application/json' \+ --data '{"days":365}'+```++## Verify before release++- Connect a real workspace key, then a personal key, and verify the detected scopes and readable failures for invalid keys or unavailable plans.+- Generate a meeting, edit its summary, and confirm one Call Recording is updated with transcript and shared summary. Confirm private notes never appear.+- Deliver the same signed event twice; confirm the deterministic recording ID is unchanged. Check unsigned and expired deliveries are rejected, and that a fresh delivery still verifies after a queue delay.+- Pick a parent folder, confirm a descendant note syncs and an outside note does not, then switch back to **Everything**.+- Run initial and manual history imports, including a deleted Twenty recording. Confirm it stays deleted.+- Disable the endpoint in Granola, exercise daily catch-up, and confirm updated notes are still imported while the endpoint stays paused. Confirm **Resume** re-enables it.+- Rotate the key and uninstall. Verify endpoint cleanup, or remove endpoints the replacement key cannot access.++## Provider references++- [Granola OpenAPI](https://docs.granola.ai/api-reference/openapi.json)+- [Granola webhooks](https://docs.granola.ai/webhooks)+- [Granola API keys](https://docs.granola.ai/help-center/sharing/integrations/granola-api)+- [Twenty publishing](https://docs.twenty.com/developers/extend/apps/operations/publishing)diff --git a/packages/twenty-apps/public/granola/src/application-config.ts b/packages/twenty-apps/public/granola/src/application-config.tsindex 6a7b4a9defc..4ee80c5bc5a 100644--- a/packages/twenty-apps/public/granola/src/application-config.ts+++ b/packages/twenty-apps/public/granola/src/application-config.ts@@ -14,6 +14,10 @@ export default defineApplication({logo: 'public/logo.png',author: 'Twenty',category: 'Productivity',+ websiteUrl: 'https://www.granola.ai',+ termsUrl: 'https://www.twenty.com/terms',+ emailSupport: '[email protected]',+ issueReportUrl: 'https://github.com/twentyhq/twenty/issues',applicationVariables: {[GRANOLA_API_KEY_ENV_VAR_NAME]: {universalIdentifier: GRANOLA_API_KEY_VARIABLE_UNIVERSAL_IDENTIFIER,diff --git a/packages/twenty-docs/user-guide/billing/capabilities/credits.mdx b/packages/twenty-docs/user-guide/billing/capabilities/credits.mdxindex 21339b167fe..0d152128c1d 100644--- a/packages/twenty-docs/user-guide/billing/capabilities/credits.mdx+++ b/packages/twenty-docs/user-guide/billing/capabilities/credits.mdx@@ -27,7 +27,7 @@ For most teams, standard automations are effectively free — you'll only make a</Note><Note>-Not every app charges for its runs. Call Recorder, Last Contact and Fathom react to every email, calendar event and recording imported into your workspace, and Slack runs on every Slack event its bot subscribes to, so their logic function runs are free. You are still charged for the metered work they do, such as recorded call minutes or the AI credits behind Slack assistant answers.+Not every app charges for its runs. Call Recorder, Last Contact, Fathom and Granola react to every email, calendar event and recording imported into your workspace, and Slack runs on every Slack event its bot subscribes to, so their logic function runs are free. You are still charged for the metered work they do, such as recorded call minutes or the AI credits behind Slack assistant answers.</Note>## How logic function runs are metereddiff --git a/packages/twenty-server/src/engine/core-modules/application/application-marketplace/constants/marketplace-billing-exempt-applications.constant.ts b/packages/twenty-server/src/engine/core-modules/application/application-marketplace/constants/marketplace-billing-exempt-applications.constant.tsindex 232a3f0fa1a..cca50fc3e17 100644--- a/packages/twenty-server/src/engine/core-modules/application/application-marketplace/constants/marketplace-billing-exempt-applications.constant.ts+++ b/packages/twenty-server/src/engine/core-modules/application/application-marketplace/constants/marketplace-billing-exempt-applications.constant.ts@@ -7,4 +7,5 @@ export const MARKETPLACE_BILLING_EXEMPT_UNIVERSAL_IDENTIFIERS: string[] = [TWENTY_PUBLIC_APP_UNIVERSAL_IDENTIFIERS.LAST_CONTACT,TWENTY_PUBLIC_APP_UNIVERSAL_IDENTIFIERS.SLACK,TWENTY_PUBLIC_APP_UNIVERSAL_IDENTIFIERS.FATHOM,+ TWENTY_PUBLIC_APP_UNIVERSAL_IDENTIFIERS.GRANOLA,];diff --git a/packages/twenty-server/src/engine/core-modules/application/application-marketplace/constants/twenty-public-app-universal-identifiers.constant.ts b/packages/twenty-server/src/engine/core-modules/application/application-marketplace/constants/twenty-public-app-universal-identifiers.constant.tsindex 34a438c68e9..a483bc25634 100644--- a/packages/twenty-server/src/engine/core-modules/application/application-marketplace/constants/twenty-public-app-universal-identifiers.constant.ts+++ b/packages/twenty-server/src/engine/core-modules/application/application-marketplace/constants/twenty-public-app-universal-identifiers.constant.ts@@ -3,6 +3,7 @@ export const TWENTY_PUBLIC_APP_UNIVERSAL_IDENTIFIERS = {CALL_RECORDER: '8da4b8b5-5edf-4880-b51f-ab6e679ec617',EXA: '2b7f4a2e-9c4b-4a11-b63c-2e5e7d3f5a9a',FATHOM: 'c5fb24b3-15b0-48fb-a9b5-f182ba231e6c',+ GRANOLA: 'ffcc3979-0ee6-4d7d-912b-c12997d9f0f4',LAST_CONTACT: '66a504cc-0a75-410e-a43f-cdeae1db1522',PEOPLE_DATA_LABS: '4a1178c1-3535-4a47-b592-231d3216b36f',SLACK: 'a8c47f21-3b9e-4d2a-8f61-9c0e7d4a2b51',diff --git a/packages/twenty-server/src/engine/core-modules/application/application-marketplace/utils/__tests__/is-billing-exempt-application.util.spec.ts b/packages/twenty-server/src/engine/core-modules/application/application-marketplace/utils/__tests__/is-billing-exempt-application.util.spec.tsindex 140c8f72221..0d96c655ac5 100644--- a/packages/twenty-server/src/engine/core-modules/application/application-marketplace/utils/__tests__/is-billing-exempt-application.util.spec.ts+++ b/packages/twenty-server/src/engine/core-modules/application/application-marketplace/utils/__tests__/is-billing-exempt-application.util.spec.ts@@ -6,6 +6,7 @@ describe('isBillingExemptApplication', () => {'66a504cc-0a75-410e-a43f-cdeae1db1522','a8c47f21-3b9e-4d2a-8f61-9c0e7d4a2b51','c5fb24b3-15b0-48fb-a9b5-f182ba231e6c',+ 'ffcc3979-0ee6-4d7d-912b-c12997d9f0f4',])('should return true for billing-exempt app %s', (universalIdentifier) => {expect(isBillingExemptApplication(universalIdentifier)).toBe(true);});