mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-22 09:01:09 +03:00
30c4180d97
* 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.
64 lines
1.9 KiB
TypeScript
64 lines
1.9 KiB
TypeScript
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 }
|