Skip to content

The open alternative to Salesforce, designed for AI.

Update messaging and calendar doc (#8869)

Raphaël Bosi078e23154a26
diff --git a/packages/twenty-website/src/content/developers/constants/DocsIndex.ts b/packages/twenty-website/src/content/developers/constants/DocsIndex.ts
index 6d181710dee..dbdcfdcf865 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 f31f7edeac8..695fb35dbb8 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 6f8a0933cc6..806f3071130 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 7ba1242d5e2..52dce83f387 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=<client-id>`
+- `AUTH_GOOGLE_CLIENT_SECRET=<client-secret>`
+- `AUTH_GOOGLE_CALLBACK_URL=https://<your-domain>/auth/google/redirect` if you want to use Google SSO
+- `AUTH_GOOGLE_APIS_CALLBACK_URL=https://<your-domain>/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://<your-domain>/auth/google/redirect` if you want to use Google SSO
+- `https://<your-domain>/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