New here? Start with the OAuth setup overview for the shape and prerequisites that apply to every provider.
Before you begin
You’ll need:- Organization admin access in Ravenna.
- Access to the Google Cloud Console.
- A rough idea of which Google APIs your function will call (Calendar, Gmail, Drive, etc.) so you know which scopes to ask for.
1. Create the OAuth client in Google Cloud
Open a project
Go to the Google Cloud Console and either create a new project or pick an existing one. The project is where your OAuth client and consent screen live.
Enable the APIs you need
Go to APIs & Services → Library and enable each Google API your function will call. For example, Google Calendar API, Gmail API, or Google Drive API. If you don’t enable an API, calls to it will fail at runtime even if the OAuth flow succeeds.
Configure the OAuth consent screen
Go to APIs & Services → OAuth consent screen.
- Choose Internal if every user will be in your Google Workspace. Choose External if any user might sign in from outside it.
- Fill in the app name, support email, and developer contact email.
- Add the scopes your function will need. Start with the smallest set and add more as you build. For example:
https://www.googleapis.com/auth/calendar.readonlyfor read-only calendar access.https://www.googleapis.com/auth/gmail.sendto send email as the user.
- For External apps, add any test users who will connect during development.
If your Ravenna deployment uses a custom domain, replace
app.ravenna.ai with your own domain in the redirect URI. Your Ravenna team can confirm the exact value.2. Register the provider in Ravenna
Open Settings → OAuth Providers
In Ravenna, go to Settings → OAuth Providers and click Add Provider.
General tab
Fill in:
- Name. For example, “Google Workspace.”
- Slug. A short identifier used in generated code (for example,
google). - Description and Logo. Optional but helpful.
- Base URL. The root of the API. For Google APIs this is
https://www.googleapis.com. - Docs URL. The API reference you want Foundry to research. For Calendar,
https://developers.google.com/calendar/api/v3/referenceworks well.
OAuth tab
Fill in the details from Google:
- Authorization URL.
https://accounts.google.com/o/oauth2/v2/auth - Token URL.
https://oauth2.googleapis.com/token - Scopes. Paste the same scopes you added to the Google consent screen, space-separated.
- Client ID and Client secret. Paste the values Google generated.
- Authorization URL parameters:
3. Connect an account
Each user who runs a function needs to connect their own Google account once:- Go to Settings → Integrations and find the provider you registered in the Custom category.
- Click Connect and complete the standard Google sign-in flow.
- Tokens refresh automatically after that; the user doesn’t need to reconnect unless they revoke access.
4. Build a function on top
Open Foundry, click New Function, and connect the new Google provider in the function’s Integrations tab. Pick which connected Google account the function should run as. Then describe what you want it to do:- “List my next five calendar events and return their title, start time, and meeting link.”
- “Find all unread emails from
@acme.comin the last 24 hours and return the subject and snippet.”
Full build → test → refine → publish loop: Building functions.