mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
feat(editor): Add pre-built agents experiment (#18124)
This commit is contained in:
@@ -9,6 +9,7 @@ import type {
|
||||
INodeTypeDescription,
|
||||
JsonObject,
|
||||
NodeExecutionHint,
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
import { NodeConnectionTypes, NodeApiError, NodeOperationError } from 'n8n-workflow';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
@@ -31,6 +32,22 @@ import {
|
||||
} from './GenericFunctions';
|
||||
import { sortItemKeysByPriorityList } from '../../../utils/utilities';
|
||||
|
||||
const preBuiltAgentsCallout: INodeProperties = {
|
||||
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased
|
||||
displayName: 'Interact with your Google Calendar using our pre-built',
|
||||
name: 'preBuiltAgentsCalloutGoogleCalendar',
|
||||
type: 'callout',
|
||||
typeOptions: {
|
||||
calloutAction: {
|
||||
label: 'Voice assistant agent',
|
||||
icon: 'bot',
|
||||
type: 'openSampleWorkflowTemplate',
|
||||
templateId: 'voice_assistant_agent_with_telegram_and_gcal',
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
};
|
||||
|
||||
export class GoogleCalendar implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
displayName: 'Google Calendar',
|
||||
@@ -53,6 +70,7 @@ export class GoogleCalendar implements INodeType {
|
||||
},
|
||||
],
|
||||
properties: [
|
||||
preBuiltAgentsCallout,
|
||||
{
|
||||
displayName: 'Resource',
|
||||
name: 'resource',
|
||||
|
||||
@@ -1,11 +1,28 @@
|
||||
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
|
||||
import { NodeConnectionTypes, type INodeTypeDescription } from 'n8n-workflow';
|
||||
import { NodeConnectionTypes, type INodeTypeDescription, type INodeProperties } from 'n8n-workflow';
|
||||
|
||||
import * as drive from './drive/Drive.resource';
|
||||
import * as file from './file/File.resource';
|
||||
import * as fileFolder from './fileFolder/FileFolder.resource';
|
||||
import * as folder from './folder/Folder.resource';
|
||||
|
||||
const preBuiltAgentsCallout: INodeProperties = {
|
||||
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased
|
||||
displayName:
|
||||
'Retrieve, analyze, and answer questions using your Google Drive documents with our pre-built',
|
||||
name: 'preBuiltAgentsCalloutGoogleDrive',
|
||||
type: 'callout',
|
||||
typeOptions: {
|
||||
calloutAction: {
|
||||
label: 'Knowledge store agent',
|
||||
icon: 'bot',
|
||||
type: 'openSampleWorkflowTemplate',
|
||||
templateId: 'knowledge_store_agent_with_google_drive',
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
};
|
||||
|
||||
export const versionDescription: INodeTypeDescription = {
|
||||
displayName: 'Google Drive',
|
||||
name: 'googleDrive',
|
||||
@@ -41,6 +58,7 @@ export const versionDescription: INodeTypeDescription = {
|
||||
},
|
||||
],
|
||||
properties: [
|
||||
preBuiltAgentsCallout,
|
||||
{
|
||||
displayName: 'Authentication',
|
||||
name: 'authentication',
|
||||
|
||||
@@ -2,6 +2,7 @@ import type {
|
||||
IDataObject,
|
||||
IExecuteFunctions,
|
||||
INodeExecutionData,
|
||||
INodeProperties,
|
||||
INodeType,
|
||||
INodeTypeBaseDescription,
|
||||
INodeTypeDescription,
|
||||
@@ -36,6 +37,22 @@ import {
|
||||
unescapeSnippets,
|
||||
} from '../GenericFunctions';
|
||||
|
||||
const preBuiltAgentsCallout: INodeProperties = {
|
||||
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased
|
||||
displayName: 'Sort your Gmail inbox using our pre-built',
|
||||
name: 'preBuiltAgentsCalloutGmail',
|
||||
type: 'callout',
|
||||
typeOptions: {
|
||||
calloutAction: {
|
||||
label: 'Email triage agent',
|
||||
icon: 'bot',
|
||||
type: 'openSampleWorkflowTemplate',
|
||||
templateId: 'email_triage_agent_with_gmail',
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
};
|
||||
|
||||
const versionDescription: INodeTypeDescription = {
|
||||
displayName: 'Gmail',
|
||||
name: 'gmail',
|
||||
@@ -72,6 +89,7 @@ const versionDescription: INodeTypeDescription = {
|
||||
],
|
||||
webhooks: sendAndWaitWebhooksDescription,
|
||||
properties: [
|
||||
preBuiltAgentsCallout,
|
||||
{
|
||||
displayName: 'Authentication',
|
||||
name: 'authentication',
|
||||
|
||||
@@ -23,6 +23,22 @@ export const authentication: INodeProperties = {
|
||||
default: 'oAuth2',
|
||||
};
|
||||
|
||||
const preBuiltAgentsCallout: INodeProperties = {
|
||||
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased
|
||||
displayName: 'Manage tasks in Google Sheets using our pre-built',
|
||||
name: 'preBuiltAgentsCalloutGoogleSheets',
|
||||
type: 'callout',
|
||||
typeOptions: {
|
||||
calloutAction: {
|
||||
label: 'Task management agent',
|
||||
icon: 'bot',
|
||||
type: 'openSampleWorkflowTemplate',
|
||||
templateId: 'task_management_agent_with_google_sheets',
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
};
|
||||
|
||||
export const versionDescription: INodeTypeDescription = {
|
||||
displayName: 'Google Sheets',
|
||||
name: 'googleSheets',
|
||||
@@ -76,6 +92,7 @@ export const versionDescription: INodeTypeDescription = {
|
||||
},
|
||||
],
|
||||
properties: [
|
||||
preBuiltAgentsCallout,
|
||||
authentication,
|
||||
{
|
||||
displayName: 'Resource',
|
||||
|
||||
@@ -2,7 +2,24 @@ import type { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
import { optimizeResponseProperties } from '../shared/optimizeResponse';
|
||||
|
||||
const preBuiltAgentsCallout: INodeProperties = {
|
||||
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased
|
||||
displayName: 'Try the HTTP request tool with our pre-built',
|
||||
name: 'preBuiltAgentsCalloutHttpRequest',
|
||||
type: 'callout',
|
||||
typeOptions: {
|
||||
calloutAction: {
|
||||
label: 'Joke agent',
|
||||
icon: 'bot',
|
||||
type: 'openSampleWorkflowTemplate',
|
||||
templateId: 'joke_agent_with_http_tool',
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
};
|
||||
|
||||
export const mainProperties: INodeProperties[] = [
|
||||
preBuiltAgentsCallout,
|
||||
{
|
||||
displayName: '',
|
||||
name: 'curlImport',
|
||||
|
||||
@@ -6,6 +6,7 @@ import type {
|
||||
INodeType,
|
||||
INodeTypeDescription,
|
||||
IHttpRequestMethods,
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
import {
|
||||
BINARY_ENCODING,
|
||||
@@ -26,6 +27,22 @@ import { configureWaitTillDate } from '../../utils/sendAndWait/configureWaitTill
|
||||
import { sendAndWaitWebhooksDescription } from '../../utils/sendAndWait/descriptions';
|
||||
import { getSendAndWaitProperties, sendAndWaitWebhook } from '../../utils/sendAndWait/utils';
|
||||
|
||||
const preBuiltAgentsCallout: INodeProperties = {
|
||||
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased
|
||||
displayName: 'Interact with Telegram using our pre-built',
|
||||
name: 'preBuiltAgentsCalloutTelegram',
|
||||
type: 'callout',
|
||||
typeOptions: {
|
||||
calloutAction: {
|
||||
label: 'Voice assistant agent',
|
||||
icon: 'bot',
|
||||
type: 'openSampleWorkflowTemplate',
|
||||
templateId: 'voice_assistant_agent_with_telegram_and_gcal',
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
};
|
||||
|
||||
export class Telegram implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
displayName: 'Telegram',
|
||||
@@ -49,6 +66,7 @@ export class Telegram implements INodeType {
|
||||
],
|
||||
webhooks: sendAndWaitWebhooksDescription,
|
||||
properties: [
|
||||
preBuiltAgentsCallout,
|
||||
{
|
||||
displayName: 'Resource',
|
||||
name: 'resource',
|
||||
|
||||
Reference in New Issue
Block a user