The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
---
title: Calendar & Emails
sidebarTitle: Overview
description: Connect your email and calendar accounts to Twenty.
---
import { PageBanner } from "/snippets/page-banner.mdx"
## Connection Options
### Google Account (Gmail & Google Calendar)
1. Go to **Settings → Accounts**
2. Click **Add account**
3. Select **Continue with Google**
4. Authorize Twenty to access your Gmail and Google Calendar
5. Configure email sync settings (visibility, auto-creation) → click **Next**
6. Configure calendar sync settings (visibility, auto-creation) → click **Add Account**
7. Your emails and calendar events will start syncing automatically
### Microsoft Account (Outlook & Microsoft Calendar)
1. Go to **Settings → Accounts**
2. Click **Add account**
3. Select **Continue with Microsoft**
4. Authorize Twenty to access your Outlook and Microsoft Calendar
5. Configure email sync settings (visibility, auto-creation) → click **Next**
6. Configure calendar sync settings (visibility, auto-creation) → click **Add Account**
7. Your emails and calendar events will start syncing automatically
### IMAP/SMTP/CalDAV Setup (Other Providers)
For other email and calendar providers:
1. Go to **Settings → Accounts**
2. Configure IMAP settings to sync incoming email and SMTP settings to send email
3. Configure CalDAV settings for calendar
4. Test the connection
<Note>
**Self-hosting on an internal network**: By default, Twenty refuses outbound connections to private/internal IP addresses (SSRF protection). If your mail, calendar or identity provider server runs on a local/private IP (e.g. an on-premise server on a LAN), connections to it will be blocked. To allow them, list the hostnames or IP literals in the following environment variable on the server:
```
OUTBOUND_HTTP_ALLOWED_INTERNAL_HOSTS=mail.internal,keycloak,192.168.1.10
```
Entries are matched on the hostname only (`keycloak`, not `http://keycloak:8080/realms/…`), without wildcards. Every other outbound request (HTTP workflow actions, webhooks, SSO and IMAP/SMTP/CalDAV connections) stays protected, and even an allowed host can never reach the cloud metadata address range. Set it to `*` to disable the protection entirely, which is only appropriate on trusted, isolated networks. If you previously set `OUTBOUND_HTTP_SAFE_MODE_ENABLED=false`, remove it: while it is set, the protection stays fully off and the list is ignored.
</Note>
### Multiple Mailboxes
- **Unlimited Accounts**: Connect multiple email accounts per user
- **Sender Selection**: Choose which account sends each email you write in Twenty
- **Sync Settings**: Configure different settings per mailbox
<Warning>
Only true mailboxes can be connected (e.g., [email protected] with its own inbox). Email aliases that forward to another mailbox cannot be connected to Twenty.
</Warning>
## Email Configuration
### Message Visibility
Choose different levels of visibility for your emails:
- **Metadata Only**: Share only basic information (sender, recipient, date, time)
- **Subject and Metadata**: Share subject line along with metadata
- **All Email Content**: Share entire email content including attachments
### Contact Auto-Creation
- **Deactivated**: No automatic contact creation
- **For messages sent and received**: Create contacts for all external email interactions
- **For messages sent only**: Create contacts only for emails you send
- **Note**: By default, internal emails (where all participants share your domain) are not synced to protect privacy
<Note>When enabled, contacts are automatically linked to their Company records based on their email domain. If the company doesn't exist yet, Twenty creates it for you.</Note>
<Note>
**Syncing internal emails**: The "internal emails not synced" behavior is the default, but it can be turned off:
1. Go to **Settings → Communication**
2. Enable the **Sync Internal Emails** toggle to include emails where all participants share the same domain
This is a workspace-wide setting (useful for universities or shared-domain organizations).
</Note>
### Control which emails get synced with Message Folder Selection
Control which email folders sync with Twenty:
1. Go to **Settings → Accounts** and select your connected email account
2. Choose which folders to sync:
- **Inbox**: Primary incoming emails
- **Sent**: Outgoing emails you've sent
- **Custom Folders**: Any specific folders you want to include
- **Exclude Folders**: Skip folders like Spam, Trash, or personal folders
This gives you precise control over which emails appear in your CRM without syncing everything.
**What Gets Synced:**
- **External Emails**: All emails with external contacts from selected folders
- **Internal Emails**: Not synced by default (same domain emails remain private). Turn on **Sync Internal Emails** under **Settings → Communication** to include them workspace-wide.
- **Attachments**: Coming in H1 2026
**Note**: We don't provide a CC email address for selective syncing. Instead, use the Message Folder feature above to achieve the same level of control over which emails sync with Twenty.
## Calendar Configuration
### Event Visibility
Choose what will be visible to other users in your workspace:
- **Everything**: The whole event's details will be shared with your team
- **Metadata**: Only date and participants will be shared with your team
### Contact Auto-Creation for Meetings
- **Yes**: Automatically create contacts for meeting participants not in your CRM
- **No**: Only link meetings to existing contacts
<Note>When enabled, contacts are automatically linked to their Company records based on their email domain. If the company doesn't exist yet, Twenty creates it for you.</Note>
### Control which events get synced
- **Meeting Import**: Automatically import calendar events
- **Contact Linking**: Link meetings to People and Company records
**What Gets Synced:**
- **Meetings**: Calendar events with external participants
- **Contact Linking**: Events automatically linked to CRM records
- **Team Events**: Shared calendar visibility
## Sync Frequency
**Updates every 5 minutes**: Both email and calendar data sync automatically every 5 minutes after the initial import.
<Note>
**Initial sync timing**: Calendar sync completes quickly (usually within minutes), while email sync takes longer for large mailboxes. Twenty imports emails at approximately **400 messages per minute** (limited by Gmail API rate limiting), so a mailbox with 10,000 emails takes about 25 minutes. Don't worry if you see contacts from calendar events appearing before your email contacts; this is normal behavior.
</Note>
## Next Steps
- [Mailbox capabilities](/user-guide/calendar-emails/capabilities/mailbox)
- [Troubleshoot missing emails](/user-guide/calendar-emails/how-tos/i-dont-see-emails-on-records)
<PageBanner illustration="calendar-emails" />