Skip to content

Feature/Add teams, gmail, outlook tools #4577

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jun 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions packages/components/credentials/GmailOAuth2.credential.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import { INodeParams, INodeCredential } from '../src/Interface'
const scopes = [
'https://www.googleapis.com/auth/gmail.readonly',
'https://www.googleapis.com/auth/gmail.compose',
'https://www.googleapis.com/auth/gmail.modify',
'https://www.googleapis.com/auth/gmail.labels'
]

class GmailOAuth2 implements INodeCredential {
label: string
name: string
version: number
inputs: INodeParams[]
description: string

constructor() {
this.label = 'Gmail OAuth2'
this.name = 'gmailOAuth2'
this.version = 1.0
this.description =
'You can find the setup instructions <a target="_blank" href="https://docs.flowiseai.com/integrations/langchain/tools/gmail">here</a>'
this.inputs = [
{
label: 'Authorization URL',
name: 'authorizationUrl',
type: 'string',
default: 'https://accounts.google.com/o/oauth2/v2/auth'
},
{
label: 'Access Token URL',
name: 'accessTokenUrl',
type: 'string',
default: 'https://oauth2.googleapis.com/token'
},
{
label: 'Client ID',
name: 'clientId',
type: 'string'
},
{
label: 'Client Secret',
name: 'clientSecret',
type: 'password'
},
{
label: 'Additional Parameters',
name: 'additionalParameters',
type: 'string',
default: 'access_type=offline&prompt=consent',
hidden: true
},
{
label: 'Scope',
name: 'scope',
type: 'string',
hidden: true,
default: scopes.join(' ')
}
]
}
}

module.exports = { credClass: GmailOAuth2 }
58 changes: 58 additions & 0 deletions packages/components/credentials/GoogleCalendarOAuth2.credential.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import { INodeParams, INodeCredential } from '../src/Interface'
const scopes = ['https://www.googleapis.com/auth/calendar', 'https://www.googleapis.com/auth/calendar.events']

class GoogleCalendarOAuth2 implements INodeCredential {
label: string
name: string
version: number
inputs: INodeParams[]
description: string

constructor() {
this.label = 'Google Calendar OAuth2'
this.name = 'googleCalendarOAuth2'
this.version = 1.0
this.description =
'You can find the setup instructions <a target="_blank" href="https://docs.flowiseai.com/integrations/langchain/tools/google-calendar">here</a>'
this.inputs = [
{
label: 'Authorization URL',
name: 'authorizationUrl',
type: 'string',
default: 'https://accounts.google.com/o/oauth2/v2/auth'
},
{
label: 'Access Token URL',
name: 'accessTokenUrl',
type: 'string',
default: 'https://oauth2.googleapis.com/token'
},
{
label: 'Client ID',
name: 'clientId',
type: 'string'
},
{
label: 'Client Secret',
name: 'clientSecret',
type: 'password'
},
{
label: 'Additional Parameters',
name: 'additionalParameters',
type: 'string',
default: 'access_type=offline&prompt=consent',
hidden: true
},
{
label: 'Scope',
name: 'scope',
type: 'string',
hidden: true,
default: scopes.join(' ')
}
]
}
}

module.exports = { credClass: GoogleCalendarOAuth2 }
62 changes: 62 additions & 0 deletions packages/components/credentials/GoogleDriveOAuth2.credential.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import { INodeParams, INodeCredential } from '../src/Interface'
const scopes = [
'https://www.googleapis.com/auth/drive',
'https://www.googleapis.com/auth/drive.appdata',
'https://www.googleapis.com/auth/drive.photos.readonly'
]

