Set up a connection
Enable a provider in your workspace and connect it to an app.
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
- 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. - 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.readonlyandhttps://www.googleapis.com/auth/calendar.events.readonlyto the consent screen. - 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.
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:
- Create a Slack bot and install it in your Slack workspace. Give it these scopes:
- To send messages:
chat:writeandchannels:read, plusgroups:readfor private channels. - To read messages:
channels:history, orgroups:historyfor private channels. A bot that only reads doesn't needchat:write.
- To send messages:
- Invite the bot to each channel it should use, and copy those channel IDs.
- Open Connections → Slack, then add a Slack connection. Enter a name, bot token, channel IDs, permissions and allowed apps.
- 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.
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
- 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.
- Open Connections → External PostgreSQL, then add a database connection. Enter the name, hostname, database and login, then select allowed apps.
- 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.
- 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.
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.
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.