OAuth Connectors Overview
JsWorkflows lets you connect external services using OAuth 2.0. Once connected, your workflows can call those services’ APIs without managing tokens — JsWorkflows handles token storage, refresh, and expiry automatically.
Connecting a service
Section titled “Connecting a service”- Go to OAuth Connections in the app dashboard.
- Click Add Connection.
- Choose the service and the scopes (permissions) your workflows need.
- Complete the OAuth flow in the provider’s login screen.
- Give the connection a handle — a short name you use in your workflow code.
Using a connection in a workflow
Section titled “Using a connection in a workflow”Call api.getOAuthToken(handle) to get a valid access token, then use it with the global fetch(). The token is refreshed automatically if it has expired:
const { token, error } = await api.getOAuthToken('my-google');if (error) { api.log('OAuth error:', error); return; }
const response = await fetch('https://www.googleapis.com/drive/v3/files', { headers: { 'Authorization': `Bearer ${token}` },});Platform-managed connections
Section titled “Platform-managed connections”For the following services, JsWorkflows manages the OAuth app credentials — you only need to log in, no Client ID or Client Secret required:
- Google (Sheets, Drive, Gmail, Calendar, Docs)
- Slack
- Microsoft (Outlook, OneDrive, Calendar)
- Dropbox
- GitHub
- Mailchimp
- HubSpot
- Notion
Supported services
Section titled “Supported services”| Service | Doc |
|---|---|
| Google OAuth | |
| Slack | Slack OAuth |
| Microsoft | Microsoft OAuth |
| HubSpot | HubSpot OAuth |
| GitHub | GitHub OAuth |
| Dropbox | Dropbox OAuth |
| Mailchimp | Mailchimp OAuth |
| Notion | Notion OAuth |
| Custom (any OAuth 2.0 provider) | Custom OAuth |