class GoogleDriveOAuth2 implements INodeCredential {
label: string
name: string
version: number
inputs: INodeParams[]
description: string

constructor() {
this.label = 'Google Drive OAuth2'
this.name = 'googleDriveOAuth2'
this.version = 1.0
this.description =
'You can find the setup instructions <a target="_blank" href="https://docs.flowiseai.com/integrations/langchain/tools/google-drive">here</a>'
this.inputs = [
{
label: 'Authorization URL',
name: 'authorizationUrl',
type: 'string',
default: 'https://accounts.google.com/o/oauth2/v2/auth'
},
{
label: 'Access Token URL',
name: 'accessTokenUrl',
type: 'string',
default: 'https://oauth2.googleapis.com/token'
},
{
label: 'Client ID',
name: 'clientId',
type: 'string'
},
{
label: 'Client Secret',
name: 'clientSecret',
type: 'password'
},
{
label: 'Additional Parameters',
name: 'additionalParameters',
type: 'string',
default: 'access_type=offline&prompt=consent',
hidden: true
},
{
label: 'Scope',
name: 'scope',
type: 'string',
hidden: true,
default: scopes.join(' ')
}
]
}
}

module.exports = { credClass: GoogleDriveOAuth2 }
62 changes: 62 additions & 0 deletions packages/components/credentials/GoogleSheetsOAuth2.credential.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import { INodeParams, INodeCredential } from '../src/Interface'
const scopes = [
'https://www.googleapis.com/auth/drive.file',
'https://www.googleapis.com/auth/spreadsheets',
'https://www.googleapis.com/auth/drive.metadata'
]

class GoogleSheetsOAuth2 implements INodeCredential {
label: string
name: string
version: number
inputs: INodeParams[]
description: string

constructor() {
this.label = 'Google Sheets OAuth2'
this.name = 'googleSheetsOAuth2'
this.version = 1.0
this.description =
'You can find the setup instructions <a target="_blank" href="https://docs.flowiseai.com/integrations/langchain/tools/google-sheets">here</a>'
this.inputs = [
{
label: 'Authorization URL',
name: 'authorizationUrl',
type: 'string',
default: 'https://accounts.google.com/o/oauth2/v2/auth'
},
{
label: 'Access Token URL',
name: 'accessTokenUrl',
type: 'string',
default: 'https://oauth2.googleapis.com/token'
},
{
label: 'Client ID',
name: 'clientId',
type: 'string'
},
{
label: 'Client Secret',
name: 'clientSecret',
type: 'password'
},
{
label: 'Additional Parameters',
name: 'additionalParameters',
type: 'string',
default: 'access_type=offline&prompt=consent',
hidden: true
},
{
label: 'Scope',
name: 'scope',
type: 'string',
hidden: true,
default: scopes.join(' ')
}
]
}
}

module.exports = { credClass: GoogleSheetsOAuth2 }
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import { INodeParams, INodeCredential } from '../src/Interface'

const scopes = [
'openid',
'offline_access',
'Contacts.Read',
'Contacts.ReadWrite',
'Calendars.Read',
'Calendars.Read.Shared',
'Calendars.ReadWrite',
'Mail.Read',
'Mail.ReadWrite',
'Mail.ReadWrite.Shared',
'Mail.Send',
'Mail.Send.Shared',
'MailboxSettings.Read'
]

class MsoftOutlookOAuth2 implements INodeCredential {
label: string
name: string
version: number
description: string
inputs: INodeParams[]

constructor() {
this.label = 'Microsoft Outlook OAuth2'
this.name = 'microsoftOutlookOAuth2'
this.version = 1.0
this.description =
'You can find the setup instructions <a target="_blank" href="https://docs.flowiseai.com/integrations/langchain/tools/microsoft-outlook">here</a>'
this.inputs = [
{
label: 'Authorization URL',
name: 'authorizationUrl',
type: 'string',
default: 'https://login.microsoftonline.com/<tenantId>/oauth2/v2.0/authorize'
},
{
label: 'Access Token URL',
name: 'accessTokenUrl',
type: 'string',
default: 'https://login.microsoftonline.com/<tenantId>/oauth2/v2.0/token'
},
{
label: 'Client ID',
name: 'clientId',
type: 'string'
},
{
label: 'Client Secret',
name: 'clientSecret',
type: 'password'
},
{
label: 'Scope',
name: 'scope',
type: 'string',
hidden: true,
default: scopes.join(' ')
}
]
}
}

module.exports = { credClass: MsoftOutlookOAuth2 }
Loading