Skip to content

Commit 30c4180

Browse files
authored
Feature/Add teams, gmail, outlook tools (#4577)
* add teams, gmail, outlook tools * update docs link * update credentials for oauth2 * add jira tool * add google drive, google calendar, google sheets tools, powerpoint, excel, word doc loader * update jira logo * Refactor Gmail and Outlook tools to remove maxOutputLength parameter and enhance request handling. Update response formatting to include parameters in the output. Adjust Google Drive tools to simplify success messages by removing unnecessary parameter details.
1 parent 6dcb65c commit 30c4180

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+16830
-142
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
import { INodeParams, INodeCredential } from '../src/Interface'
2+
const scopes = [
3+
'https://www.googleapis.com/auth/gmail.readonly',
4+
'https://www.googleapis.com/auth/gmail.compose',
5+
'https://www.googleapis.com/auth/gmail.modify',
6+
'https://www.googleapis.com/auth/gmail.labels'
7+
]
8+
9+
class GmailOAuth2 implements INodeCredential {
10+
label: string
11+
name: string
12+
version: number
13+
inputs: INodeParams[]
14+
description: string
15+
16+
constructor() {
17+
this.label = 'Gmail OAuth2'
18+
this.name = 'gmailOAuth2'
19+
this.version = 1.0
20+
this.description =
21+
'You can find the setup instructions <a target="_blank" href="https://docs.flowiseai.com/integrations/langchain/tools/gmail">here</a>'
22+
this.inputs = [
23+
{
24+
label: 'Authorization URL',
25+
name: 'authorizationUrl',
26+
type: 'string',
27+
default: 'https://accounts.google.com/o/oauth2/v2/auth'
28+
},
29+
{
30+
label: 'Access Token URL',
31+
name: 'accessTokenUrl',
32+
type: 'string',
33+
default: 'https://oauth2.googleapis.com/token'
34+
},
35+
{
36+
label: 'Client ID',
37+
name: 'clientId',
38+
type: 'string'
39+
},
40+
{
41+
label: 'Client Secret',
42+
name: 'clientSecret',
43+
type: 'password'
44+
},
45+
{
46+
label: 'Additional Parameters',
47+
name: 'additionalParameters',
48+
type: 'string',
49+
default: 'access_type=offline&prompt=consent',
50+
hidden: true
51+
},
52+
{
53+
label: 'Scope',
54+
name: 'scope',
55+
type: 'string',
56+
hidden: true,
57+
default: scopes.join(' ')
58+
}
59+
]
60+
}
61+
}
62+
63+
module.exports = { credClass: GmailOAuth2 }
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
import { INodeParams, INodeCredential } from '../src/Interface'
2+
const scopes = ['https://www.googleapis.com/auth/calendar', 'https://www.googleapis.com/auth/calendar.events']
3+
4+
class GoogleCalendarOAuth2 implements INodeCredential {
5+
label: string
6+
name: string
7+
version: number
8+
inputs: INodeParams[]
9+
description: string
10+
11+
constructor() {
12+
this.label = 'Google Calendar OAuth2'
13+
this.name = 'googleCalendarOAuth2'
14+
this.version = 1.0
15+
this.description =
16+
'You can find the setup instructions <a target="_blank" href="https://docs.flowiseai.com/integrations/langchain/tools/google-calendar">here</a>'
17+
this.inputs = [
18+
{
19+
label: 'Authorization URL',
20+
name: 'authorizationUrl',
21+
type: 'string',
22+
default: 'https://accounts.google.com/o/oauth2/v2/auth'
23+
},
24+
{
25+
label: 'Access Token URL',
26+
name: 'accessTokenUrl',
27+
type: 'string',
28+
default: 'https://oauth2.googleapis.com/token'
29+
},
30+
{
31+
label: 'Client ID',
32+
name: 'clientId',
33+
type: 'string'
34+
},
35+
{
36+
label: 'Client Secret',
37+
name: 'clientSecret',
38+
type: 'password'
39+
},
40+
{
41+
label: 'Additional Parameters',
42+
name: 'additionalParameters',
43+
type: 'string',
44+
default: 'access_type=offline&prompt=consent',
45+
hidden: true
46+
},
47+
{
48+
label: 'Scope',
49+
name: 'scope',
50+
type: 'string',
51+
hidden: true,
52+
default: scopes.join(' ')
53+
}
54+
]
55+
}
56+
}
57+
58+
module.exports = { credClass: GoogleCalendarOAuth2 }
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
import { INodeParams, INodeCredential } from '../src/Interface'
2+
const scopes = [
3+
'https://www.googleapis.com/auth/drive',
4+
'https://www.googleapis.com/auth/drive.appdata',
5+
'https://www.googleapis.com/auth/drive.photos.readonly'
6+
]
7+
8+
class GoogleDriveOAuth2 implements INodeCredential {
9+
label: string
10+
name: string
11+
version: number
12+
inputs: INodeParams[]
13+
description: string
14+
15+
constructor() {
16+
this.label = 'Google Drive OAuth2'
17+
this.name = 'googleDriveOAuth2'
18+
this.version = 1.0
19+
this.description =
20+
'You can find the setup instructions <a target="_blank" href="https://docs.flowiseai.com/integrations/langchain/tools/google-drive">here</a>'
21+
this.inputs = [
22+
{
23+
label: 'Authorization URL',
24+
name: 'authorizationUrl',
25+
type: 'string',
26+
default: 'https://accounts.google.com/o/oauth2/v2/auth'
27+
},
28+
{
29+
label: 'Access Token URL',
30+
name: 'accessTokenUrl',
31+
type: 'string',
32+
default: 'https://oauth2.googleapis.com/token'
33+
},
34+
{
35+
label: 'Client ID',
36+
name: 'clientId',
37+
type: 'string'
38+
},
39+
{
40+
label: 'Client Secret',
41+
name: 'clientSecret',
42+
type: 'password'
43+
},
44+
{
45+
label: 'Additional Parameters',
46+
name: 'additionalParameters',
47+
type: 'string',
48+
default: 'access_type=offline&prompt=consent',
49+
hidden: true
50+
},
51+
{
52+
label: 'Scope',
53+
name: 'scope',
54+
type: 'string',
55+
hidden: true,
56+
default: scopes.join(' ')
57+
}
58+
]
59+
}
60+
}
61+
62+
module.exports = { credClass: GoogleDriveOAuth2 }
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
import { INodeParams, INodeCredential } from '../src/Interface'
2+
const scopes = [
3+
'https://www.googleapis.com/auth/drive.file',
4+
'https://www.googleapis.com/auth/spreadsheets',
5+
'https://www.googleapis.com/auth/drive.metadata'
6+
]
7+
8+
class GoogleSheetsOAuth2 implements INodeCredential {
9+
label: string
10+
name: string
11+
version: number
12+
inputs: INodeParams[]
13+
description: string
14+
15+
constructor() {
16+
this.label = 'Google Sheets OAuth2'
17+
this.name = 'googleSheetsOAuth2'
18+
this.version = 1.0
19+
this.description =
20+
'You can find the setup instructions <a target="_blank" href="https://docs.flowiseai.com/integrations/langchain/tools/google-sheets">here</a>'
21+
this.inputs = [
22+
{
23+
label: 'Authorization URL',
24+
name: 'authorizationUrl',
25+
type: 'string',
26+
default: 'https://accounts.google.com/o/oauth2/v2/auth'
27+
},
28+
{
29+
label: 'Access Token URL',
30+
name: 'accessTokenUrl',
31+
type: 'string',
32+
default: 'https://oauth2.googleapis.com/token'
33+
},
34+
{
35+
label: 'Client ID',
36+
name: 'clientId',
37+
type: 'string'
38+
},
39+
{
40+
label: 'Client Secret',
41+
name: 'clientSecret',
42+
type: 'password'
43+
},
44+
{
45+
label: 'Additional Parameters',
46+
name: 'additionalParameters',
47+
type: 'string',
48+
default: 'access_type=offline&prompt=consent',
49+
hidden: true
50+
},
51+
{
52+
label: 'Scope',
53+
name: 'scope',
54+
type: 'string',
55+
hidden: true,
56+
default: scopes.join(' ')
57+
}
58+
]
59+
}
60+
}
61+
62+
module.exports = { credClass: GoogleSheetsOAuth2 }
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
import { INodeParams, INodeCredential } from '../src/Interface'
2+
3+
const scopes = [
4+
'openid',
5+
'offline_access',
6+
'Contacts.Read',
7+
'Contacts.ReadWrite',
8+
'Calendars.Read',
9+
'Calendars.Read.Shared',
10+
'Calendars.ReadWrite',
11+
'Mail.Read',
12+
'Mail.ReadWrite',
13+
'Mail.ReadWrite.Shared',
14+
'Mail.Send',
15+
'Mail.Send.Shared',
16+
'MailboxSettings.Read'
17+
]
18+
19+
class MsoftOutlookOAuth2 implements INodeCredential {
20+
label: string
21+
name: string
22+
version: number
23+
description: string
24+
inputs: INodeParams[]
25+
26+
constructor() {
27+
this.label = 'Microsoft Outlook OAuth2'
28+
this.name = 'microsoftOutlookOAuth2'
29+
this.version = 1.0
30+
this.description =
31+
'You can find the setup instructions <a target="_blank" href="https://docs.flowiseai.com/integrations/langchain/tools/microsoft-outlook">here</a>'
32+
this.inputs = [
33+
{
34+
label: 'Authorization URL',
35+
name: 'authorizationUrl',
36+
type: 'string',
37+
default: 'https://login.microsoftonline.com/<tenantId>/oauth2/v2.0/authorize'
38+
},
39+
{
40+
label: 'Access Token URL',
41+
name: 'accessTokenUrl',
42+
type: 'string',
43+
default: 'https://login.microsoftonline.com/<tenantId>/oauth2/v2.0/token'
44+
},
45+
{
46+
label: 'Client ID',
47+
name: 'clientId',
48+
type: 'string'
49+
},
50+
{
51+
label: 'Client Secret',
52+
name: 'clientSecret',
53+
type: 'password'
54+
},
55+
{
56+
label: 'Scope',
57+
name: 'scope',
58+
type: 'string',
59+
hidden: true,
60+
default: scopes.join(' ')
61+
}
62+
]
63+
}
64+
}
65+
66+
module.exports = { credClass: MsoftOutlookOAuth2 }

0 commit comments

Comments
 (0)