From 078e23154a26497ad937d4bbb2124a913bf0859a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Bosi?= <71827178+bosiraphael@users.noreply.github.com> Date: Wed, 4 Dec 2024 17:30:50 +0100 Subject: [PATCH] Update messaging and calendar doc (#8869) Update messaging and calendar doc --- .../content/developers/constants/DocsIndex.ts | 2 +- .../src/content/developers/local-setup.mdx | 2 +- .../self-hosting/docker-compose.mdx | 2 +- .../{self-hosting-var.mdx => setup.mdx} | 44 ++++++++++++++++++- 4 files changed, 45 insertions(+), 5 deletions(-) rename packages/twenty-website/src/content/developers/self-hosting/{self-hosting-var.mdx => setup.mdx} (85%) diff --git a/packages/twenty-website/src/content/developers/constants/DocsIndex.ts b/packages/twenty-website/src/content/developers/constants/DocsIndex.ts index 6d181710dee1..dbdcfdcf8652 100644 --- a/packages/twenty-website/src/content/developers/constants/DocsIndex.ts +++ b/packages/twenty-website/src/content/developers/constants/DocsIndex.ts @@ -5,7 +5,7 @@ export const DOCS_INDEX = { { fileName: 'self-hosting' }, { fileName: 'docker-compose' }, { fileName: 'upgrade-guide' }, - { fileName: 'self-hosting-var' }, + { fileName: 'setup' }, { fileName: 'cloud-providers' }, { fileName: 'troubleshooting' }, ], diff --git a/packages/twenty-website/src/content/developers/local-setup.mdx b/packages/twenty-website/src/content/developers/local-setup.mdx index f31f7edeac84..695fb35dbb8f 100644 --- a/packages/twenty-website/src/content/developers/local-setup.mdx +++ b/packages/twenty-website/src/content/developers/local-setup.mdx @@ -194,7 +194,7 @@ If you need a Client GUI, we recommend [redis insight](https://redis.io/insight/ ## Step 5: Setup environment variables -Use environment variables or `.env` files to configure your project. More info [here](https://twenty.com/developers/section/self-hosting/self-hosting-var) +Use environment variables or `.env` files to configure your project. More info [here](https://twenty.com/developers/section/self-hosting/setup) Copy the `.env.example` files in `/front` and `/server`: ```bash diff --git a/packages/twenty-website/src/content/developers/self-hosting/docker-compose.mdx b/packages/twenty-website/src/content/developers/self-hosting/docker-compose.mdx index 6f8a0933cc6f..806f3071130b 100644 --- a/packages/twenty-website/src/content/developers/self-hosting/docker-compose.mdx +++ b/packages/twenty-website/src/content/developers/self-hosting/docker-compose.mdx @@ -14,7 +14,7 @@ This guide provides step-by-step instructions to install and configure the Twent **Important:** Only modify settings explicitly mentioned in this guide. Altering other configurations may lead to issues. -See docs [Setup Environment Variables](https://twenty.com/developers/section/self-hosting/self-hosting-var) for advanced configuration. +See docs [Setup Environment Variables](https://twenty.com/developers/section/self-hosting/setup) for advanced configuration. ## System Requirements diff --git a/packages/twenty-website/src/content/developers/self-hosting/self-hosting-var.mdx b/packages/twenty-website/src/content/developers/self-hosting/setup.mdx similarity index 85% rename from packages/twenty-website/src/content/developers/self-hosting/self-hosting-var.mdx rename to packages/twenty-website/src/content/developers/self-hosting/setup.mdx index 7ba1242d5e2e..52dce83f387f 100644 --- a/packages/twenty-website/src/content/developers/self-hosting/self-hosting-var.mdx +++ b/packages/twenty-website/src/content/developers/self-hosting/setup.mdx @@ -1,5 +1,5 @@ --- -title: Environment Variables +title: Setup icon: TbServer image: /images/user-guide/table-views/table.png --- @@ -8,7 +8,47 @@ import OptionTable from '@site/src/theme/OptionTable' # Setup Messaging & Calendar sync -Twenty offers integrations with Gmail and Google Calendar. To enable these features, you need to connect to register the following recurring jobs: +Twenty offers integrations with Gmail and Google Calendar. + +## For Gmail and Google Calendar + +### Create a project in Google Cloud + +You will need to create a project in Google Cloud and get the credentials. + +Then you can set the following environment variables: + +- `MESSAGING_PROVIDER_GMAIL_ENABLED=true` +- `CALENDAR_PROVIDER_GOOGLE_ENABLED=true` +- `AUTH_GOOGLE_CLIENT_ID=` +- `AUTH_GOOGLE_CLIENT_SECRET=` +- `AUTH_GOOGLE_CALLBACK_URL=https:///auth/google/redirect` if you want to use Google SSO +- `AUTH_GOOGLE_APIS_CALLBACK_URL=https:///auth/google-apis/get-access-token` + +### Enable APIs + +On Google Cloud Console, go to [APIs & Services](https://console.cloud.google.com/apis/library/) and enable the following APIs: + +- [Gmail API](https://console.cloud.google.com/apis/library/gmail.googleapis.com) +- [Google Calendar API](https://console.cloud.google.com/apis/library/calendar-json.googleapis.com) +- [People API](https://console.cloud.google.com/apis/library/people.googleapis.com) + +### Authorized redirect URIs + +Under [Credentials](https://console.cloud.google.com/apis/credentials), in OAuth 2.0 Client IDs, you need to add the following redirect URIs to your project: + +- `https:///auth/google/redirect` if you want to use Google SSO +- `https:///auth/google-apis/get-access-token` + +### If your app is in test mode + +If your app is in test mode, you will need to add test users to your project. + +Under [OAuth consent screen](https://console.cloud.google.com/apis/credentials/consent), add your test users to the "Test users" section. + +### Start the cron jobs + +Register the following recurring jobs: ``` # from your worker container yarn command:prod cron:messaging:messages-import