# Set up a connection As workspace owner, enable the provider under **Connections**. In the app’s **Connections** tab, choose what the app can use. Deploy the app after configuring access. ## Google Drive, Calendar and Docs 1. Open **Connections → Google Drive**. Register the **Redirect URLs** in your Google Cloud web OAuth client. For file selection, enable the Drive and Picker APIs. Restrict the Picker key to those APIs and allow the management site and `https://docs.google.com/*` as referrers. 2. For calendars and document drafts, also enable the Calendar API. Add `openid`, `email`, `https://www.googleapis.com/auth/drive.file`, `https://www.googleapis.com/auth/calendar.calendarlist.readonly` and `https://www.googleapis.com/auth/calendar.events.readonly` to the consent screen. 3. Enter the **Client ID**, **Client secret**, **Picker API key** and **Project number** from the same project. Choose **Save setup**, then enable Google. The setup form currently supports initial registration only. In the app, choose **Shared file** to connect an account and approve one file, or enable personal access so each person can pick their own. For calendars or drafts, enable **Calendars and draft Docs**. Each person chooses their calendars and reviews each new document before it is created. [Calendar and Docs requests](connector-agent.md#calendars-and-document-drafts). ## Microsoft OneDrive Enable Microsoft under **Connections**. If the dashboard says installation setup is needed, ask the operator to configure Microsoft sign-in. In the app, use **Shared file** to connect your account and approve one file, or enable personal access so each person can choose their own. Only the connected person can browse their drive. ## Slack For personal channel reads, enable **Personal access** under **App → Connections → Slack**. Each person signs in to Slack and chooses channels. Personal reads require the installation’s Slack sign-in configuration. For a shared bot: 1. Create a Slack bot and install it in your Slack workspace. Give it these scopes: - To send messages: `chat:write` and `channels:read`, plus `groups:read` for private channels. - To read messages: `channels:history`, or `groups:history` for private channels. A bot that only reads doesn't need `chat:write`. 2. Invite the bot to each channel it should use, and copy those channel IDs. 3. Open **Connections → Slack**, then add a Slack connection. Enter a name, bot token, channel IDs, permissions and allowed apps. 4. Choose **Test connection**, then **Save connection**, and turn Slack on. The test checks the bot's scopes and that it is in each channel. It doesn't send or read any messages. Under **App → Connections → Slack → Configure**, choose the bot, channels and operations. Save and deploy. [Slack request format](connector-agent.md#slack). If the bot token or scopes change, configure each affected app again and redeploy. Removing the connection stops new sends. Messages already sent stay in Slack. ## External PostgreSQL 1. In your database, create a **dedicated read-only login** for Smolcloud. Grant it SELECT on the tables and views apps need and USAGE on their schemas. Check which functions and views it can run too, since those can expose more data. 2. Open **Connections → External PostgreSQL**, then add a database connection. Enter the name, hostname, database and login, then select allowed apps. 3. The database must be reachable from the internet over TLS, with a certificate that matches its hostname. If your company issues its own certificates, add its CA under **Advanced**. 4. Choose **Test connection**, then **Save connection**, and turn PostgreSQL on. In your database's firewall, allow only your workspace's outbound address. Under **App → Connections → PostgreSQL → Configure**, choose the connection and save one SELECT query. Qualify table names and use `$1`, `$2` and so on for values. ```sql SELECT customer_id, name FROM reporting.customers WHERE region = $1 ``` Deploy the app. Its backend sends only the parameter values. Everyone shares the same database login, so the app decides who may see the results. If the database address or login changes, the owner adds a new connection, tests it, switches each app to it and removes the old one. Removing a connection never touches the data in your database. For a database Smolcloud hosts for you, see [databases and files](data-services.md). ## Limits A workspace can save up to 20 Slack bot connections and 20 external PostgreSQL connections. Each can be shared with up to 100 apps. A bot connection supports up to eight channels. See [request and response limits](connector-agent.md#limits).