Skip to content

Self-improving AI Employees for everyone

feat: Consolidate 26 Google Workspace nodes into 6 unified nodes

trohitg6db10ee4f4f7
diff --git a/client/src/nodeDefinitions.ts b/client/src/nodeDefinitions.ts
index 7303eff2..109a601a 100644
--- a/client/src/nodeDefinitions.ts
+++ b/client/src/nodeDefinitions.ts
@@ -19,13 +19,9 @@ import { documentNodes, DOCUMENT_NODE_TYPES } from './nodeDefinitions/documentNo
import { socialNodes, SOCIAL_NODE_TYPES } from './nodeDefinitions/socialNodes';
import { twitterNodes, TWITTER_NODE_TYPES } from './nodeDefinitions/twitterNodes';
import { apifyNodes, APIFY_NODE_TYPES } from './nodeDefinitions/apifyNodes';
-import { gmailNodes, GMAIL_NODE_TYPES } from './nodeDefinitions/gmailNodes';
-import { calendarNodes, CALENDAR_NODE_TYPES } from './nodeDefinitions/calendarNodes';
-import { driveNodes, DRIVE_NODE_TYPES } from './nodeDefinitions/driveNodes';
-import { sheetsNodes, SHEETS_NODE_TYPES } from './nodeDefinitions/sheetsNodes';
-import { tasksNodes, TASKS_NODE_TYPES } from './nodeDefinitions/tasksNodes';
-import { contactsNodes, CONTACTS_NODE_TYPES } from './nodeDefinitions/contactsNodes';
import { searchNodes, SEARCH_NODE_TYPES } from './nodeDefinitions/searchNodes';
+// Consolidated Google Workspace nodes (replaces gmailNodes, calendarNodes, driveNodes, sheetsNodes, tasksNodes, contactsNodes)
+import { googleWorkspaceNodes, GOOGLE_WORKSPACE_NODE_TYPES } from './nodeDefinitions/googleWorkspaceNodes';
// ============================================================================
// MAIN NODE REGISTRY - Combining all modular definitions
@@ -50,13 +46,8 @@ export const nodeDefinitions: Record<string, INodeTypeDescription> = {
...socialNodes,
...twitterNodes,
...apifyNodes,
- ...gmailNodes,
- ...calendarNodes,
- ...driveNodes,
- ...sheetsNodes,
- ...tasksNodes,
- ...contactsNodes,
- ...searchNodes
+ ...searchNodes,
+ ...googleWorkspaceNodes
};
// ============================================================================
@@ -136,28 +127,9 @@ export const APIFY_NODES = [
...APIFY_NODE_TYPES
];
-export const GMAIL_NODES = [
- ...GMAIL_NODE_TYPES
-];
-
-export const CALENDAR_NODES = [
- ...CALENDAR_NODE_TYPES
-];
-
-export const DRIVE_NODES = [
- ...DRIVE_NODE_TYPES
-];
-
-export const SHEETS_NODES = [
- ...SHEETS_NODE_TYPES
-];
-
-export const TASKS_NODES = [
- ...TASKS_NODE_TYPES
-];
-
-export const CONTACTS_NODES = [
- ...CONTACTS_NODE_TYPES
+// Consolidated Google Workspace nodes (gmail, gmailReceive, calendar, drive, sheets, tasks, contacts)
+export const GOOGLE_WORKSPACE_NODES = [
+ ...GOOGLE_WORKSPACE_NODE_TYPES
];
export const SEARCH_NODES = [
@@ -165,4 +137,4 @@ export const SEARCH_NODES = [
];
// Re-export types and utilities from modular files for external access
-export { createBaseChatModel } from './nodeDefinitions/aiModelNodes';
\ No newline at end of file
+export { createBaseChatModel } from './nodeDefinitions/aiModelNodes';
diff --git a/client/src/nodeDefinitions/calendarNodes.ts b/client/src/nodeDefinitions/calendarNodes.ts
deleted file mode 100644
index 5a8ecebd..00000000
--- a/client/src/nodeDefinitions/calendarNodes.ts
+++ /dev/null
@@ -1,393 +0,0 @@
-// Google Calendar Node Definitions - Google Calendar API integration via OAuth 2.0
-import {
- INodeTypeDescription,
- NodeConnectionType
-} from '../types/INodeProperties';
-import { CALENDAR_ICON } from '../assets/icons/google';
-
-// ============================================================================
-// SHARED PROPERTIES
-// ============================================================================
-
-const ACCOUNT_MODE_PROPERTY = {
- displayName: 'Account',
- name: 'account_mode',
- type: 'options' as const,
- options: [
- { name: 'Owner Account', value: 'owner' },
- { name: 'Customer Account', value: 'customer' }
- ],
- default: 'owner',
- description: 'Which Google account to use'
-};
-
-const CUSTOMER_ID_PROPERTY = {
- displayName: 'Customer ID',
- name: 'customer_id',
- type: 'string' as const,
- default: '',
- placeholder: 'customer_123 or {{input.customer_id}}',
- description: 'Customer identifier to look up their Google connection',
- displayOptions: {
- show: { account_mode: ['customer'] }
- }
-};
-
-const CALENDAR_ID_PROPERTY = {
- displayName: 'Calendar ID',
- name: 'calendar_id',
- type: 'string' as const,
- default: 'primary',
- placeholder: 'primary or [email protected]',
- description: 'Calendar ID (use "primary" for main calendar)'
-};
-
-// ============================================================================
-// CALENDAR NODES
-// ============================================================================
-
-export const calendarNodes: Record<string, INodeTypeDescription> = {
- // Calendar Create - Create events
- calendarCreate: {
- displayName: 'Calendar Create',
- name: 'calendarCreate',
- icon: CALENDAR_ICON,
- group: ['google', 'tool'],
- version: 1,
- subtitle: 'Create Event',
- description: 'Create a calendar event via Google Calendar API',
- defaults: { name: 'Calendar Create', color: '#4285F4' },
- inputs: [{
- name: 'main',
- displayName: 'Input',
- type: 'main' as NodeConnectionType,
- description: 'Event input'
- }],
- outputs: [
- {
- name: 'main',
- displayName: 'Output',
- type: 'main' as NodeConnectionType,
- description: 'Created event (event_id, title, start, end, html_link)'
- },
- {
- name: 'tool',
- displayName: 'Tool',
- type: 'main' as NodeConnectionType,
- description: 'Connect to AI Agent tool handle'
- }
- ],
- properties: [
- ACCOUNT_MODE_PROPERTY,
- CUSTOMER_ID_PROPERTY,
-
- // ===== EVENT DETAILS =====
- {
- displayName: 'Title',
- name: 'title',
- type: 'string',
- default: '',
- required: true,
- placeholder: 'Meeting with Team',
- description: 'Event title/summary'
- },
- {
- displayName: 'Start Time',
- name: 'start_time',
- type: 'string',
- default: '',
- required: true,
- placeholder: '2026-02-22T14:00:00',
- description: 'Start time in ISO format (e.g., 2026-02-22T14:00:00)'
- },
- {
- displayName: 'End Time',
- name: 'end_time',
- type: 'string',
- default: '',
- required: true,
- placeholder: '2026-02-22T15:00:00',
- description: 'End time in ISO format'
- },
- {
- displayName: 'Description',
- name: 'description',
- type: 'string',
- default: '',
- typeOptions: { rows: 3 },
- placeholder: 'Meeting agenda and notes...',
- description: 'Event description (optional)'
- },
- {
- displayName: 'Location',
- name: 'location',
- type: 'string',
- default: '',
- placeholder: 'Conference Room A or https://meet.google.com/...',
- description: 'Event location (optional)'
- },
- {
- displayName: 'Attendees',
- name: 'attendees',
- type: 'string',
- default: '',
- description: 'Attendee email addresses (comma-separated)'
- },
- {
- displayName: 'Timezone',
- name: 'timezone',
- type: 'string',
- default: 'UTC',
- placeholder: 'America/New_York',
- description: 'Timezone for the event (e.g., America/New_York, Europe/London)'
- },
- {
- displayName: 'Reminder (minutes)',
- name: 'reminder_minutes',
- type: 'number',
- default: 30,
- typeOptions: { minValue: 0, maxValue: 40320 },
- description: 'Minutes before event for popup reminder'
- },
- CALENDAR_ID_PROPERTY
- ]
- },
-
- // Calendar List - List events
- calendarList: {
- displayName: 'Calendar List',
- name: 'calendarList',
- icon: CALENDAR_ICON,
- group: ['google', 'tool'],
- version: 1,
- subtitle: 'List Events',
- description: 'List calendar events within a date range',
- defaults: { name: 'Calendar List', color: '#4285F4' },
- inputs: [{
- name: 'main',
- displayName: 'Input',
- type: 'main' as NodeConnectionType,
- description: 'Query input'
- }],
- outputs: [
- {
- name: 'main',
- displayName: 'Output',
- type: 'main' as NodeConnectionType,
- description: 'Events array with count'
- },
- {
- name: 'tool',
- displayName: 'Tool',
- type: 'main' as NodeConnectionType,
- description: 'Connect to AI Agent tool handle'
- }
- ],
- properties: [
- ACCOUNT_MODE_PROPERTY,
- CUSTOMER_ID_PROPERTY,
-
- // ===== DATE RANGE =====
- {
- displayName: 'Start Date',
- name: 'start_date',
- type: 'string',
- default: 'today',
- placeholder: 'today or 2026-02-22T00:00:00Z',
- description: 'Start date for query ("today" or ISO format)'
- },
- {
- displayName: 'End Date',
- name: 'end_date',
- type: 'string',
- default: 'today+7d',
- placeholder: 'today+7d or 2026-02-29T23:59:59Z',
- description: 'End date ("today+Nd" for N days from now, or ISO format)'
- },
- {
- displayName: 'Max Results',
- name: 'max_results',
- type: 'number',
- default: 10,
- typeOptions: { minValue: 1, maxValue: 250 },
- description: 'Maximum number of events to return'
- },
- {
- displayName: 'Expand Recurring',
- name: 'single_events',
- type: 'boolean',
- default: true,
- description: 'Expand recurring events into individual instances'
- },
- {
- displayName: 'Order By',
- name: 'order_by',
- type: 'options',
- options: [
- { name: 'Start Time', value: 'startTime' },
- { name: 'Last Updated', value: 'updated' }
- ],
- default: 'startTime',
- description: 'Sort order for events'
- },
- CALENDAR_ID_PROPERTY
- ]
- },
-
- // Calendar Update - Update events
- calendarUpdate: {
- displayName: 'Calendar Update',
- name: 'calendarUpdate',
- icon: CALENDAR_ICON,
- group: ['google', 'tool'],
- version: 1,
- subtitle: 'Update Event',
- description: 'Update an existing calendar event',
- defaults: { name: 'Calendar Update', color: '#4285F4' },
- inputs: [{
- name: 'main',
- displayName: 'Input',
- type: 'main' as NodeConnectionType,
- description: 'Update input'
- }],
- outputs: [
- {
- name: 'main',
- displayName: 'Output',
- type: 'main' as NodeConnectionType,
- description: 'Updated event details'
- },
- {
- name: 'tool',
- displayName: 'Tool',
- type: 'main' as NodeConnectionType,
- description: 'Connect to AI Agent tool handle'
- }
- ],
- properties: [
- ACCOUNT_MODE_PROPERTY,
- CUSTOMER_ID_PROPERTY,
-
- // ===== EVENT IDENTIFICATION =====
- {
- displayName: 'Event ID',
- name: 'event_id',
- type: 'string',
- default: '',
- required: true,
- placeholder: 'abc123xyz',
- description: 'ID of the event to update'
- },
-
- // ===== FIELDS TO UPDATE =====
- {
- displayName: 'Title',
- name: 'title',
- type: 'string',
- default: '',
- placeholder: 'New meeting title',
- description: 'New event title (leave empty to keep current)'
- },
- {
- displayName: 'Start Time',
- name: 'start_time',
- type: 'string',
- default: '',
- placeholder: '2026-02-22T14:00:00',
- description: 'New start time (leave empty to keep current)'
- },
- {
- displayName: 'End Time',
- name: 'end_time',
- type: 'string',
- default: '',
- placeholder: '2026-02-22T15:00:00',
- description: 'New end time (leave empty to keep current)'
- },
- {
- displayName: 'Description',
- name: 'description',
- type: 'string',
- default: '',
- typeOptions: { rows: 3 },
- placeholder: 'Updated description...',
- description: 'New description (leave empty to keep current)'
- },
- {
- displayName: 'Location',
- name: 'location',
- type: 'string',
- default: '',
- placeholder: 'New location',
- description: 'New location (leave empty to keep current)'
- },
- CALENDAR_ID_PROPERTY
- ]
- },
-
- // Calendar Delete - Delete events
- calendarDelete: {
- displayName: 'Calendar Delete',
- name: 'calendarDelete',
- icon: CALENDAR_ICON,
- group: ['google', 'tool'],
- version: 1,
- subtitle: 'Delete Event',
- description: 'Delete a calendar event',
- defaults: { name: 'Calendar Delete', color: '#4285F4' },
- inputs: [{
- name: 'main',
- displayName: 'Input',
- type: 'main' as NodeConnectionType,
- description: 'Delete input'
- }],
- outputs: [
- {
- name: 'main',
- displayName: 'Output',
- type: 'main' as NodeConnectionType,
- description: 'Deletion confirmation'
- },
- {
- name: 'tool',
- displayName: 'Tool',
- type: 'main' as NodeConnectionType,
- description: 'Connect to AI Agent tool handle'
- }
- ],
- properties: [
- ACCOUNT_MODE_PROPERTY,
- CUSTOMER_ID_PROPERTY,
-
- // ===== EVENT IDENTIFICATION =====
- {
- displayName: 'Event ID',
- name: 'event_id',
- type: 'string',
- default: '',
- required: true,
- placeholder: 'abc123xyz',
- description: 'ID of the event to delete'
- },
- {
- displayName: 'Send Cancellation',
- name: 'send_updates',
- type: 'options',
- options: [
- { name: 'Send to All Attendees', value: 'all' },
- { name: 'Do Not Send', value: 'none' }
- ],
- default: 'all',
- description: 'Send cancellation emails to attendees'
- },
- CALENDAR_ID_PROPERTY
- ]
- }
-};
-
-// ============================================================================
-// EXPORTS
-// ============================================================================
-
-export const CALENDAR_NODE_TYPES = ['calendarCreate', 'calendarList', 'calendarUpdate', 'calendarDelete'];
diff --git a/client/src/nodeDefinitions/contactsNodes.ts b/client/src/nodeDefinitions/contactsNodes.ts
deleted file mode 100644
index 4d2436fa..00000000
--- a/client/src/nodeDefinitions/contactsNodes.ts
+++ /dev/null
@@ -1,455 +0,0 @@
-// Google Contacts Node Definitions - Google People API integration via OAuth 2.0
-import {
- INodeTypeDescription,
- NodeConnectionType
-} from '../types/INodeProperties';
-import { CONTACTS_ICON } from '../assets/icons/google';
-
-// ============================================================================
-// SHARED PROPERTIES
-// ============================================================================
-
-const ACCOUNT_MODE_PROPERTY = {
- displayName: 'Account',
- name: 'account_mode',
- type: 'options' as const,
- options: [
- { name: 'Owner Account', value: 'owner' },
- { name: 'Customer Account', value: 'customer' }
- ],
- default: 'owner',
- description: 'Which Google account to use'
-};
-
-const CUSTOMER_ID_PROPERTY = {
- displayName: 'Customer ID',
- name: 'customer_id',
- type: 'string' as const,
- default: '',
- placeholder: 'customer_123 or {{input.customer_id}}',
- description: 'Customer identifier to look up their Google connection',
- displayOptions: {
- show: { account_mode: ['customer'] }
- }
-};
-
-// ============================================================================
-// CONTACTS NODES
-// ============================================================================
-
-export const contactsNodes: Record<string, INodeTypeDescription> = {
- // Contacts Create - Create a new contact
- contactsCreate: {
- displayName: 'Contacts Create',
- name: 'contactsCreate',
- icon: CONTACTS_ICON,
- group: ['google', 'tool'],
- version: 1,
- subtitle: 'Create Contact',
- description: 'Create a new contact in Google Contacts',
- defaults: { name: 'Contacts Create', color: '#4285F4' },
- inputs: [{
- name: 'main',
- displayName: 'Input',
- type: 'main' as NodeConnectionType,
- description: 'Contact input'
- }],
- outputs: [
- {
- name: 'main',
- displayName: 'Output',
- type: 'main' as NodeConnectionType,
- description: 'Created contact (resource_name, display_name, email, phone)'
- },
- {
- name: 'tool',
- displayName: 'Tool',
- type: 'main' as NodeConnectionType,
- description: 'Connect to AI Agent tool handle'
- }
- ],
- properties: [
- ACCOUNT_MODE_PROPERTY,
- CUSTOMER_ID_PROPERTY,
-
- // ===== CONTACT DETAILS =====
- {
- displayName: 'First Name',
- name: 'first_name',
- type: 'string',
- default: '',
- required: true,
- placeholder: 'John',
- description: 'First name (required)'
- },
- {
- displayName: 'Last Name',
- name: 'last_name',
- type: 'string',
- default: '',
- placeholder: 'Doe',
- description: 'Last name (optional)'
- },
- {
- displayName: 'Email',
- name: 'email',
- type: 'string',
- default: '',
- placeholder: '[email protected]',
- description: 'Email address (optional)'
- },
- {
- displayName: 'Phone',
- name: 'phone',
- type: 'string',
- default: '',
- placeholder: '+1 555-123-4567',
- description: 'Phone number (optional)'
- },
- {
- displayName: 'Company',
- name: 'company',
- type: 'string',
- default: '',
- placeholder: 'Acme Inc.',
- description: 'Company/organization name (optional)'
- },
- {
- displayName: 'Job Title',
- name: 'job_title',
- type: 'string',
- default: '',
- placeholder: 'Software Engineer',
- description: 'Job title (optional)'
- },
- {
- displayName: 'Notes',
- name: 'notes',
- type: 'string',
- default: '',
- typeOptions: { rows: 3 },
- placeholder: 'Additional notes about this contact...',
- description: 'Notes/biography (optional)'
- }
- ]
- },
-
- // Contacts List - List contacts
- contactsList: {
- displayName: 'Contacts List',
- name: 'contactsList',
- icon: CONTACTS_ICON,
- group: ['google', 'tool'],
- version: 1,
- subtitle: 'List Contacts',
- description: 'List contacts from Google Contacts',
- defaults: { name: 'Contacts List', color: '#4285F4' },
- inputs: [{
- name: 'main',
- displayName: 'Input',
- type: 'main' as NodeConnectionType,
- description: 'Query input'
- }],
- outputs: [
- {
- name: 'main',
- displayName: 'Output',
- type: 'main' as NodeConnectionType,
- description: 'Contacts array with count'
- },
- {
- name: 'tool',
- displayName: 'Tool',
- type: 'main' as NodeConnectionType,
- description: 'Connect to AI Agent tool handle'
- }
- ],
- properties: [
- ACCOUNT_MODE_PROPERTY,
- CUSTOMER_ID_PROPERTY,
-
- // ===== LIST OPTIONS =====
- {
- displayName: 'Page Size',
- name: 'page_size',
- type: 'number',
- default: 100,
- typeOptions: { minValue: 1, maxValue: 1000 },
- description: 'Number of contacts to return'
- },
- {
- displayName: 'Sort Order',
- name: 'sort_order',
- type: 'options',
- options: [
- { name: 'Last Modified (Newest)', value: 'LAST_MODIFIED_DESCENDING' },
- { name: 'Last Modified (Oldest)', value: 'LAST_MODIFIED_ASCENDING' },
- { name: 'First Name (A-Z)', value: 'FIRST_NAME_ASCENDING' },
- { name: 'Last Name (A-Z)', value: 'LAST_NAME_ASCENDING' }
- ],
- default: 'LAST_MODIFIED_DESCENDING',
- description: 'Sort order for contacts'
- },
- {
- displayName: 'Page Token',
- name: 'page_token',
- type: 'string',
- default: '',
- placeholder: 'Next page token from previous request',
- description: 'Token for pagination (from previous request)'
- }
- ]
- },
-
- // Contacts Search - Search contacts
- contactsSearch: {
- displayName: 'Contacts Search',
- name: 'contactsSearch',
- icon: CONTACTS_ICON,
- group: ['google', 'tool'],
- version: 1,
- subtitle: 'Search Contacts',
- description: 'Search contacts by name, email, or phone',
- defaults: { name: 'Contacts Search', color: '#4285F4' },
- inputs: [{
- name: 'main',
- displayName: 'Input',
- type: 'main' as NodeConnectionType,
- description: 'Search input'
- }],
- outputs: [
- {
- name: 'main',
- displayName: 'Output',
- type: 'main' as NodeConnectionType,
- description: 'Matching contacts array'
- },
- {
- name: 'tool',
- displayName: 'Tool',
- type: 'main' as NodeConnectionType,
- description: 'Connect to AI Agent tool handle'
- }
- ],
- properties: [
- ACCOUNT_MODE_PROPERTY,
- CUSTOMER_ID_PROPERTY,
-
- // ===== SEARCH PARAMETERS =====
- {
- displayName: 'Query',
- name: 'query',
- type: 'string',
- default: '',
- required: true,
- placeholder: 'John or [email protected]',
- description: 'Search query (name, email, phone)'
- },
- {
- displayName: 'Max Results',
- name: 'page_size',
- type: 'number',
- default: 30,
- typeOptions: { minValue: 1, maxValue: 100 },
- description: 'Maximum number of results'
- }
- ]
- },
-
- // Contacts Get - Get a specific contact
- contactsGet: {
- displayName: 'Contacts Get',
- name: 'contactsGet',
- icon: CONTACTS_ICON,
- group: ['google', 'tool'],
- version: 1,
- subtitle: 'Get Contact',
- description: 'Get a specific contact by resource name',
- defaults: { name: 'Contacts Get', color: '#4285F4' },
- inputs: [{
- name: 'main',
- displayName: 'Input',
- type: 'main' as NodeConnectionType,
- description: 'Contact input'
- }],
- outputs: [
- {
- name: 'main',
- displayName: 'Output',
- type: 'main' as NodeConnectionType,
- description: 'Contact details'
- },
- {
- name: 'tool',
- displayName: 'Tool',
- type: 'main' as NodeConnectionType,
- description: 'Connect to AI Agent tool handle'
- }
- ],
- properties: [
- ACCOUNT_MODE_PROPERTY,
- CUSTOMER_ID_PROPERTY,
-
- // ===== CONTACT IDENTIFICATION =====
- {
- displayName: 'Resource Name',
- name: 'resource_name',
- type: 'string',
- default: '',
- required: true,
- placeholder: 'people/c12345678',
- description: 'Contact resource name (from list or search results)'
- }
- ]
- },
-
- // Contacts Update - Update an existing contact
- contactsUpdate: {
- displayName: 'Contacts Update',
- name: 'contactsUpdate',
- icon: CONTACTS_ICON,
- group: ['google', 'tool'],
- version: 1,
- subtitle: 'Update Contact',
- description: 'Update an existing contact',
- defaults: { name: 'Contacts Update', color: '#4285F4' },
- inputs: [{
- name: 'main',
- displayName: 'Input',
- type: 'main' as NodeConnectionType,
- description: 'Update input'
- }],
- outputs: [
- {
- name: 'main',
- displayName: 'Output',
- type: 'main' as NodeConnectionType,
- description: 'Updated contact details'
- },
- {
- name: 'tool',
- displayName: 'Tool',
- type: 'main' as NodeConnectionType,
- description: 'Connect to AI Agent tool handle'
- }
- ],
- properties: [
- ACCOUNT_MODE_PROPERTY,
- CUSTOMER_ID_PROPERTY,
-
- // ===== CONTACT IDENTIFICATION =====
- {
- displayName: 'Resource Name',
- name: 'resource_name',
- type: 'string',
- default: '',
- required: true,
- placeholder: 'people/c12345678',
- description: 'Contact resource name to update'
- },
-
- // ===== FIELDS TO UPDATE =====
- {
- displayName: 'First Name',
- name: 'first_name',
- type: 'string',
- default: '',
- placeholder: 'John',
- description: 'New first name (leave empty to keep current)'
- },
- {
- displayName: 'Last Name',
- name: 'last_name',
- type: 'string',
- default: '',
- placeholder: 'Doe',
- description: 'New last name (leave empty to keep current)'
- },
- {
- displayName: 'Email',
- name: 'email',
- type: 'string',
- default: '',
- placeholder: '[email protected]',
- description: 'New email (leave empty to keep current)'
- },
- {
- displayName: 'Phone',
- name: 'phone',
- type: 'string',
- default: '',
- placeholder: '+1 555-123-4567',
- description: 'New phone (leave empty to keep current)'
- },
- {
- displayName: 'Company',
- name: 'company',
- type: 'string',
- default: '',
- placeholder: 'Acme Inc.',
- description: 'New company (leave empty to keep current)'
- },
- {
- displayName: 'Job Title',
- name: 'job_title',
- type: 'string',
- default: '',
- placeholder: 'Software Engineer',
- description: 'New job title (leave empty to keep current)'
- }
- ]
- },
-
- // Contacts Delete - Delete a contact
- contactsDelete: {
- displayName: 'Contacts Delete',
- name: 'contactsDelete',
- icon: CONTACTS_ICON,
- group: ['google', 'tool'],
- version: 1,
- subtitle: 'Delete Contact',
- description: 'Delete a contact from Google Contacts',
- defaults: { name: 'Contacts Delete', color: '#4285F4' },
- inputs: [{
- name: 'main',
- displayName: 'Input',
- type: 'main' as NodeConnectionType,
- description: 'Delete input'
- }],
- outputs: [
- {
- name: 'main',
- displayName: 'Output',
- type: 'main' as NodeConnectionType,
- description: 'Deletion confirmation'
- },
- {
- name: 'tool',
- displayName: 'Tool',
- type: 'main' as NodeConnectionType,
- description: 'Connect to AI Agent tool handle'
- }
- ],
- properties: [
- ACCOUNT_MODE_PROPERTY,
- CUSTOMER_ID_PROPERTY,
-
- // ===== CONTACT IDENTIFICATION =====
- {
- displayName: 'Resource Name',
- name: 'resource_name',
- type: 'string',
- default: '',
- required: true,
- placeholder: 'people/c12345678',
- description: 'Contact resource name to delete'
- }
- ]
- }
-};
-
-// ============================================================================
-// EXPORTS
-// ============================================================================
-
-export const CONTACTS_NODE_TYPES = ['contactsCreate', 'contactsList', 'contactsSearch', 'contactsGet', 'contactsUpdate', 'contactsDelete'];
diff --git a/client/src/nodeDefinitions/driveNodes.ts b/client/src/nodeDefinitions/driveNodes.ts
deleted file mode 100644
index 5d6a9326..00000000
--- a/client/src/nodeDefinitions/driveNodes.ts
+++ /dev/null
@@ -1,372 +0,0 @@
-// Google Drive Node Definitions - Google Drive API integration via OAuth 2.0
-import {
- INodeTypeDescription,
- NodeConnectionType
-} from '../types/INodeProperties';
-import { DRIVE_ICON } from '../assets/icons/google';
-
-// ============================================================================
-// SHARED PROPERTIES
-// ============================================================================
-
-const ACCOUNT_MODE_PROPERTY = {
- displayName: 'Account',
- name: 'account_mode',
- type: 'options' as const,
- options: [
- { name: 'Owner Account', value: 'owner' },
- { name: 'Customer Account', value: 'customer' }
- ],
- default: 'owner',
- description: 'Which Google account to use'
-};
-
-const CUSTOMER_ID_PROPERTY = {
- displayName: 'Customer ID',
- name: 'customer_id',
- type: 'string' as const,
- default: '',
- placeholder: 'customer_123 or {{input.customer_id}}',
- description: 'Customer identifier to look up their Google connection',
- displayOptions: {
- show: { account_mode: ['customer'] }
- }
-};
-
-// ============================================================================
-// DRIVE NODES
-// ============================================================================
-
-export const driveNodes: Record<string, INodeTypeDescription> = {
- // Drive Upload - Upload files
- driveUpload: {
- displayName: 'Drive Upload',
- name: 'driveUpload',
- icon: DRIVE_ICON,
- group: ['google', 'tool'],
- version: 1,
- subtitle: 'Upload File',
- description: 'Upload a file to Google Drive',
- defaults: { name: 'Drive Upload', color: '#0F9D58' },
- inputs: [{
- name: 'main',
- displayName: 'Input',
- type: 'main' as NodeConnectionType,
- description: 'File input'
- }],
- outputs: [
- {
- name: 'main',
- displayName: 'Output',
- type: 'main' as NodeConnectionType,
- description: 'Uploaded file (file_id, name, web_link)'
- },
- {
- name: 'tool',
- displayName: 'Tool',
- type: 'main' as NodeConnectionType,
- description: 'Connect to AI Agent tool handle'
- }
- ],
- properties: [
- ACCOUNT_MODE_PROPERTY,
- CUSTOMER_ID_PROPERTY,
-
- // ===== FILE SOURCE =====
- {
- displayName: 'File URL',
- name: 'file_url',
- type: 'string',
- default: '',
- placeholder: 'https://example.com/document.pdf',
- description: 'URL to download file from (for remote files)'
- },
- {
- displayName: 'File Content (Base64)',
- name: 'file_content',
- type: 'string',
- default: '',
- typeOptions: { rows: 3 },
- placeholder: 'SGVsbG8gV29ybGQh...',
- description: 'Base64-encoded file content (alternative to URL)'
- },
- {
- displayName: 'Filename',
- name: 'filename',
- type: 'string',
- default: '',
- required: true,
- placeholder: 'document.pdf',
- description: 'Name for the uploaded file'
- },
- {
- displayName: 'MIME Type',
- name: 'mime_type',
- type: 'string',
- default: '',
- placeholder: 'application/pdf',
- description: 'File MIME type (auto-detected if empty)'
- },
-
- // ===== DESTINATION =====
- {
- displayName: 'Folder ID',
- name: 'folder_id',
- type: 'string',
- default: '',
- placeholder: '1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs',
- description: 'Parent folder ID (leave empty for root)'
- },
- {
- displayName: 'Description',
- name: 'description',
- type: 'string',
- default: '',
- placeholder: 'File description...',
- description: 'File description (optional)'
- }
- ]
- },
-
- // Drive Download - Download files
- driveDownload: {
- displayName: 'Drive Download',
- name: 'driveDownload',
- icon: DRIVE_ICON,
- group: ['google', 'tool'],
- version: 1,
- subtitle: 'Download File',
- description: 'Download a file from Google Drive',
- defaults: { name: 'Drive Download', color: '#0F9D58' },
- inputs: [{
- name: 'main',
- displayName: 'Input',
- type: 'main' as NodeConnectionType,
- description: 'File ID input'
- }],
- outputs: [
- {
- name: 'main',
- displayName: 'Output',
- type: 'main' as NodeConnectionType,
- description: 'File content (base64 or download URL)'
- },
- {
- name: 'tool',
- displayName: 'Tool',
- type: 'main' as NodeConnectionType,
- description: 'Connect to AI Agent tool handle'
- }
- ],
- properties: [
- ACCOUNT_MODE_PROPERTY,
- CUSTOMER_ID_PROPERTY,
-
- // ===== FILE IDENTIFICATION =====
- {
- displayName: 'File ID',
- name: 'file_id',
- type: 'string',
- default: '',
- required: true,
- placeholder: '1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs',
- description: 'ID of the file to download'
- },
- {
- displayName: 'Output Format',
- name: 'output_format',
- type: 'options',
- options: [
- { name: 'Base64 Content', value: 'base64' },
- { name: 'Download URL', value: 'url' }
- ],
- default: 'base64',
- description: 'How to return the file content'
- }
- ]
- },
-
- // Drive List - List files
- driveList: {
- displayName: 'Drive List',
- name: 'driveList',
- icon: DRIVE_ICON,
- group: ['google', 'tool'],
- version: 1,
- subtitle: 'List Files',
- description: 'List files in Google Drive',
- defaults: { name: 'Drive List', color: '#0F9D58' },
- inputs: [{
- name: 'main',
- displayName: 'Input',
- type: 'main' as NodeConnectionType,
- description: 'Query input'
- }],
- outputs: [
- {
- name: 'main',
- displayName: 'Output',
- type: 'main' as NodeConnectionType,
- description: 'Files array with metadata'
- },
- {
- name: 'tool',
- displayName: 'Tool',
- type: 'main' as NodeConnectionType,
- description: 'Connect to AI Agent tool handle'
- }
- ],
- properties: [
- ACCOUNT_MODE_PROPERTY,
- CUSTOMER_ID_PROPERTY,
-
- // ===== SEARCH OPTIONS =====
- {
- displayName: 'Folder ID',
- name: 'folder_id',
- type: 'string',
- default: '',
- placeholder: '1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs',
- description: 'List files in this folder (leave empty for all files)'
- },
- {
- displayName: 'Search Query',
- name: 'query',
- type: 'string',
- default: '',
- placeholder: "name contains 'report'",
- description: 'Drive search query (see Google Drive query syntax)'
- },
- {
- displayName: 'File Type',
- name: 'file_types',
- type: 'options',
- options: [
- { name: 'All Files', value: 'all' },
- { name: 'Folders Only', value: 'folder' },
- { name: 'Documents', value: 'document' },
- { name: 'Spreadsheets', value: 'spreadsheet' },
- { name: 'Images', value: 'image' }
- ],
- default: 'all',
- description: 'Filter by file type'
- },
- {
- displayName: 'Max Results',
- name: 'max_results',
- type: 'number',
- default: 20,
- typeOptions: { minValue: 1, maxValue: 1000 },
- description: 'Maximum number of files to return'
- },
- {
- displayName: 'Order By',
- name: 'order_by',
- type: 'options',
- options: [
- { name: 'Last Modified (Newest)', value: 'modifiedTime desc' },
- { name: 'Last Modified (Oldest)', value: 'modifiedTime' },
- { name: 'Created (Newest)', value: 'createdTime desc' },
- { name: 'Created (Oldest)', value: 'createdTime' },
- { name: 'Name (A-Z)', value: 'name' },
- { name: 'Name (Z-A)', value: 'name desc' }
- ],
- default: 'modifiedTime desc',
- description: 'Sort order for files'
- }
- ]
- },
-
- // Drive Share - Share files
- driveShare: {
- displayName: 'Drive Share',
- name: 'driveShare',
- icon: DRIVE_ICON,
- group: ['google', 'tool'],
- version: 1,
- subtitle: 'Share File',
- description: 'Share a file with another user',
- defaults: { name: 'Drive Share', color: '#0F9D58' },
- inputs: [{
- name: 'main',
- displayName: 'Input',
- type: 'main' as NodeConnectionType,
- description: 'Share input'
- }],
- outputs: [
- {
- name: 'main',
- displayName: 'Output',
- type: 'main' as NodeConnectionType,
- description: 'Share result with permission details'
- },
- {
- name: 'tool',
- displayName: 'Tool',
- type: 'main' as NodeConnectionType,
- description: 'Connect to AI Agent tool handle'
- }
- ],
- properties: [
- ACCOUNT_MODE_PROPERTY,
- CUSTOMER_ID_PROPERTY,
-
- // ===== FILE & RECIPIENT =====
- {
- displayName: 'File ID',
- name: 'file_id',
- type: 'string',
- default: '',
- required: true,
- placeholder: '1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs',
- description: 'ID of the file to share'
- },
- {
- displayName: 'Email',
- name: 'email',
- type: 'string',
- default: '',
- required: true,
- placeholder: '[email protected]',
- description: 'Email address to share with'
- },
- {
- displayName: 'Role',
- name: 'role',
- type: 'options',
- options: [
- { name: 'Viewer (read-only)', value: 'reader' },
- { name: 'Commenter (view + comment)', value: 'commenter' },
- { name: 'Editor (full access)', value: 'writer' }
- ],
- default: 'reader',
- description: 'Permission level for the user'
- },
- {
- displayName: 'Send Notification',
- name: 'send_notification',
- type: 'boolean',
- default: true,
- description: 'Send email notification to the user'
- },
- {
- displayName: 'Message',
- name: 'message',
- type: 'string',
- default: '',
- typeOptions: { rows: 2 },
- placeholder: 'Here is the file you requested...',
- description: 'Custom message for the notification email',
- displayOptions: {
- show: { send_notification: [true] }
- }
- }
- ]
- }
-};
-
-// ============================================================================
-// EXPORTS
-// ============================================================================
-
-export const DRIVE_NODE_TYPES = ['driveUpload', 'driveDownload', 'driveList', 'driveShare'];
diff --git a/client/src/nodeDefinitions/gmailNodes.ts b/client/src/nodeDefinitions/gmailNodes.ts
deleted file mode 100644
index 85620b15..00000000
--- a/client/src/nodeDefinitions/gmailNodes.ts
+++ /dev/null
@@ -1,384 +0,0 @@
-// Gmail Node Definitions - Google Gmail API integration via OAuth 2.0
-import {
- INodeTypeDescription,
- NodeConnectionType
-} from '../types/INodeProperties';
-import { GMAIL_ICON } from '../assets/icons/google';
-
-// ============================================================================
-// GMAIL NODES
-// ============================================================================
-
-export const gmailNodes: Record<string, INodeTypeDescription> = {
- // Gmail Send - Send emails
- gmailSend: {
- displayName: 'Gmail Send',
- name: 'gmailSend',
- icon: GMAIL_ICON,
- group: ['social', 'tool'],
- version: 1,
- subtitle: 'Send Email',
- description: 'Send emails via Gmail API',
- defaults: { name: 'Gmail Send', color: '#EA4335' },
- inputs: [{
- name: 'main',
- displayName: 'Input',
- type: 'main' as NodeConnectionType,
- description: 'Email input'
- }],
- outputs: [
- {
- name: 'main',
- displayName: 'Output',
- type: 'main' as NodeConnectionType,
- description: 'Send result (message_id, thread_id)'
- },
- {
- name: 'tool',
- displayName: 'Tool',
- type: 'main' as NodeConnectionType,
- description: 'Connect to AI Agent tool handle'
- }
- ],
- properties: [
- // ===== ACCOUNT MODE =====
- {
- displayName: 'Account',
- name: 'account_mode',
- type: 'options',
- options: [
- { name: 'Owner Account', value: 'owner' },
- { name: 'Customer Account', value: 'customer' }
- ],
- default: 'owner',
- description: 'Which Gmail account to use'
- },
- {
- displayName: 'Customer ID',
- name: 'customer_id',
- type: 'string',
- default: '',
- placeholder: 'customer_123 or {{input.customer_id}}',
- description: 'Customer identifier to look up their Gmail connection',
- displayOptions: {
- show: { account_mode: ['customer'] }
- }
- },
-
- // ===== RECIPIENTS =====
- {
- displayName: 'To',
- name: 'to',
- type: 'string',
- default: '',
- required: true,
- description: 'Recipient email addresses (comma-separated)'
- },
- {
- displayName: 'CC',
- name: 'cc',
- type: 'string',
- default: '',
- placeholder: '[email protected]',
- description: 'CC recipients (optional)'
- },
- {
- displayName: 'BCC',
- name: 'bcc',
- type: 'string',
- default: '',
- placeholder: '[email protected]',
- description: 'BCC recipients (optional)'
- },
-
- // ===== CONTENT =====
- {
- displayName: 'Subject',
- name: 'subject',
- type: 'string',
- default: '',
- required: true,
- placeholder: 'Email subject line',
- description: 'Email subject'
- },
- {
- displayName: 'Body Type',
- name: 'body_type',
- type: 'options',
- options: [
- { name: 'Plain Text', value: 'text' },
- { name: 'HTML', value: 'html' }
- ],
- default: 'text',
- description: 'Email body format'
- },
- {
- displayName: 'Body',
- name: 'body',
- type: 'string',
- default: '',
- required: true,
- typeOptions: { rows: 6 },
- placeholder: 'Email content...',
- description: 'Email body content'
- }
- ]
- },
-
- // Gmail Search - Search emails
- gmailSearch: {
- displayName: 'Gmail Search',
- name: 'gmailSearch',
- icon: GMAIL_ICON,
- group: ['social', 'tool'],
- version: 1,
- subtitle: 'Search Emails',
- description: 'Search emails using Gmail query syntax',
- defaults: { name: 'Gmail Search', color: '#EA4335' },
- inputs: [{
- name: 'main',
- displayName: 'Input',
- type: 'main' as NodeConnectionType,
- description: 'Search input'
- }],
- outputs: [
- {
- name: 'main',
- displayName: 'Output',
- type: 'main' as NodeConnectionType,
- description: 'Search results (messages array)'
- },
- {
- name: 'tool',
- displayName: 'Tool',
- type: 'main' as NodeConnectionType,
- description: 'Connect to AI Agent tool handle'
- }
- ],
- properties: [
- // ===== ACCOUNT MODE =====
- {
- displayName: 'Account',
- name: 'account_mode',
- type: 'options',
- options: [
- { name: 'Owner Account', value: 'owner' },
- { name: 'Customer Account', value: 'customer' }
- ],
- default: 'owner',
- description: 'Which Gmail account to use'
- },
- {
- displayName: 'Customer ID',
- name: 'customer_id',
- type: 'string',
- default: '',
- placeholder: 'customer_123 or {{input.customer_id}}',
- description: 'Customer identifier to look up their Gmail connection',
- displayOptions: {
- show: { account_mode: ['customer'] }
- }
- },
-
- // ===== SEARCH =====
- {
- displayName: 'Search Query',
- name: 'query',
- type: 'string',
- default: '',
- required: true,
- placeholder: 'from:[email protected] subject:meeting',
- description: 'Gmail search query (same syntax as Gmail web)'
- },
- {
- displayName: 'Max Results',
- name: 'max_results',
- type: 'number',
- default: 10,
- typeOptions: { minValue: 1, maxValue: 100 },
- description: 'Maximum number of messages to return'
- },
- {
- displayName: 'Include Body',
- name: 'include_body',
- type: 'boolean',
- default: false,
- description: 'Fetch full message body (slower but includes content)'
- }
- ]
- },
-
- // Gmail Read - Read a specific email
- gmailRead: {
- displayName: 'Gmail Read',
- name: 'gmailRead',
- icon: GMAIL_ICON,
- group: ['social', 'tool'],
- version: 1,
- subtitle: 'Read Email',
- description: 'Read a specific email by message ID',
- defaults: { name: 'Gmail Read', color: '#EA4335' },
- inputs: [{
- name: 'main',
- displayName: 'Input',
- type: 'main' as NodeConnectionType,
- description: 'Message ID input'
- }],
- outputs: [
- {
- name: 'main',
- displayName: 'Output',
- type: 'main' as NodeConnectionType,
- description: 'Email content (from, to, subject, body, attachments)'
- },
- {
- name: 'tool',
- displayName: 'Tool',
- type: 'main' as NodeConnectionType,
- description: 'Connect to AI Agent tool handle'
- }
- ],
- properties: [
- // ===== ACCOUNT MODE =====
- {
- displayName: 'Account',
- name: 'account_mode',
- type: 'options',
- options: [
- { name: 'Owner Account', value: 'owner' },
- { name: 'Customer Account', value: 'customer' }
- ],
- default: 'owner',
- description: 'Which Gmail account to use'
- },
- {
- displayName: 'Customer ID',
- name: 'customer_id',
- type: 'string',
- default: '',
- placeholder: 'customer_123 or {{input.customer_id}}',
- description: 'Customer identifier to look up their Gmail connection',
- displayOptions: {
- show: { account_mode: ['customer'] }
- }
- },
-
- // ===== MESSAGE =====
- {
- displayName: 'Message ID',
- name: 'message_id',
- type: 'string',
- default: '',
- required: true,
- placeholder: '18d5a7e2c3b4f5a6',
- description: 'Gmail message ID to read'
- },
- {
- displayName: 'Format',
- name: 'format',
- type: 'options',
- options: [
- { name: 'Full (with body)', value: 'full' },
- { name: 'Metadata (headers only)', value: 'metadata' },
- { name: 'Minimal', value: 'minimal' },
- { name: 'Raw', value: 'raw' }
- ],
- default: 'full',
- description: 'Message format to retrieve'
- }
- ]
- },
-
- // Gmail Receive - Trigger on incoming emails (polling-based)
- gmailReceive: {
- displayName: 'Gmail Receive',
- name: 'gmailReceive',
- icon: GMAIL_ICON,
- group: ['social', 'trigger'],
- version: 1,
- subtitle: 'On New Email',
- description: 'Trigger workflow on new emails (polling-based)',
- defaults: { name: 'Gmail Receive', color: '#EA4335' },
- inputs: [],
- outputs: [{
- name: 'main',
- displayName: 'Email',
- type: 'main' as NodeConnectionType,
- description: 'Received email (message_id, from, to, subject, body, date, labels, attachments)'
- }],
- properties: [
- // ===== ACCOUNT MODE =====
- {
- displayName: 'Account',
- name: 'account_mode',
- type: 'options',
- options: [
- { name: 'Owner Account', value: 'owner' },
- { name: 'Customer Account', value: 'customer' }
- ],
- default: 'owner',
- description: 'Which Gmail account to monitor'
- },
- {
- displayName: 'Customer ID',
- name: 'customer_id',
- type: 'string',
- default: '',
- placeholder: 'customer_123',
- description: 'Customer identifier for their Gmail connection',
- displayOptions: {
- show: { account_mode: ['customer'] }
- }
- },
-
- // ===== FILTER =====
- {
- displayName: 'Filter Query',
- name: 'filter_query',
- type: 'string',
- default: 'is:unread',
- placeholder: 'from:[email protected] OR label:work',
- description: 'Gmail filter query (same as Gmail search)'
- },
- {
- displayName: 'Label Filter',
- name: 'label_filter',
- type: 'options',
- options: [
- { name: 'All Labels', value: 'all' },
- { name: 'Inbox Only', value: 'INBOX' },
- { name: 'Important', value: 'IMPORTANT' },
- { name: 'Starred', value: 'STARRED' },
- { name: 'Sent', value: 'SENT' },
- { name: 'Drafts', value: 'DRAFT' }
- ],
- default: 'INBOX',
- description: 'Filter by Gmail label'
- },
- {
- displayName: 'Mark as Read',
- name: 'mark_as_read',
- type: 'boolean',
- default: false,
- description: 'Automatically mark emails as read after processing'
- },
-
- // ===== POLLING =====
- {
- displayName: 'Poll Interval (seconds)',
- name: 'poll_interval',
- type: 'number',
- default: 60,
- typeOptions: { minValue: 30, maxValue: 3600 },
- description: 'How often to check for new emails (30s - 1 hour)'
- }
- ]
- }
-};
-
-// ============================================================================
-// EXPORTS
-// ============================================================================
-
-export const GMAIL_NODE_TYPES = ['gmailSend', 'gmailSearch', 'gmailRead', 'gmailReceive'];
diff --git a/client/src/nodeDefinitions/googleWorkspaceNodes.ts b/client/src/nodeDefinitions/googleWorkspaceNodes.ts
new file mode 100644
index 00000000..aa789609
--- /dev/null
+++ b/client/src/nodeDefinitions/googleWorkspaceNodes.ts
@@ -0,0 +1,1529 @@
+// Google Workspace Node Definitions - Consolidated nodes for Gmail, Calendar, Drive, Sheets, Tasks, Contacts
+// Each node uses an operation selector pattern with displayOptions.show for conditional parameters
+import {
+ INodeTypeDescription,
+ NodeConnectionType
+} from '../types/INodeProperties';
+import {
+ GMAIL_ICON,
+ CALENDAR_ICON,
+ DRIVE_ICON,
+ SHEETS_ICON,
+ TASKS_ICON,
+ CONTACTS_ICON
+} from '../assets/icons/google';
+
+// ============================================================================
+// SHARED PROPERTIES
+// ============================================================================
+
+const ACCOUNT_MODE_PROPERTY = {
+ displayName: 'Account',
+ name: 'account_mode',
+ type: 'options' as const,
+ options: [
+ { name: 'Owner Account', value: 'owner' },
+ { name: 'Customer Account', value: 'customer' }
+ ],
+ default: 'owner',
+ description: 'Which Google account to use'
+};
+
+const CUSTOMER_ID_PROPERTY = {
+ displayName: 'Customer ID',
+ name: 'customer_id',
+ type: 'string' as const,
+ default: '',
+ placeholder: 'customer_123 or {{input.customer_id}}',
+ description: 'Customer identifier to look up their Google connection',
+ displayOptions: {
+ show: { account_mode: ['customer'] }
+ }
+};
+
+// ============================================================================
+// GMAIL NODE (Consolidated: send, search, read)
+// ============================================================================
+
+export const gmailNode: INodeTypeDescription = {
+ displayName: 'Gmail',
+ name: 'gmail',
+ icon: GMAIL_ICON,
+ group: ['google', 'tool'],
+ version: 1,
+ subtitle: 'Email Operations',
+ description: 'Send, search, and read emails via Gmail API',
+ defaults: { name: 'Gmail', color: '#EA4335' },
+ inputs: [{
+ name: 'main',
+ displayName: 'Input',
+ type: 'main' as NodeConnectionType,
+ description: 'Input data'
+ }],
+ outputs: [
+ {
+ name: 'main',
+ displayName: 'Output',
+ type: 'main' as NodeConnectionType,
+ description: 'Operation result'
+ },
+ {
+ name: 'tool',
+ displayName: 'Tool',
+ type: 'main' as NodeConnectionType,
+ description: 'Connect to AI Agent tool handle'
+ }
+ ],
+ properties: [
+ // ===== OPERATION SELECTOR =====
+ {
+ displayName: 'Operation',
+ name: 'operation',
+ type: 'options',
+ options: [
+ { name: 'Send Email', value: 'send' },
+ { name: 'Search Emails', value: 'search' },
+ { name: 'Read Email', value: 'read' }
+ ],
+ default: 'send',
+ required: true,
+ description: 'Operation to perform'
+ },
+
+ ACCOUNT_MODE_PROPERTY,
+ CUSTOMER_ID_PROPERTY,
+
+ // ===== SEND PARAMETERS =====
+ {
+ displayName: 'To',
+ name: 'to',
+ type: 'string',
+ default: '',
+ required: true,
+ description: 'Recipient email addresses (comma-separated)',
+ displayOptions: {
+ show: { operation: ['send'] }
+ }
+ },
+ {
+ displayName: 'CC',
+ name: 'cc',
+ type: 'string',
+ default: '',
+ placeholder: '[email protected]',
+ description: 'CC recipients (optional)',
+ displayOptions: {
+ show: { operation: ['send'] }
+ }
+ },
+ {
+ displayName: 'BCC',
+ name: 'bcc',
+ type: 'string',
+ default: '',
+ placeholder: '[email protected]',
+ description: 'BCC recipients (optional)',
+ displayOptions: {
+ show: { operation: ['send'] }
+ }
+ },
+ {
+ displayName: 'Subject',
+ name: 'subject',
+ type: 'string',
+ default: '',
+ required: true,
+ placeholder: 'Email subject line',
+ description: 'Email subject',
+ displayOptions: {
+ show: { operation: ['send'] }
+ }
+ },
+ {
+ displayName: 'Body Type',
+ name: 'body_type',
+ type: 'options',
+ options: [
+ { name: 'Plain Text', value: 'text' },
+ { name: 'HTML', value: 'html' }
+ ],
+ default: 'text',
+ description: 'Email body format',
+ displayOptions: {
+ show: { operation: ['send'] }
+ }
+ },
+ {
+ displayName: 'Body',
+ name: 'body',
+ type: 'string',
+ default: '',
+ required: true,
+ typeOptions: { rows: 6 },
+ placeholder: 'Email content...',
+ description: 'Email body content',
+ displayOptions: {
+ show: { operation: ['send'] }
+ }
+ },
+
+ // ===== SEARCH PARAMETERS =====
+ {
+ displayName: 'Search Query',
+ name: 'query',
+ type: 'string',
+ default: '',
+ required: true,
+ placeholder: 'from:[email protected] subject:meeting',
+ description: 'Gmail search query (same syntax as Gmail web)',
+ displayOptions: {
+ show: { operation: ['search'] }
+ }
+ },
+ {
+ displayName: 'Max Results',
+ name: 'max_results',
+ type: 'number',
+ default: 10,
+ typeOptions: { minValue: 1, maxValue: 100 },
+ description: 'Maximum number of messages to return',
+ displayOptions: {
+ show: { operation: ['search'] }
+ }
+ },
+ {
+ displayName: 'Include Body',
+ name: 'include_body',
+ type: 'boolean',
+ default: false,
+ description: 'Fetch full message body (slower but includes content)',
+ displayOptions: {
+ show: { operation: ['search'] }
+ }
+ },
+
+ // ===== READ PARAMETERS =====
+ {
+ displayName: 'Message ID',
+ name: 'message_id',
+ type: 'string',
+ default: '',
+ required: true,
+ placeholder: '18d5a7e2c3b4f5a6',
+ description: 'Gmail message ID to read',
+ displayOptions: {
+ show: { operation: ['read'] }
+ }
+ },
+ {
+ displayName: 'Format',
+ name: 'format',
+ type: 'options',
+ options: [
+ { name: 'Full (with body)', value: 'full' },
+ { name: 'Metadata (headers only)', value: 'metadata' },
+ { name: 'Minimal', value: 'minimal' },
+ { name: 'Raw', value: 'raw' }
+ ],
+ default: 'full',
+ description: 'Message format to retrieve',
+ displayOptions: {
+ show: { operation: ['read'] }
+ }
+ }
+ ]
+};
+
+// ============================================================================
+// GMAIL RECEIVE NODE (Trigger - kept separate)
+// ============================================================================
+
+export const gmailReceiveNode: INodeTypeDescription = {
+ displayName: 'Gmail Receive',
+ name: 'gmailReceive',
+ icon: GMAIL_ICON,
+ group: ['google', 'trigger'],
+ version: 1,
+ subtitle: 'On New Email',
+ description: 'Trigger workflow on new emails (polling-based)',
+ defaults: { name: 'Gmail Receive', color: '#EA4335' },
+ inputs: [],
+ outputs: [{
+ name: 'main',
+ displayName: 'Email',
+ type: 'main' as NodeConnectionType,
+ description: 'Received email (message_id, from, to, subject, body, date, labels, attachments)'
+ }],
+ properties: [
+ ACCOUNT_MODE_PROPERTY,
+ CUSTOMER_ID_PROPERTY,
+
+ // ===== FILTER =====
+ {
+ displayName: 'Filter Query',
+ name: 'filter_query',
+ type: 'string',
+ default: 'is:unread',
+ placeholder: 'from:[email protected] OR label:work',
+ description: 'Gmail filter query (same as Gmail search)'
+ },
+ {
+ displayName: 'Label Filter',
+ name: 'label_filter',
+ type: 'options',
+ options: [
+ { name: 'All Labels', value: 'all' },
+ { name: 'Inbox Only', value: 'INBOX' },
+ { name: 'Important', value: 'IMPORTANT' },
+ { name: 'Starred', value: 'STARRED' },
+ { name: 'Sent', value: 'SENT' },
+ { name: 'Drafts', value: 'DRAFT' }
+ ],
+ default: 'INBOX',
+ description: 'Filter by Gmail label'
+ },
+ {
+ displayName: 'Mark as Read',
+ name: 'mark_as_read',
+ type: 'boolean',
+ default: false,
+ description: 'Automatically mark emails as read after processing'
+ },
+ {
+ displayName: 'Poll Interval (seconds)',
+ name: 'poll_interval',
+ type: 'number',
+ default: 60,
+ typeOptions: { minValue: 30, maxValue: 3600 },
+ description: 'How often to check for new emails (30s - 1 hour)'
+ }
+ ]
+};
+
+// ============================================================================
+// CALENDAR NODE (Consolidated: create, list, update, delete)
+// ============================================================================
+
+export const calendarNode: INodeTypeDescription = {
+ displayName: 'Calendar',
+ name: 'calendar',
+ icon: CALENDAR_ICON,
+ group: ['google', 'tool'],
+ version: 1,
+ subtitle: 'Calendar Events',
+ description: 'Create, list, update, and delete calendar events via Google Calendar API',
+ defaults: { name: 'Calendar', color: '#4285F4' },
+ inputs: [{
+ name: 'main',
+ displayName: 'Input',
+ type: 'main' as NodeConnectionType,
+ description: 'Input data'
+ }],
+ outputs: [
+ {
+ name: 'main',
+ displayName: 'Output',
+ type: 'main' as NodeConnectionType,
+ description: 'Operation result'
+ },
+ {
+ name: 'tool',
+ displayName: 'Tool',
+ type: 'main' as NodeConnectionType,
+ description: 'Connect to AI Agent tool handle'
+ }
+ ],
+ properties: [
+ // ===== OPERATION SELECTOR =====
+ {
+ displayName: 'Operation',
+ name: 'operation',
+ type: 'options',
+ options: [
+ { name: 'Create Event', value: 'create' },
+ { name: 'List Events', value: 'list' },
+ { name: 'Update Event', value: 'update' },
+ { name: 'Delete Event', value: 'delete' }
+ ],
+ default: 'create',
+ required: true,
+ description: 'Operation to perform'
+ },
+
+ ACCOUNT_MODE_PROPERTY,
+ CUSTOMER_ID_PROPERTY,
+
+ // ===== CALENDAR ID (all operations) =====
+ {
+ displayName: 'Calendar ID',
+ name: 'calendar_id',
+ type: 'string',
+ default: 'primary',
+ placeholder: 'primary or [email protected]',
+ description: 'Calendar ID (use "primary" for main calendar)'
+ },
+
+ // ===== CREATE PARAMETERS =====
+ {
+ displayName: 'Title',
+ name: 'title',
+ type: 'string',
+ default: '',
+ required: true,
+ placeholder: 'Meeting with Team',
+ description: 'Event title/summary',
+ displayOptions: {
+ show: { operation: ['create'] }
+ }
+ },
+ {
+ displayName: 'Start Time',
+ name: 'start_time',
+ type: 'string',
+ default: '',
+ required: true,
+ placeholder: '2026-02-22T14:00:00',
+ description: 'Start time in ISO format (e.g., 2026-02-22T14:00:00)',
+ displayOptions: {
+ show: { operation: ['create'] }
+ }
+ },
+ {
+ displayName: 'End Time',
+ name: 'end_time',
+ type: 'string',
+ default: '',
+ required: true,
+ placeholder: '2026-02-22T15:00:00',
+ description: 'End time in ISO format',
+ displayOptions: {
+ show: { operation: ['create'] }
+ }
+ },
+ {
+ displayName: 'Description',
+ name: 'description',
+ type: 'string',
+ default: '',
+ typeOptions: { rows: 3 },
+ placeholder: 'Meeting agenda and notes...',
+ description: 'Event description (optional)',
+ displayOptions: {
+ show: { operation: ['create'] }
+ }
+ },
+ {
+ displayName: 'Location',
+ name: 'location',
+ type: 'string',
+ default: '',
+ placeholder: 'Conference Room A or https://meet.google.com/...',
+ description: 'Event location (optional)',
+ displayOptions: {
+ show: { operation: ['create'] }
+ }
+ },
+ {
+ displayName: 'Attendees',
+ name: 'attendees',
+ type: 'string',
+ default: '',
+ description: 'Attendee email addresses (comma-separated)',
+ displayOptions: {
+ show: { operation: ['create'] }
+ }
+ },
+ {
+ displayName: 'Timezone',
+ name: 'timezone',
+ type: 'string',
+ default: 'UTC',
+ placeholder: 'America/New_York',
+ description: 'Timezone for the event (e.g., America/New_York, Europe/London)',
+ displayOptions: {
+ show: { operation: ['create'] }
+ }
+ },
+ {
+ displayName: 'Reminder (minutes)',
+ name: 'reminder_minutes',
+ type: 'number',
+ default: 30,
+ typeOptions: { minValue: 0, maxValue: 40320 },
+ description: 'Minutes before event for popup reminder',
+ displayOptions: {
+ show: { operation: ['create'] }
+ }
+ },
+
+ // ===== LIST PARAMETERS =====
+ {
+ displayName: 'Start Date',
+ name: 'start_date',
+ type: 'string',
+ default: 'today',
+ placeholder: 'today or 2026-02-22T00:00:00Z',
+ description: 'Start date for query ("today" or ISO format)',
+ displayOptions: {
+ show: { operation: ['list'] }
+ }
+ },
+ {
+ displayName: 'End Date',
+ name: 'end_date',
+ type: 'string',
+ default: 'today+7d',
+ placeholder: 'today+7d or 2026-02-29T23:59:59Z',
+ description: 'End date ("today+Nd" for N days from now, or ISO format)',
+ displayOptions: {
+ show: { operation: ['list'] }
+ }
+ },
+ {
+ displayName: 'Max Results',
+ name: 'max_results',
+ type: 'number',
+ default: 10,
+ typeOptions: { minValue: 1, maxValue: 250 },
+ description: 'Maximum number of events to return',
+ displayOptions: {
+ show: { operation: ['list'] }
+ }
+ },
+ {
+ displayName: 'Expand Recurring',
+ name: 'single_events',
+ type: 'boolean',
+ default: true,
+ description: 'Expand recurring events into individual instances',
+ displayOptions: {
+ show: { operation: ['list'] }
+ }
+ },
+ {
+ displayName: 'Order By',
+ name: 'order_by',
+ type: 'options',
+ options: [
+ { name: 'Start Time', value: 'startTime' },
+ { name: 'Last Updated', value: 'updated' }
+ ],
+ default: 'startTime',
+ description: 'Sort order for events',
+ displayOptions: {
+ show: { operation: ['list'] }
+ }
+ },
+
+ // ===== UPDATE PARAMETERS =====
+ {
+ displayName: 'Event ID',
+ name: 'event_id',
+ type: 'string',
+ default: '',
+ required: true,
+ placeholder: 'abc123xyz',
+ description: 'ID of the event to update or delete',
+ displayOptions: {
+ show: { operation: ['update', 'delete'] }
+ }
+ },
+ {
+ displayName: 'Title',
+ name: 'update_title',
+ type: 'string',
+ default: '',
+ placeholder: 'New meeting title',
+ description: 'New event title (leave empty to keep current)',
+ displayOptions: {
+ show: { operation: ['update'] }
+ }
+ },
+ {
+ displayName: 'Start Time',
+ name: 'update_start_time',
+ type: 'string',
+ default: '',
+ placeholder: '2026-02-22T14:00:00',
+ description: 'New start time (leave empty to keep current)',
+ displayOptions: {
+ show: { operation: ['update'] }
+ }
+ },
+ {
+ displayName: 'End Time',
+ name: 'update_end_time',
+ type: 'string',
+ default: '',
+ placeholder: '2026-02-22T15:00:00',
+ description: 'New end time (leave empty to keep current)',
+ displayOptions: {
+ show: { operation: ['update'] }
+ }
+ },
+ {
+ displayName: 'Description',
+ name: 'update_description',
+ type: 'string',
+ default: '',
+ typeOptions: { rows: 3 },
+ placeholder: 'Updated description...',
+ description: 'New description (leave empty to keep current)',
+ displayOptions: {
+ show: { operation: ['update'] }
+ }
+ },
+ {
+ displayName: 'Location',
+ name: 'update_location',
+ type: 'string',
+ default: '',
+ placeholder: 'New location',
+ description: 'New location (leave empty to keep current)',
+ displayOptions: {
+ show: { operation: ['update'] }
+ }
+ },
+
+ // ===== DELETE PARAMETERS =====
+ {
+ displayName: 'Send Cancellation',
+ name: 'send_updates',
+ type: 'options',
+ options: [
+ { name: 'Send to All Attendees', value: 'all' },
+ { name: 'Do Not Send', value: 'none' }
+ ],
+ default: 'all',
+ description: 'Send cancellation emails to attendees',
+ displayOptions: {
+ show: { operation: ['delete'] }
+ }
+ }
+ ]
+};
+
+// ============================================================================
+// DRIVE NODE (Consolidated: upload, download, list, share)
+// ============================================================================
+
+export const driveNode: INodeTypeDescription = {
+ displayName: 'Drive',
+ name: 'drive',
+ icon: DRIVE_ICON,
+ group: ['google', 'tool'],
+ version: 1,
+ subtitle: 'File Operations',
+ description: 'Upload, download, list, and share files via Google Drive API',
+ defaults: { name: 'Drive', color: '#0F9D58' },
+ inputs: [{
+ name: 'main',
+ displayName: 'Input',
+ type: 'main' as NodeConnectionType,
+ description: 'Input data'
+ }],
+ outputs: [
+ {
+ name: 'main',
+ displayName: 'Output',
+ type: 'main' as NodeConnectionType,
+ description: 'Operation result'
+ },
+ {
+ name: 'tool',
+ displayName: 'Tool',
+ type: 'main' as NodeConnectionType,
+ description: 'Connect to AI Agent tool handle'
+ }
+ ],
+ properties: [
+ // ===== OPERATION SELECTOR =====
+ {
+ displayName: 'Operation',
+ name: 'operation',
+ type: 'options',
+ options: [
+ { name: 'Upload File', value: 'upload' },
+ { name: 'Download File', value: 'download' },
+ { name: 'List Files', value: 'list' },
+ { name: 'Share File', value: 'share' }
+ ],
+ default: 'list',
+ required: true,
+ description: 'Operation to perform'
+ },
+
+ ACCOUNT_MODE_PROPERTY,
+ CUSTOMER_ID_PROPERTY,
+
+ // ===== UPLOAD PARAMETERS =====
+ {
+ displayName: 'File URL',
+ name: 'file_url',
+ type: 'string',
+ default: '',
+ placeholder: 'https://example.com/document.pdf',
+ description: 'URL to download file from (for remote files)',
+ displayOptions: {
+ show: { operation: ['upload'] }
+ }
+ },
+ {
+ displayName: 'File Content (Base64)',
+ name: 'file_content',
+ type: 'string',
+ default: '',
+ typeOptions: { rows: 3 },
+ placeholder: 'SGVsbG8gV29ybGQh...',
+ description: 'Base64-encoded file content (alternative to URL)',
+ displayOptions: {
+ show: { operation: ['upload'] }
+ }
+ },
+ {
+ displayName: 'Filename',
+ name: 'filename',
+ type: 'string',
+ default: '',
+ required: true,
+ placeholder: 'document.pdf',
+ description: 'Name for the uploaded file',
+ displayOptions: {
+ show: { operation: ['upload'] }
+ }
+ },
+ {
+ displayName: 'MIME Type',
+ name: 'mime_type',
+ type: 'string',
+ default: '',
+ placeholder: 'application/pdf',
+ description: 'File MIME type (auto-detected if empty)',
+ displayOptions: {
+ show: { operation: ['upload'] }
+ }
+ },
+ {
+ displayName: 'Folder ID',
+ name: 'folder_id',
+ type: 'string',
+ default: '',
+ placeholder: '1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs',
+ description: 'Parent folder ID (leave empty for root)',
+ displayOptions: {
+ show: { operation: ['upload', 'list'] }
+ }
+ },
+ {
+ displayName: 'Description',
+ name: 'file_description',
+ type: 'string',
+ default: '',
+ placeholder: 'File description...',
+ description: 'File description (optional)',
+ displayOptions: {
+ show: { operation: ['upload'] }
+ }
+ },
+
+ // ===== DOWNLOAD PARAMETERS =====
+ {
+ displayName: 'File ID',
+ name: 'file_id',
+ type: 'string',
+ default: '',
+ required: true,
+ placeholder: '1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs',
+ description: 'ID of the file to download or share',
+ displayOptions: {
+ show: { operation: ['download', 'share'] }
+ }
+ },
+ {
+ displayName: 'Output Format',
+ name: 'output_format',
+ type: 'options',
+ options: [
+ { name: 'Base64 Content', value: 'base64' },
+ { name: 'Download URL', value: 'url' }
+ ],
+ default: 'base64',
+ description: 'How to return the file content',
+ displayOptions: {
+ show: { operation: ['download'] }
+ }
+ },
+
+ // ===== LIST PARAMETERS =====
+ {
+ displayName: 'Search Query',
+ name: 'query',
+ type: 'string',
+ default: '',
+ placeholder: "name contains 'report'",
+ description: 'Drive search query (see Google Drive query syntax)',
+ displayOptions: {
+ show: { operation: ['list'] }
+ }
+ },
+ {
+ displayName: 'File Type',
+ name: 'file_types',
+ type: 'options',
+ options: [
+ { name: 'All Files', value: 'all' },
+ { name: 'Folders Only', value: 'folder' },
+ { name: 'Documents', value: 'document' },
+ { name: 'Spreadsheets', value: 'spreadsheet' },
+ { name: 'Images', value: 'image' }
+ ],
+ default: 'all',
+ description: 'Filter by file type',
+ displayOptions: {
+ show: { operation: ['list'] }
+ }
+ },
+ {
+ displayName: 'Max Results',
+ name: 'max_results',
+ type: 'number',
+ default: 20,
+ typeOptions: { minValue: 1, maxValue: 1000 },
+ description: 'Maximum number of files to return',
+ displayOptions: {
+ show: { operation: ['list'] }
+ }
+ },
+ {
+ displayName: 'Order By',
+ name: 'order_by',
+ type: 'options',
+ options: [
+ { name: 'Last Modified (Newest)', value: 'modifiedTime desc' },
+ { name: 'Last Modified (Oldest)', value: 'modifiedTime' },
+ { name: 'Created (Newest)', value: 'createdTime desc' },
+ { name: 'Created (Oldest)', value: 'createdTime' },
+ { name: 'Name (A-Z)', value: 'name' },
+ { name: 'Name (Z-A)', value: 'name desc' }
+ ],
+ default: 'modifiedTime desc',
+ description: 'Sort order for files',
+ displayOptions: {
+ show: { operation: ['list'] }
+ }
+ },
+
+ // ===== SHARE PARAMETERS =====
+ {
+ displayName: 'Email',
+ name: 'email',
+ type: 'string',
+ default: '',
+ required: true,
+ placeholder: '[email protected]',
+ description: 'Email address to share with',
+ displayOptions: {
+ show: { operation: ['share'] }
+ }
+ },
+ {
+ displayName: 'Role',
+ name: 'role',
+ type: 'options',
+ options: [
+ { name: 'Viewer (read-only)', value: 'reader' },
+ { name: 'Commenter (view + comment)', value: 'commenter' },
+ { name: 'Editor (full access)', value: 'writer' }
+ ],
+ default: 'reader',
+ description: 'Permission level for the user',
+ displayOptions: {
+ show: { operation: ['share'] }
+ }
+ },
+ {
+ displayName: 'Send Notification',
+ name: 'send_notification',
+ type: 'boolean',
+ default: true,
+ description: 'Send email notification to the user',
+ displayOptions: {
+ show: { operation: ['share'] }
+ }
+ },
+ {
+ displayName: 'Message',
+ name: 'message',
+ type: 'string',
+ default: '',
+ typeOptions: { rows: 2 },
+ placeholder: 'Here is the file you requested...',
+ description: 'Custom message for the notification email',
+ displayOptions: {
+ show: { operation: ['share'], send_notification: [true] }
+ }
+ }
+ ]
+};
+
+// ============================================================================
+// SHEETS NODE (Consolidated: read, write, append)
+// ============================================================================
+
+export const sheetsNode: INodeTypeDescription = {
+ displayName: 'Sheets',
+ name: 'sheets',
+ icon: SHEETS_ICON,
+ group: ['google', 'tool'],
+ version: 1,
+ subtitle: 'Spreadsheet Operations',
+ description: 'Read, write, and append data to Google Sheets',
+ defaults: { name: 'Sheets', color: '#0F9D58' },
+ inputs: [{
+ name: 'main',
+ displayName: 'Input',
+ type: 'main' as NodeConnectionType,
+ description: 'Input data'
+ }],
+ outputs: [
+ {
+ name: 'main',
+ displayName: 'Output',
+ type: 'main' as NodeConnectionType,
+ description: 'Operation result'
+ },
+ {
+ name: 'tool',
+ displayName: 'Tool',
+ type: 'main' as NodeConnectionType,
+ description: 'Connect to AI Agent tool handle'
+ }
+ ],
+ properties: [
+ // ===== OPERATION SELECTOR =====
+ {
+ displayName: 'Operation',
+ name: 'operation',
+ type: 'options',
+ options: [
+ { name: 'Read Data', value: 'read' },
+ { name: 'Write Data', value: 'write' },
+ { name: 'Append Rows', value: 'append' }
+ ],
+ default: 'read',
+ required: true,
+ description: 'Operation to perform'
+ },
+
+ ACCOUNT_MODE_PROPERTY,
+ CUSTOMER_ID_PROPERTY,
+
+ // ===== SPREADSHEET ID (all operations) =====
+ {
+ displayName: 'Spreadsheet ID',
+ name: 'spreadsheet_id',
+ type: 'string',
+ default: '',
+ required: true,
+ placeholder: '1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms',
+ description: 'ID from the spreadsheet URL (between /d/ and /edit)'
+ },
+
+ // ===== RANGE (all operations) =====
+ {
+ displayName: 'Range',
+ name: 'range',
+ type: 'string',
+ default: '',
+ required: true,
+ placeholder: 'Sheet1!A1:D10',
+ description: 'A1 notation range (e.g., "Sheet1!A1:D10" or "A:D")'
+ },
+
+ // ===== READ PARAMETERS =====
+ {
+ displayName: 'Value Render Option',
+ name: 'value_render_option',
+ type: 'options',
+ options: [
+ { name: 'Formatted Value', value: 'FORMATTED_VALUE' },
+ { name: 'Unformatted Value', value: 'UNFORMATTED_VALUE' },
+ { name: 'Formula', value: 'FORMULA' }
+ ],
+ default: 'FORMATTED_VALUE',
+ description: 'How values should be rendered in the output',
+ displayOptions: {
+ show: { operation: ['read'] }
+ }
+ },
+ {
+ displayName: 'Major Dimension',
+ name: 'major_dimension',
+ type: 'options',
+ options: [
+ { name: 'Rows', value: 'ROWS' },
+ { name: 'Columns', value: 'COLUMNS' }
+ ],
+ default: 'ROWS',
+ description: 'Whether to return rows or columns first',
+ displayOptions: {
+ show: { operation: ['read'] }
+ }
+ },
+
+ // ===== WRITE/APPEND PARAMETERS =====
+ {
+ displayName: 'Values',
+ name: 'values',
+ type: 'string',
+ default: '',
+ required: true,
+ typeOptions: { rows: 4 },
+ placeholder: '[["Name", "Age"], ["Alice", 25], ["Bob", 30]]',
+ description: '2D array of values in JSON format or {{input.data}}',
+ displayOptions: {
+ show: { operation: ['write', 'append'] }
+ }
+ },
+ {
+ displayName: 'Value Input Option',
+ name: 'value_input_option',
+ type: 'options',
+ options: [
+ { name: 'User Entered', value: 'USER_ENTERED' },
+ { name: 'Raw', value: 'RAW' }
+ ],
+ default: 'USER_ENTERED',
+ description: 'How input values should be interpreted (USER_ENTERED parses formulas)',
+ displayOptions: {
+ show: { operation: ['write', 'append'] }
+ }
+ },
+ {
+ displayName: 'Insert Data Option',
+ name: 'insert_data_option',
+ type: 'options',
+ options: [
+ { name: 'Insert Rows', value: 'INSERT_ROWS' },
+ { name: 'Overwrite', value: 'OVERWRITE' }
+ ],
+ default: 'INSERT_ROWS',
+ description: 'How the input data should be inserted',
+ displayOptions: {
+ show: { operation: ['append'] }
+ }
+ }
+ ]
+};
+
+// ============================================================================
+// TASKS NODE (Consolidated: create, list, complete, update, delete)
+// ============================================================================
+
+export const tasksNode: INodeTypeDescription = {
+ displayName: 'Tasks',
+ name: 'tasks',
+ icon: TASKS_ICON,
+ group: ['google', 'tool'],
+ version: 1,
+ subtitle: 'Task Management',
+ description: 'Create, list, update, and delete tasks via Google Tasks API',
+ defaults: { name: 'Tasks', color: '#4285F4' },
+ inputs: [{
+ name: 'main',
+ displayName: 'Input',
+ type: 'main' as NodeConnectionType,
+ description: 'Input data'
+ }],
+ outputs: [
+ {
+ name: 'main',
+ displayName: 'Output',
+ type: 'main' as NodeConnectionType,
+ description: 'Operation result'
+ },
+ {
+ name: 'tool',
+ displayName: 'Tool',
+ type: 'main' as NodeConnectionType,
+ description: 'Connect to AI Agent tool handle'
+ }
+ ],
+ properties: [
+ // ===== OPERATION SELECTOR =====
+ {
+ displayName: 'Operation',
+ name: 'operation',
+ type: 'options',
+ options: [
+ { name: 'Create Task', value: 'create' },
+ { name: 'List Tasks', value: 'list' },
+ { name: 'Complete Task', value: 'complete' },
+ { name: 'Update Task', value: 'update' },
+ { name: 'Delete Task', value: 'delete' }
+ ],
+ default: 'create',
+ required: true,
+ description: 'Operation to perform'
+ },
+
+ ACCOUNT_MODE_PROPERTY,
+ CUSTOMER_ID_PROPERTY,
+
+ // ===== TASK LIST ID (all operations) =====
+ {
+ displayName: 'Task List ID',
+ name: 'tasklist_id',
+ type: 'string',
+ default: '@default',
+ placeholder: '@default or specific list ID',
+ description: 'Task list ID (use "@default" for primary list)'
+ },
+
+ // ===== CREATE PARAMETERS =====
+ {
+ displayName: 'Title',
+ name: 'title',
+ type: 'string',
+ default: '',
+ required: true,
+ placeholder: 'Buy groceries',
+ description: 'Task title',
+ displayOptions: {
+ show: { operation: ['create'] }
+ }
+ },
+ {
+ displayName: 'Notes',
+ name: 'notes',
+ type: 'string',
+ default: '',
+ typeOptions: { rows: 3 },
+ placeholder: 'Remember to check the shopping list...',
+ description: 'Task notes/description (optional)',
+ displayOptions: {
+ show: { operation: ['create'] }
+ }
+ },
+ {
+ displayName: 'Due Date',
+ name: 'due_date',
+ type: 'string',
+ default: '',
+ placeholder: '2026-02-25 or 2026-02-25T10:00:00Z',
+ description: 'Due date (YYYY-MM-DD or RFC 3339 format)',
+ displayOptions: {
+ show: { operation: ['create'] }
+ }
+ },
+
+ // ===== LIST PARAMETERS =====
+ {
+ displayName: 'Show Completed',
+ name: 'show_completed',
+ type: 'boolean',
+ default: false,
+ description: 'Include completed tasks in the list',
+ displayOptions: {
+ show: { operation: ['list'] }
+ }
+ },
+ {
+ displayName: 'Show Hidden',
+ name: 'show_hidden',
+ type: 'boolean',
+ default: false,
+ description: 'Include hidden tasks in the list',
+ displayOptions: {
+ show: { operation: ['list'] }
+ }
+ },
+ {
+ displayName: 'Max Results',
+ name: 'max_results',
+ type: 'number',
+ default: 100,
+ typeOptions: { minValue: 1, maxValue: 100 },
+ description: 'Maximum number of tasks to return',
+ displayOptions: {
+ show: { operation: ['list'] }
+ }
+ },
+
+ // ===== TASK ID (complete, update, delete) =====
+ {
+ displayName: 'Task ID',
+ name: 'task_id',
+ type: 'string',
+ default: '',
+ required: true,
+ placeholder: 'abc123xyz',
+ description: 'ID of the task',
+ displayOptions: {
+ show: { operation: ['complete', 'update', 'delete'] }
+ }
+ },
+
+ // ===== UPDATE PARAMETERS =====
+ {
+ displayName: 'Title',
+ name: 'update_title',
+ type: 'string',
+ default: '',
+ placeholder: 'New task title',
+ description: 'New title (leave empty to keep current)',
+ displayOptions: {
+ show: { operation: ['update'] }
+ }
+ },
+ {
+ displayName: 'Notes',
+ name: 'update_notes',
+ type: 'string',
+ default: '',
+ typeOptions: { rows: 3 },
+ placeholder: 'Updated notes...',
+ description: 'New notes (leave empty to keep current)',
+ displayOptions: {
+ show: { operation: ['update'] }
+ }
+ },
+ {
+ displayName: 'Due Date',
+ name: 'update_due_date',
+ type: 'string',
+ default: '',
+ placeholder: '2026-02-25',
+ description: 'New due date (leave empty to keep current)',
+ displayOptions: {
+ show: { operation: ['update'] }
+ }
+ },
+ {
+ displayName: 'Status',
+ name: 'status',
+ type: 'options',
+ options: [
+ { name: 'Keep Current', value: '' },
+ { name: 'Needs Action', value: 'needsAction' },
+ { name: 'Completed', value: 'completed' }
+ ],
+ default: '',
+ description: 'New status',
+ displayOptions: {
+ show: { operation: ['update'] }
+ }
+ }
+ ]
+};
+
+// ============================================================================
+// CONTACTS NODE (Consolidated: create, list, search, get, update, delete)
+// ============================================================================
+
+export const contactsNode: INodeTypeDescription = {
+ displayName: 'Contacts',
+ name: 'contacts',
+ icon: CONTACTS_ICON,
+ group: ['google', 'tool'],
+ version: 1,
+ subtitle: 'Contact Management',
+ description: 'Create, list, search, and manage contacts via Google People API',
+ defaults: { name: 'Contacts', color: '#4285F4' },
+ inputs: [{
+ name: 'main',
+ displayName: 'Input',
+ type: 'main' as NodeConnectionType,
+ description: 'Input data'
+ }],
+ outputs: [
+ {
+ name: 'main',
+ displayName: 'Output',
+ type: 'main' as NodeConnectionType,
+ description: 'Operation result'
+ },
+ {
+ name: 'tool',
+ displayName: 'Tool',
+ type: 'main' as NodeConnectionType,
+ description: 'Connect to AI Agent tool handle'
+ }
+ ],
+ properties: [
+ // ===== OPERATION SELECTOR =====
+ {
+ displayName: 'Operation',
+ name: 'operation',
+ type: 'options',
+ options: [
+ { name: 'Create Contact', value: 'create' },
+ { name: 'List Contacts', value: 'list' },
+ { name: 'Search Contacts', value: 'search' },
+ { name: 'Get Contact', value: 'get' },
+ { name: 'Update Contact', value: 'update' },
+ { name: 'Delete Contact', value: 'delete' }
+ ],
+ default: 'list',
+ required: true,
+ description: 'Operation to perform'
+ },
+
+ ACCOUNT_MODE_PROPERTY,
+ CUSTOMER_ID_PROPERTY,
+
+ // ===== CREATE PARAMETERS =====
+ {
+ displayName: 'First Name',
+ name: 'first_name',
+ type: 'string',
+ default: '',
+ required: true,
+ placeholder: 'John',
+ description: 'First name (required)',
+ displayOptions: {
+ show: { operation: ['create'] }
+ }
+ },
+ {
+ displayName: 'Last Name',
+ name: 'last_name',
+ type: 'string',
+ default: '',
+ placeholder: 'Doe',
+ description: 'Last name (optional)',
+ displayOptions: {
+ show: { operation: ['create'] }
+ }
+ },
+ {
+ displayName: 'Email',
+ name: 'email',
+ type: 'string',
+ default: '',
+ placeholder: '[email protected]',
+ description: 'Email address (optional)',
+ displayOptions: {
+ show: { operation: ['create'] }
+ }
+ },
+ {
+ displayName: 'Phone',
+ name: 'phone',
+ type: 'string',
+ default: '',
+ placeholder: '+1 555-123-4567',
+ description: 'Phone number (optional)',
+ displayOptions: {
+ show: { operation: ['create'] }
+ }
+ },
+ {
+ displayName: 'Company',
+ name: 'company',
+ type: 'string',
+ default: '',
+ placeholder: 'Acme Inc.',
+ description: 'Company/organization name (optional)',
+ displayOptions: {
+ show: { operation: ['create'] }
+ }
+ },
+ {
+ displayName: 'Job Title',
+ name: 'job_title',
+ type: 'string',
+ default: '',
+ placeholder: 'Software Engineer',
+ description: 'Job title (optional)',
+ displayOptions: {
+ show: { operation: ['create'] }
+ }
+ },
+ {
+ displayName: 'Notes',
+ name: 'contact_notes',
+ type: 'string',
+ default: '',
+ typeOptions: { rows: 3 },
+ placeholder: 'Additional notes about this contact...',
+ description: 'Notes/biography (optional)',
+ displayOptions: {
+ show: { operation: ['create'] }
+ }
+ },
+
+ // ===== LIST PARAMETERS =====
+ {
+ displayName: 'Page Size',
+ name: 'page_size',
+ type: 'number',
+ default: 100,
+ typeOptions: { minValue: 1, maxValue: 1000 },
+ description: 'Number of contacts to return',
+ displayOptions: {
+ show: { operation: ['list'] }
+ }
+ },
+ {
+ displayName: 'Sort Order',
+ name: 'sort_order',
+ type: 'options',
+ options: [
+ { name: 'Last Modified (Newest)', value: 'LAST_MODIFIED_DESCENDING' },
+ { name: 'Last Modified (Oldest)', value: 'LAST_MODIFIED_ASCENDING' },
+ { name: 'First Name (A-Z)', value: 'FIRST_NAME_ASCENDING' },
+ { name: 'Last Name (A-Z)', value: 'LAST_NAME_ASCENDING' }
+ ],
+ default: 'LAST_MODIFIED_DESCENDING',
+ description: 'Sort order for contacts',
+ displayOptions: {
+ show: { operation: ['list'] }
+ }
+ },
+ {
+ displayName: 'Page Token',
+ name: 'page_token',
+ type: 'string',
+ default: '',
+ placeholder: 'Next page token from previous request',
+ description: 'Token for pagination (from previous request)',
+ displayOptions: {
+ show: { operation: ['list'] }
+ }
+ },
+
+ // ===== SEARCH PARAMETERS =====
+ {
+ displayName: 'Query',
+ name: 'query',
+ type: 'string',
+ default: '',
+ required: true,
+ placeholder: 'John or [email protected]',
+ description: 'Search query (name, email, phone)',
+ displayOptions: {
+ show: { operation: ['search'] }
+ }
+ },
+ {
+ displayName: 'Max Results',
+ name: 'search_page_size',
+ type: 'number',
+ default: 30,
+ typeOptions: { minValue: 1, maxValue: 100 },
+ description: 'Maximum number of results',
+ displayOptions: {
+ show: { operation: ['search'] }
+ }
+ },
+
+ // ===== GET/UPDATE/DELETE PARAMETERS =====
+ {
+ displayName: 'Resource Name',
+ name: 'resource_name',
+ type: 'string',
+ default: '',
+ required: true,
+ placeholder: 'people/c12345678',
+ description: 'Contact resource name (from list or search results)',
+ displayOptions: {
+ show: { operation: ['get', 'update', 'delete'] }
+ }
+ },
+
+ // ===== UPDATE PARAMETERS =====
+ {
+ displayName: 'First Name',
+ name: 'update_first_name',
+ type: 'string',
+ default: '',
+ placeholder: 'John',
+ description: 'New first name (leave empty to keep current)',
+ displayOptions: {
+ show: { operation: ['update'] }
+ }
+ },
+ {
+ displayName: 'Last Name',
+ name: 'update_last_name',
+ type: 'string',
+ default: '',
+ placeholder: 'Doe',
+ description: 'New last name (leave empty to keep current)',
+ displayOptions: {
+ show: { operation: ['update'] }
+ }
+ },
+ {
+ displayName: 'Email',
+ name: 'update_email',
+ type: 'string',
+ default: '',
+ placeholder: '[email protected]',
+ description: 'New email (leave empty to keep current)',
+ displayOptions: {
+ show: { operation: ['update'] }
+ }
+ },
+ {
+ displayName: 'Phone',
+ name: 'update_phone',
+ type: 'string',
+ default: '',
+ placeholder: '+1 555-123-4567',
+ description: 'New phone (leave empty to keep current)',
+ displayOptions: {
+ show: { operation: ['update'] }
+ }
+ },
+ {
+ displayName: 'Company',
+ name: 'update_company',
+ type: 'string',
+ default: '',
+ placeholder: 'Acme Inc.',
+ description: 'New company (leave empty to keep current)',
+ displayOptions: {
+ show: { operation: ['update'] }
+ }
+ },
+ {
+ displayName: 'Job Title',
+ name: 'update_job_title',
+ type: 'string',
+ default: '',
+ placeholder: 'Software Engineer',
+ description: 'New job title (leave empty to keep current)',
+ displayOptions: {
+ show: { operation: ['update'] }
+ }
+ }
+ ]
+};
+
+// ============================================================================
+// EXPORTS
+// ============================================================================
+
+export const googleWorkspaceNodes: Record<string, INodeTypeDescription> = {
+ gmail: gmailNode,
+ gmailReceive: gmailReceiveNode,
+ calendar: calendarNode,
+ drive: driveNode,
+ sheets: sheetsNode,
+ tasks: tasksNode,
+ contacts: contactsNode
+};
+
+export const GOOGLE_WORKSPACE_NODE_TYPES = [
+ 'gmail',
+ 'gmailReceive',
+ 'calendar',
+ 'drive',
+ 'sheets',
+ 'tasks',
+ 'contacts'
+];
diff --git a/client/src/nodeDefinitions/sheetsNodes.ts b/client/src/nodeDefinitions/sheetsNodes.ts
deleted file mode 100644
index ed3d0809..00000000
--- a/client/src/nodeDefinitions/sheetsNodes.ts
+++ /dev/null
@@ -1,276 +0,0 @@
-// Google Sheets Node Definitions - Google Sheets API integration via OAuth 2.0
-import {
- INodeTypeDescription,
- NodeConnectionType
-} from '../types/INodeProperties';
-import { SHEETS_ICON } from '../assets/icons/google';
-
-// ============================================================================
-// SHARED PROPERTIES
-// ============================================================================
-
-const ACCOUNT_MODE_PROPERTY = {
- displayName: 'Account',
- name: 'account_mode',
- type: 'options' as const,
- options: [
- { name: 'Owner Account', value: 'owner' },
- { name: 'Customer Account', value: 'customer' }
- ],
- default: 'owner',
- description: 'Which Google account to use'
-};
-
-const CUSTOMER_ID_PROPERTY = {
- displayName: 'Customer ID',
- name: 'customer_id',
- type: 'string' as const,
- default: '',
- placeholder: 'customer_123 or {{input.customer_id}}',
- description: 'Customer identifier to look up their Google connection',
- displayOptions: {
- show: { account_mode: ['customer'] }
- }
-};
-
-const SPREADSHEET_ID_PROPERTY = {
- displayName: 'Spreadsheet ID',
- name: 'spreadsheet_id',
- type: 'string' as const,
- default: '',
- required: true,
- placeholder: '1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms',
- description: 'ID from the spreadsheet URL (between /d/ and /edit)'
-};
-
-// ============================================================================
-// SHEETS NODES
-// ============================================================================
-
-export const sheetsNodes: Record<string, INodeTypeDescription> = {
- // Sheets Read - Read data from spreadsheet
- sheetsRead: {
- displayName: 'Sheets Read',
- name: 'sheetsRead',
- icon: SHEETS_ICON,
- group: ['google', 'tool'],
- version: 1,
- subtitle: 'Read Data',
- description: 'Read data from a Google Sheets spreadsheet',
- defaults: { name: 'Sheets Read', color: '#0F9D58' },
- inputs: [{
- name: 'main',
- displayName: 'Input',
- type: 'main' as NodeConnectionType,
- description: 'Query input'
- }],
- outputs: [
- {
- name: 'main',
- displayName: 'Output',
- type: 'main' as NodeConnectionType,
- description: 'Values array with row/column count'
- },
- {
- name: 'tool',
- displayName: 'Tool',
- type: 'main' as NodeConnectionType,
- description: 'Connect to AI Agent tool handle'
- }
- ],
- properties: [
- ACCOUNT_MODE_PROPERTY,
- CUSTOMER_ID_PROPERTY,
- SPREADSHEET_ID_PROPERTY,
-
- // ===== RANGE SELECTION =====
- {
- displayName: 'Range',
- name: 'range',
- type: 'string',
- default: '',
- required: true,
- placeholder: 'Sheet1!A1:D10',
- description: 'A1 notation range (e.g., "Sheet1!A1:D10" or "A:D")'
- },
- {
- displayName: 'Value Render Option',
- name: 'value_render_option',
- type: 'options',
- options: [
- { name: 'Formatted Value', value: 'FORMATTED_VALUE' },
- { name: 'Unformatted Value', value: 'UNFORMATTED_VALUE' },
- { name: 'Formula', value: 'FORMULA' }
- ],
- default: 'FORMATTED_VALUE',
- description: 'How values should be rendered in the output'
- },
- {
- displayName: 'Major Dimension',
- name: 'major_dimension',
- type: 'options',
- options: [
- { name: 'Rows', value: 'ROWS' },
- { name: 'Columns', value: 'COLUMNS' }
- ],
- default: 'ROWS',
- description: 'Whether to return rows or columns first'
- }
- ]
- },
-
- // Sheets Write - Write data to spreadsheet
- sheetsWrite: {
- displayName: 'Sheets Write',
- name: 'sheetsWrite',
- icon: SHEETS_ICON,
- group: ['google', 'tool'],
- version: 1,
- subtitle: 'Write Data',
- description: 'Write data to a Google Sheets spreadsheet',
- defaults: { name: 'Sheets Write', color: '#0F9D58' },
- inputs: [{
- name: 'main',
- displayName: 'Input',
- type: 'main' as NodeConnectionType,
- description: 'Data input'
- }],
- outputs: [
- {
- name: 'main',
- displayName: 'Output',
- type: 'main' as NodeConnectionType,
- description: 'Update confirmation with cell count'
- },
- {
- name: 'tool',
- displayName: 'Tool',
- type: 'main' as NodeConnectionType,
- description: 'Connect to AI Agent tool handle'
- }
- ],
- properties: [
- ACCOUNT_MODE_PROPERTY,
- CUSTOMER_ID_PROPERTY,
- SPREADSHEET_ID_PROPERTY,
-
- // ===== WRITE PARAMETERS =====
- {
- displayName: 'Range',
- name: 'range',
- type: 'string',
- default: '',
- required: true,
- placeholder: 'Sheet1!A1',
- description: 'Starting cell in A1 notation (e.g., "Sheet1!A1")'
- },
- {
- displayName: 'Values',
- name: 'values',
- type: 'string',
- default: '',
- required: true,
- typeOptions: { rows: 4 },
- placeholder: '[["Name", "Age"], ["Alice", 25], ["Bob", 30]]',
- description: '2D array of values in JSON format or {{input.data}}'
- },
- {
- displayName: 'Value Input Option',
- name: 'value_input_option',
- type: 'options',
- options: [
- { name: 'User Entered', value: 'USER_ENTERED' },
- { name: 'Raw', value: 'RAW' }
- ],
- default: 'USER_ENTERED',
- description: 'How input values should be interpreted (USER_ENTERED parses formulas)'
- }
- ]
- },
-
- // Sheets Append - Append rows to spreadsheet
- sheetsAppend: {
- displayName: 'Sheets Append',
- name: 'sheetsAppend',
- icon: SHEETS_ICON,
- group: ['google', 'tool'],
- version: 1,
- subtitle: 'Append Rows',
- description: 'Append rows to the end of a Google Sheets spreadsheet',
- defaults: { name: 'Sheets Append', color: '#0F9D58' },
- inputs: [{
- name: 'main',
- displayName: 'Input',
- type: 'main' as NodeConnectionType,
- description: 'Data input'
- }],
- outputs: [
- {
- name: 'main',
- displayName: 'Output',
- type: 'main' as NodeConnectionType,
- description: 'Append confirmation with updated range'
- },
- {
- name: 'tool',
- displayName: 'Tool',
- type: 'main' as NodeConnectionType,
- description: 'Connect to AI Agent tool handle'
- }
- ],
- properties: [
- ACCOUNT_MODE_PROPERTY,
- CUSTOMER_ID_PROPERTY,
- SPREADSHEET_ID_PROPERTY,
-
- // ===== APPEND PARAMETERS =====
- {
- displayName: 'Range',
- name: 'range',
- type: 'string',
- default: '',
- required: true,
- placeholder: 'Sheet1!A:D',
- description: 'Table range in A1 notation (e.g., "Sheet1!A:D")'
- },
- {
- displayName: 'Values',
- name: 'values',
- type: 'string',
- default: '',
- required: true,
- typeOptions: { rows: 4 },
- placeholder: '[["Alice", 25, "[email protected]"]]',
- description: '2D array of rows to append in JSON format'
- },
- {
- displayName: 'Value Input Option',
- name: 'value_input_option',
- type: 'options',
- options: [
- { name: 'User Entered', value: 'USER_ENTERED' },
- { name: 'Raw', value: 'RAW' }
- ],
- default: 'USER_ENTERED',
- description: 'How input values should be interpreted'
- },
- {
- displayName: 'Insert Data Option',
- name: 'insert_data_option',
- type: 'options',
- options: [
- { name: 'Insert Rows', value: 'INSERT_ROWS' },
- { name: 'Overwrite', value: 'OVERWRITE' }
- ],
- default: 'INSERT_ROWS',
- description: 'How the input data should be inserted'
- }
- ]
- }
-};
-
-// ============================================================================
-// EXPORTS
-// ============================================================================
-
-export const SHEETS_NODE_TYPES = ['sheetsRead', 'sheetsWrite', 'sheetsAppend'];
diff --git a/client/src/nodeDefinitions/tasksNodes.ts b/client/src/nodeDefinitions/tasksNodes.ts
deleted file mode 100644
index b4ed302e..00000000
--- a/client/src/nodeDefinitions/tasksNodes.ts
+++ /dev/null
@@ -1,364 +0,0 @@
-// Google Tasks Node Definitions - Google Tasks API integration via OAuth 2.0
-import {
- INodeTypeDescription,
- NodeConnectionType
-} from '../types/INodeProperties';
-import { TASKS_ICON } from '../assets/icons/google';
-
-// ============================================================================
-// SHARED PROPERTIES
-// ============================================================================
-
-const ACCOUNT_MODE_PROPERTY = {
- displayName: 'Account',
- name: 'account_mode',
- type: 'options' as const,
- options: [
- { name: 'Owner Account', value: 'owner' },
- { name: 'Customer Account', value: 'customer' }
- ],
- default: 'owner',
- description: 'Which Google account to use'
-};
-
-const CUSTOMER_ID_PROPERTY = {
- displayName: 'Customer ID',
- name: 'customer_id',
- type: 'string' as const,
- default: '',
- placeholder: 'customer_123 or {{input.customer_id}}',
- description: 'Customer identifier to look up their Google connection',
- displayOptions: {
- show: { account_mode: ['customer'] }
- }
-};
-
-const TASKLIST_ID_PROPERTY = {
- displayName: 'Task List ID',
- name: 'tasklist_id',
- type: 'string' as const,
- default: '@default',
- placeholder: '@default or specific list ID',
- description: 'Task list ID (use "@default" for primary list)'
-};
-
-// ============================================================================
-// TASKS NODES
-// ============================================================================
-
-export const tasksNodes: Record<string, INodeTypeDescription> = {
- // Tasks Create - Create a new task
- tasksCreate: {
- displayName: 'Tasks Create',
- name: 'tasksCreate',
- icon: TASKS_ICON,
- group: ['google', 'tool'],
- version: 1,
- subtitle: 'Create Task',
- description: 'Create a new task in Google Tasks',
- defaults: { name: 'Tasks Create', color: '#4285F4' },
- inputs: [{
- name: 'main',
- displayName: 'Input',
- type: 'main' as NodeConnectionType,
- description: 'Task input'
- }],
- outputs: [
- {
- name: 'main',
- displayName: 'Output',
- type: 'main' as NodeConnectionType,
- description: 'Created task (task_id, title, status)'
- },
- {
- name: 'tool',
- displayName: 'Tool',
- type: 'main' as NodeConnectionType,
- description: 'Connect to AI Agent tool handle'
- }
- ],
- properties: [
- ACCOUNT_MODE_PROPERTY,
- CUSTOMER_ID_PROPERTY,
-
- // ===== TASK DETAILS =====
- {
- displayName: 'Title',
- name: 'title',
- type: 'string',
- default: '',
- required: true,
- placeholder: 'Buy groceries',
- description: 'Task title'
- },
- {
- displayName: 'Notes',
- name: 'notes',
- type: 'string',
- default: '',
- typeOptions: { rows: 3 },
- placeholder: 'Remember to check the shopping list...',
- description: 'Task notes/description (optional)'
- },
- {
- displayName: 'Due Date',
- name: 'due_date',
- type: 'string',
- default: '',
- placeholder: '2026-02-25 or 2026-02-25T10:00:00Z',
- description: 'Due date (YYYY-MM-DD or RFC 3339 format)'
- },
- TASKLIST_ID_PROPERTY
- ]
- },
-
- // Tasks List - List tasks
- tasksList: {
- displayName: 'Tasks List',
- name: 'tasksList',
- icon: TASKS_ICON,
- group: ['google', 'tool'],
- version: 1,
- subtitle: 'List Tasks',
- description: 'List tasks from a Google Tasks list',
- defaults: { name: 'Tasks List', color: '#4285F4' },
- inputs: [{
- name: 'main',
- displayName: 'Input',
- type: 'main' as NodeConnectionType,
- description: 'Query input'
- }],
- outputs: [
- {
- name: 'main',
- displayName: 'Output',
- type: 'main' as NodeConnectionType,
- description: 'Tasks array with count'
- },
- {
- name: 'tool',
- displayName: 'Tool',
- type: 'main' as NodeConnectionType,
- description: 'Connect to AI Agent tool handle'
- }
- ],
- properties: [
- ACCOUNT_MODE_PROPERTY,
- CUSTOMER_ID_PROPERTY,
- TASKLIST_ID_PROPERTY,
-
- // ===== LIST OPTIONS =====
- {
- displayName: 'Show Completed',
- name: 'show_completed',
- type: 'boolean',
- default: false,
- description: 'Include completed tasks in the list'
- },
- {
- displayName: 'Show Hidden',
- name: 'show_hidden',
- type: 'boolean',
- default: false,
- description: 'Include hidden tasks in the list'
- },
- {
- displayName: 'Max Results',
- name: 'max_results',
- type: 'number',
- default: 100,
- typeOptions: { minValue: 1, maxValue: 100 },
- description: 'Maximum number of tasks to return'
- }
- ]
- },
-
- // Tasks Complete - Mark task as completed
- tasksComplete: {
- displayName: 'Tasks Complete',
- name: 'tasksComplete',
- icon: TASKS_ICON,
- group: ['google', 'tool'],
- version: 1,
- subtitle: 'Complete Task',
- description: 'Mark a task as completed',
- defaults: { name: 'Tasks Complete', color: '#4285F4' },
- inputs: [{
- name: 'main',
- displayName: 'Input',
- type: 'main' as NodeConnectionType,
- description: 'Task input'
- }],
- outputs: [
- {
- name: 'main',
- displayName: 'Output',
- type: 'main' as NodeConnectionType,
- description: 'Completed task confirmation'
- },
- {
- name: 'tool',
- displayName: 'Tool',
- type: 'main' as NodeConnectionType,
- description: 'Connect to AI Agent tool handle'
- }
- ],
- properties: [
- ACCOUNT_MODE_PROPERTY,
- CUSTOMER_ID_PROPERTY,
-
- // ===== TASK IDENTIFICATION =====
- {
- displayName: 'Task ID',
- name: 'task_id',
- type: 'string',
- default: '',
- required: true,
- placeholder: 'abc123xyz',
- description: 'ID of the task to mark as completed'
- },
- TASKLIST_ID_PROPERTY
- ]
- },
-
- // Tasks Update - Update an existing task
- tasksUpdate: {
- displayName: 'Tasks Update',
- name: 'tasksUpdate',
- icon: TASKS_ICON,
- group: ['google', 'tool'],
- version: 1,
- subtitle: 'Update Task',
- description: 'Update an existing task',
- defaults: { name: 'Tasks Update', color: '#4285F4' },
- inputs: [{
- name: 'main',
- displayName: 'Input',
- type: 'main' as NodeConnectionType,
- description: 'Update input'
- }],
- outputs: [
- {
- name: 'main',
- displayName: 'Output',
- type: 'main' as NodeConnectionType,
- description: 'Updated task details'
- },
- {
- name: 'tool',
- displayName: 'Tool',
- type: 'main' as NodeConnectionType,
- description: 'Connect to AI Agent tool handle'
- }
- ],
- properties: [
- ACCOUNT_MODE_PROPERTY,
- CUSTOMER_ID_PROPERTY,
-
- // ===== TASK IDENTIFICATION =====
- {
- displayName: 'Task ID',
- name: 'task_id',
- type: 'string',
- default: '',
- required: true,
- placeholder: 'abc123xyz',
- description: 'ID of the task to update'
- },
-
- // ===== FIELDS TO UPDATE =====
- {
- displayName: 'Title',
- name: 'title',
- type: 'string',
- default: '',
- placeholder: 'New task title',
- description: 'New title (leave empty to keep current)'
- },
- {
- displayName: 'Notes',
- name: 'notes',
- type: 'string',
- default: '',
- typeOptions: { rows: 3 },
- placeholder: 'Updated notes...',
- description: 'New notes (leave empty to keep current)'
- },
- {
- displayName: 'Due Date',
- name: 'due_date',
- type: 'string',
- default: '',
- placeholder: '2026-02-25',
- description: 'New due date (leave empty to keep current)'
- },
- {
- displayName: 'Status',
- name: 'status',
- type: 'options',
- options: [
- { name: 'Keep Current', value: '' },
- { name: 'Needs Action', value: 'needsAction' },
- { name: 'Completed', value: 'completed' }
- ],
- default: '',
- description: 'New status'
- },
- TASKLIST_ID_PROPERTY
- ]
- },
-
- // Tasks Delete - Delete a task
- tasksDelete: {
- displayName: 'Tasks Delete',
- name: 'tasksDelete',
- icon: TASKS_ICON,
- group: ['google', 'tool'],
- version: 1,
- subtitle: 'Delete Task',
- description: 'Delete a task from Google Tasks',
- defaults: { name: 'Tasks Delete', color: '#4285F4' },
- inputs: [{
- name: 'main',
- displayName: 'Input',
- type: 'main' as NodeConnectionType,
- description: 'Delete input'
- }],
- outputs: [
- {
- name: 'main',
- displayName: 'Output',
- type: 'main' as NodeConnectionType,
- description: 'Deletion confirmation'
- },
- {
- name: 'tool',
- displayName: 'Tool',
- type: 'main' as NodeConnectionType,
- description: 'Connect to AI Agent tool handle'
- }
- ],
- properties: [
- ACCOUNT_MODE_PROPERTY,
- CUSTOMER_ID_PROPERTY,
-
- // ===== TASK IDENTIFICATION =====
- {
- displayName: 'Task ID',
- name: 'task_id',
- type: 'string',
- default: '',
- required: true,
- placeholder: 'abc123xyz',
- description: 'ID of the task to delete'
- },
- TASKLIST_ID_PROPERTY
- ]
- }
-};
-
-// ============================================================================
-// EXPORTS
-// ============================================================================
-
-export const TASKS_NODE_TYPES = ['tasksCreate', 'tasksList', 'tasksComplete', 'tasksUpdate', 'tasksDelete'];
diff --git a/server/services/ai.py b/server/services/ai.py
index 3cd48184..f9d185c9 100644
--- a/server/services/ai.py
+++ b/server/services/ai.py
@@ -2405,6 +2405,13 @@ class AIService:
'environmentalSensors': 'android_environmental_sensors',
'cameraControl': 'android_camera',
'mediaControl': 'android_media',
+ # Google Workspace (consolidated nodes)
+ 'gmail': 'google_gmail',
+ 'calendar': 'google_calendar',
+ 'drive': 'google_drive',
+ 'sheets': 'google_sheets',
+ 'tasks': 'google_tasks',
+ 'contacts': 'google_contacts',
}
DEFAULT_TOOL_DESCRIPTIONS = {
'calculatorTool': 'Perform mathematical calculations. Operations: add, subtract, multiply, divide, power, sqrt, mod, abs',
@@ -2457,6 +2464,13 @@ class AIService:
'environmentalSensors': 'Read Android environmental sensors - temperature, humidity, pressure, light.',
'cameraControl': 'Control Android camera - get info, take photos, camera capabilities.',
'mediaControl': 'Control Android media playback - volume, playback control, play media files.',
+ # Google Workspace (consolidated nodes)
+ 'gmail': 'Send, search, and read emails via Gmail. Operations: send (compose email), search (find emails by query), read (get email by ID).',
+ 'calendar': 'Manage Google Calendar events. Operations: create (new event), list (events in date range), update (modify event), delete (remove event).',
+ 'drive': 'Manage Google Drive files. Operations: upload (add file from URL), download (get file by ID), list (find files), share (share with user).',
+ 'sheets': 'Read and write Google Sheets data. Operations: read (get range), write (set range), append (add rows).',
+ 'tasks': 'Manage Google Tasks. Operations: create (new task), list (find tasks), complete (mark done), update (modify task), delete (remove task).',
+ 'contacts': 'Manage Google Contacts. Operations: create (new contact), list (browse), search (find by name/email/phone), get (details by resource name), update (modify), delete (remove).',
}
try:
@@ -3050,571 +3064,186 @@ class AIService:
return TwitterUserSchema
- # Gmail Send tool schema (dual-purpose: workflow node + AI tool)
- if node_type == 'gmailSend':
- class GmailSendSchema(BaseModel):
- """Send emails via Gmail. Supports text and HTML body types."""
- to: str = Field(
- description="Recipient email address(es), comma-separated for multiple"
- )
- subject: str = Field(
- description="Email subject line"
- )
- body: str = Field(
- description="Email body content"
- )
- cc: Optional[str] = Field(
- default=None,
- description="CC recipients, comma-separated"
- )
- bcc: Optional[str] = Field(
- default=None,
- description="BCC recipients, comma-separated"
- )
- body_type: str = Field(
- default="text",
- description="Body type: 'text' (plain text) or 'html'"
- )
-
- return GmailSendSchema
-
- # Gmail Search tool schema (dual-purpose: workflow node + AI tool)
- if node_type == 'gmailSearch':
- class GmailSearchSchema(BaseModel):
- """Search emails in Gmail inbox using Gmail query syntax."""
- query: str = Field(
- description="Gmail search query (same syntax as Gmail web). Examples: 'from:[email protected]', 'subject:meeting', 'is:unread', 'has:attachment'"
- )
- max_results: int = Field(
- default=10,
- description="Maximum number of messages to return (1-100)"
- )
- include_body: bool = Field(
- default=False,
- description="Whether to fetch full message body (slower but more complete)"
- )
-
- return GmailSearchSchema
-
- # Gmail Read tool schema (dual-purpose: workflow node + AI tool)
- if node_type == 'gmailRead':
- class GmailReadSchema(BaseModel):
- """Read a specific email message by its ID."""
- message_id: str = Field(
- description="The Gmail message ID to read"
- )
- format: str = Field(
- default="full",
- description="Format: 'full' (complete message), 'minimal' (IDs only), 'raw' (RFC 2822), 'metadata' (headers only)"
- )
-
- return GmailReadSchema
-
- # ============================================================================
- # GOOGLE CALENDAR TOOL SCHEMAS
- # ============================================================================
-
- # Calendar Create tool schema (dual-purpose: workflow node + AI tool)
- if node_type == 'calendarCreate':
- class CalendarCreateSchema(BaseModel):
- """Create a new event in Google Calendar."""
- title: str = Field(
- description="Event title/summary"
- )
- start_time: str = Field(
- description="Start time in ISO 8601 format (e.g., '2026-02-22T14:00:00') or date only for all-day (e.g., '2026-02-22')"
- )
- end_time: str = Field(
- description="End time in ISO 8601 format or date only for all-day events"
- )
- description: Optional[str] = Field(
- default=None,
- description="Event description/notes"
- )
- location: Optional[str] = Field(
- default=None,
- description="Event location (address or place name)"
- )
- attendees: Optional[str] = Field(
- default=None,
- description="Comma-separated list of attendee email addresses"
- )
- timezone: str = Field(
- default="UTC",
- description="Timezone for the event (e.g., 'America/New_York', 'Europe/London')"
- )
- calendar_id: str = Field(
- default="primary",
- description="Calendar ID (use 'primary' for main calendar)"
- )
- send_updates: str = Field(
- default="none",
- description="Send update notifications: 'all', 'externalOnly', or 'none'"
- )
-
- return CalendarCreateSchema
-
- # Calendar List tool schema (dual-purpose: workflow node + AI tool)
- if node_type == 'calendarList':
- class CalendarListSchema(BaseModel):
- """List events from Google Calendar within a date range."""
- start_date: str = Field(
- description="Start date in ISO 8601 format (e.g., '2026-02-22' or '2026-02-22T00:00:00Z')"
- )
- end_date: str = Field(
- description="End date in ISO 8601 format"
- )
- calendar_id: str = Field(
- default="primary",
- description="Calendar ID (use 'primary' for main calendar)"
- )
- max_results: int = Field(
- default=50,
- description="Maximum number of events to return (1-2500)"
- )
- query: Optional[str] = Field(
- default=None,
- description="Free text search query to filter events"
- )
-
- return CalendarListSchema
-
- # Calendar Update tool schema (dual-purpose: workflow node + AI tool)
- if node_type == 'calendarUpdate':
- class CalendarUpdateSchema(BaseModel):
- """Update an existing Google Calendar event."""
- event_id: str = Field(
- description="The event ID to update"
- )
- title: Optional[str] = Field(
- default=None,
- description="New event title (leave empty to keep current)"
- )
- start_time: Optional[str] = Field(
- default=None,
- description="New start time in ISO 8601 format (leave empty to keep current)"
- )
- end_time: Optional[str] = Field(
- default=None,
- description="New end time in ISO 8601 format (leave empty to keep current)"
- )
- description: Optional[str] = Field(
- default=None,
- description="New description (leave empty to keep current)"
- )
- location: Optional[str] = Field(
- default=None,
- description="New location (leave empty to keep current)"
- )
- calendar_id: str = Field(
- default="primary",
- description="Calendar ID"
- )
- send_updates: str = Field(
- default="none",
- description="Send update notifications: 'all', 'externalOnly', or 'none'"
- )
-
- return CalendarUpdateSchema
-
- # Calendar Delete tool schema (dual-purpose: workflow node + AI tool)
- if node_type == 'calendarDelete':
- class CalendarDeleteSchema(BaseModel):
- """Delete an event from Google Calendar."""
- event_id: str = Field(
- description="The event ID to delete"
- )
- calendar_id: str = Field(
- default="primary",
- description="Calendar ID"
- )
- send_updates: str = Field(
- default="none",
- description="Send cancellation notifications: 'all', 'externalOnly', or 'none'"
- )
-
- return CalendarDeleteSchema
-
- # ============================================================================
- # GOOGLE DRIVE TOOL SCHEMAS
- # ============================================================================
-
- # Drive Upload tool schema (dual-purpose: workflow node + AI tool)
- if node_type == 'driveUpload':
- class DriveUploadSchema(BaseModel):
- """Upload a file to Google Drive."""
- file_url: str = Field(
- description="URL of the file to upload (will be downloaded and uploaded to Drive)"
- )
- filename: Optional[str] = Field(
- default=None,
- description="Custom filename for the uploaded file (optional, auto-detected from URL)"
- )
- folder_id: Optional[str] = Field(
- default=None,
- description="Parent folder ID (omit for root Drive folder)"
- )
- mime_type: Optional[str] = Field(
- default=None,
- description="MIME type (e.g., 'application/pdf'). Auto-detected if not specified."
- )
-
- return DriveUploadSchema
-
- # Drive Download tool schema (dual-purpose: workflow node + AI tool)
- if node_type == 'driveDownload':
- class DriveDownloadSchema(BaseModel):
- """Download a file from Google Drive."""
- file_id: str = Field(
- description="The Drive file ID to download"
- )
-
- return DriveDownloadSchema
-
- # Drive List tool schema (dual-purpose: workflow node + AI tool)
- if node_type == 'driveList':
- class DriveListSchema(BaseModel):
- """List files in Google Drive."""
- folder_id: Optional[str] = Field(
- default=None,
- description="Folder ID to list files from (omit for root or all files)"
- )
- query: Optional[str] = Field(
- default=None,
- description="Drive search query (e.g., \"name contains 'report'\" or \"mimeType='application/pdf'\")"
- )
- max_results: int = Field(
- default=100,
- description="Maximum number of files to return (1-1000)"
- )
- file_types: Optional[str] = Field(
- default=None,
- description="Filter by file type: 'documents', 'spreadsheets', 'presentations', 'pdfs', 'images', 'videos'"
- )
-
- return DriveListSchema
-
- # Drive Share tool schema (dual-purpose: workflow node + AI tool)
- if node_type == 'driveShare':
- class DriveShareSchema(BaseModel):
- """Share a Google Drive file with someone."""
- file_id: str = Field(
- description="The Drive file ID to share"
- )
- email: str = Field(
- description="Email address to share with"
- )
- role: str = Field(
- default="reader",
- description="Permission role: 'reader', 'writer', or 'commenter'"
- )
- send_notification: bool = Field(
- default=True,
- description="Whether to send an email notification to the user"
- )
-
- return DriveShareSchema
-
# ============================================================================
- # GOOGLE SHEETS TOOL SCHEMAS
+ # GOOGLE WORKSPACE CONSOLIDATED TOOL SCHEMAS
# ============================================================================
- # Sheets Read tool schema (dual-purpose: workflow node + AI tool)
- if node_type == 'sheetsRead':
- class SheetsReadSchema(BaseModel):
- """Read data from a Google Sheets spreadsheet."""
- spreadsheet_id: str = Field(
- description="Spreadsheet ID (from the URL, between /d/ and /edit)"
- )
- range: str = Field(
- description="A1 notation range (e.g., 'Sheet1!A1:D10' or 'A:D' for entire columns)"
- )
- value_render_option: str = Field(
- default="FORMATTED_VALUE",
- description="How values are rendered: 'FORMATTED_VALUE', 'UNFORMATTED_VALUE', or 'FORMULA'"
- )
- major_dimension: str = Field(
- default="ROWS",
- description="Whether to return rows or columns first: 'ROWS' or 'COLUMNS'"
- )
-
- return SheetsReadSchema
+ if node_type == 'gmail':
+ class GoogleGmailSchema(BaseModel):
+ """Send, search, and read emails via Gmail.
- # Sheets Write tool schema (dual-purpose: workflow node + AI tool)
- if node_type == 'sheetsWrite':
- class SheetsWriteSchema(BaseModel):
- """Write data to a Google Sheets spreadsheet."""
- spreadsheet_id: str = Field(
- description="Spreadsheet ID (from the URL)"
- )
- range: str = Field(
- description="Starting cell in A1 notation (e.g., 'Sheet1!A1')"
- )
- values: str = Field(
- description="2D array of values as JSON string (e.g., '[[\"Name\", \"Age\"], [\"Alice\", 25]]')"
- )
- value_input_option: str = Field(
- default="USER_ENTERED",
- description="How input is interpreted: 'USER_ENTERED' (parses formulas) or 'RAW'"
- )
-
- return SheetsWriteSchema
-
- # Sheets Append tool schema (dual-purpose: workflow node + AI tool)
- if node_type == 'sheetsAppend':
- class SheetsAppendSchema(BaseModel):
- """Append rows to a Google Sheets spreadsheet."""
- spreadsheet_id: str = Field(
- description="Spreadsheet ID (from the URL)"
- )
- range: str = Field(
- description="Table range in A1 notation (e.g., 'Sheet1!A:D')"
- )
- values: str = Field(
- description="2D array of rows to append as JSON string (e.g., '[[\"Alice\", 25, \"[email protected]\"]]')"
- )
- value_input_option: str = Field(
- default="USER_ENTERED",
- description="How input is interpreted: 'USER_ENTERED' or 'RAW'"
- )
- insert_data_option: str = Field(
- default="INSERT_ROWS",
- description="How data is inserted: 'INSERT_ROWS' or 'OVERWRITE'"
- )
-
- return SheetsAppendSchema
-
- # ============================================================================
- # GOOGLE TASKS TOOL SCHEMAS
- # ============================================================================
-
- # Tasks Create tool schema (dual-purpose: workflow node + AI tool)
- if node_type == 'tasksCreate':
- class TasksCreateSchema(BaseModel):
- """Create a new task in Google Tasks."""
- title: str = Field(
- description="Task title (required)"
- )
- notes: Optional[str] = Field(
- default=None,
- description="Task notes/description"
- )
- due_date: Optional[str] = Field(
- default=None,
- description="Due date in ISO 8601 format (e.g., '2026-02-25' or '2026-02-25T14:00:00Z')"
- )
- tasklist_id: str = Field(
- default="@default",
- description="Task list ID (use '@default' for the default list)"
- )
-
- return TasksCreateSchema
-
- # Tasks List tool schema (dual-purpose: workflow node + AI tool)
- if node_type == 'tasksList':
- class TasksListSchema(BaseModel):
- """List tasks from Google Tasks."""
- tasklist_id: str = Field(
- default="@default",
- description="Task list ID (use '@default' for the default list)"
- )
- show_completed: bool = Field(
- default=False,
- description="Include completed tasks"
- )
- show_hidden: bool = Field(
- default=False,
- description="Include hidden tasks"
- )
- max_results: int = Field(
- default=100,
- description="Maximum number of tasks to return"
- )
-
- return TasksListSchema
-
- # Tasks Complete tool schema (dual-purpose: workflow node + AI tool)
- if node_type == 'tasksComplete':
- class TasksCompleteSchema(BaseModel):
- """Mark a Google Task as completed."""
- task_id: str = Field(
- description="The task ID to mark as completed"
- )
- tasklist_id: str = Field(
- default="@default",
- description="Task list ID"
- )
-
- return TasksCompleteSchema
-
- # Tasks Update tool schema (dual-purpose: workflow node + AI tool)
- if node_type == 'tasksUpdate':
- class TasksUpdateSchema(BaseModel):
- """Update an existing Google Task."""
- task_id: str = Field(
- description="The task ID to update"
- )
- tasklist_id: str = Field(
- default="@default",
- description="Task list ID"
- )
- title: Optional[str] = Field(
- default=None,
- description="New task title (leave empty to keep current)"
- )
- notes: Optional[str] = Field(
- default=None,
- description="New task notes (leave empty to keep current)"
- )
- due_date: Optional[str] = Field(
- default=None,
- description="New due date in ISO 8601 format (leave empty to keep current)"
- )
- status: Optional[str] = Field(
- default=None,
- description="New status: 'needsAction' or 'completed'"
- )
-
- return TasksUpdateSchema
-
- # Tasks Delete tool schema (dual-purpose: workflow node + AI tool)
- if node_type == 'tasksDelete':
- class TasksDeleteSchema(BaseModel):
- """Delete a task from Google Tasks."""
- task_id: str = Field(
- description="The task ID to delete"
- )
- tasklist_id: str = Field(
- default="@default",
- description="Task list ID"
- )
-
- return TasksDeleteSchema
-
- # ============================================================================
- # GOOGLE CONTACTS (PEOPLE API) TOOL SCHEMAS
- # ============================================================================
-
- # Contacts Create tool schema (dual-purpose: workflow node + AI tool)
- if node_type == 'contactsCreate':
- class ContactsCreateSchema(BaseModel):
- """Create a new contact in Google Contacts."""
- first_name: str = Field(
- description="Contact's first name (required)"
- )
- last_name: Optional[str] = Field(
- default=None,
- description="Contact's last name"
- )
- email: Optional[str] = Field(
- default=None,
- description="Email address"
- )
- phone: Optional[str] = Field(
- default=None,
- description="Phone number"
- )
- company: Optional[str] = Field(
- default=None,
- description="Company/organization name"
- )
- job_title: Optional[str] = Field(
- default=None,
- description="Job title"
- )
- notes: Optional[str] = Field(
- default=None,
- description="Notes about the contact"
- )
-
- return ContactsCreateSchema
-
- # Contacts List tool schema (dual-purpose: workflow node + AI tool)
- if node_type == 'contactsList':
- class ContactsListSchema(BaseModel):
- """List contacts from Google Contacts."""
- page_size: int = Field(
- default=100,
- description="Number of contacts to return (1-1000)"
- )
- sort_order: str = Field(
- default="LAST_MODIFIED_DESCENDING",
- description="Sort order: 'LAST_MODIFIED_DESCENDING', 'LAST_MODIFIED_ASCENDING', 'FIRST_NAME_ASCENDING', 'LAST_NAME_ASCENDING'"
- )
- page_token: Optional[str] = Field(
- default=None,
- description="Token for pagination (from previous request)"
- )
-
- return ContactsListSchema
-
- # Contacts Search tool schema (dual-purpose: workflow node + AI tool)
- if node_type == 'contactsSearch':
- class ContactsSearchSchema(BaseModel):
- """Search contacts in Google Contacts by name, email, or phone."""
- query: str = Field(
- description="Search query (name, email, or phone number)"
- )
- page_size: int = Field(
- default=30,
- description="Maximum number of results (1-100)"
- )
-
- return ContactsSearchSchema
-
- # Contacts Get tool schema (dual-purpose: workflow node + AI tool)
- if node_type == 'contactsGet':
- class ContactsGetSchema(BaseModel):
- """Get a specific contact by resource name."""
- resource_name: str = Field(
- description="Contact resource name (e.g., 'people/c12345678')"
- )
-
- return ContactsGetSchema
-
- # Contacts Update tool schema (dual-purpose: workflow node + AI tool)
- if node_type == 'contactsUpdate':
- class ContactsUpdateSchema(BaseModel):
- """Update an existing contact in Google Contacts."""
- resource_name: str = Field(
- description="Contact resource name to update (e.g., 'people/c12345678')"
- )
- first_name: Optional[str] = Field(
- default=None,
- description="New first name (leave empty to keep current)"
- )
- last_name: Optional[str] = Field(
- default=None,
- description="New last name (leave empty to keep current)"
- )
- email: Optional[str] = Field(
- default=None,
- description="New email (leave empty to keep current)"
- )
- phone: Optional[str] = Field(
- default=None,
- description="New phone (leave empty to keep current)"
- )
- company: Optional[str] = Field(
- default=None,
- description="New company (leave empty to keep current)"
- )
- job_title: Optional[str] = Field(
- default=None,
- description="New job title (leave empty to keep current)"
- )
-
- return ContactsUpdateSchema
-
- # Contacts Delete tool schema (dual-purpose: workflow node + AI tool)
- if node_type == 'contactsDelete':
- class ContactsDeleteSchema(BaseModel):
- """Delete a contact from Google Contacts."""
- resource_name: str = Field(
- description="Contact resource name to delete (e.g., 'people/c12345678')"
- )
-
- return ContactsDeleteSchema
+ - send: Compose and send an email (requires to, subject, body)
+ - search: Find emails by query (requires query)
+ - read: Get email by message ID (requires message_id)
+ """
+ operation: str = Field(
+ description="Operation: 'send', 'search', or 'read'"
+ )
+ # send fields
+ to: Optional[str] = Field(default=None, description="[send] Recipient email(s), comma-separated")
+ subject: Optional[str] = Field(default=None, description="[send] Email subject line")
+ body: Optional[str] = Field(default=None, description="[send] Email body content")
+ cc: Optional[str] = Field(default=None, description="[send] CC recipients, comma-separated")
+ bcc: Optional[str] = Field(default=None, description="[send] BCC recipients, comma-separated")
+ body_type: str = Field(default="text", description="[send] Body type: 'text' or 'html'")
+ # search fields
+ query: Optional[str] = Field(default=None, description="[search] Gmail search query (e.g., 'from:[email protected]', 'subject:meeting', 'is:unread')")
+ max_results: int = Field(default=10, description="[search] Max messages to return (1-100)")
+ include_body: bool = Field(default=False, description="[search] Fetch full message body")
+ # read fields
+ message_id: Optional[str] = Field(default=None, description="[read] Gmail message ID to read")
+ format: str = Field(default="full", description="[read] Format: 'full', 'minimal', 'raw', 'metadata'")
+
+ return GoogleGmailSchema
+
+ if node_type == 'calendar':
+ class GoogleCalendarSchema(BaseModel):
+ """Manage Google Calendar events.
+
+ - create: Create new event (requires title, start_time, end_time)
+ - list: List events in date range (requires start_date, end_date)
+ - update: Update existing event (requires event_id)
+ - delete: Delete event (requires event_id)
+ """
+ operation: str = Field(
+ description="Operation: 'create', 'list', 'update', or 'delete'"
+ )
+ calendar_id: str = Field(default="primary", description="Calendar ID ('primary' for main calendar)")
+ # create/update fields
+ title: Optional[str] = Field(default=None, description="[create/update] Event title")
+ start_time: Optional[str] = Field(default=None, description="[create/update] Start time ISO 8601 (e.g., '2026-02-22T14:00:00')")
+ end_time: Optional[str] = Field(default=None, description="[create/update] End time ISO 8601")
+ description: Optional[str] = Field(default=None, description="[create/update] Event description")
+ location: Optional[str] = Field(default=None, description="[create/update] Event location")
+ attendees: Optional[str] = Field(default=None, description="[create] Comma-separated attendee emails")
+ timezone: str = Field(default="UTC", description="[create] Timezone (e.g., 'America/New_York')")
+ send_updates: str = Field(default="none", description="[create/update/delete] Notifications: 'all', 'externalOnly', 'none'")
+ # list fields
+ start_date: Optional[str] = Field(default=None, description="[list] Start date ISO 8601")
+ end_date: Optional[str] = Field(default=None, description="[list] End date ISO 8601")
+ max_results: int = Field(default=50, description="[list] Max events (1-2500)")
+ query: Optional[str] = Field(default=None, description="[list] Text search query")
+ # update/delete fields
+ event_id: Optional[str] = Field(default=None, description="[update/delete] Event ID")
+
+ return GoogleCalendarSchema
+
+ if node_type == 'drive':
+ class GoogleDriveSchema(BaseModel):
+ """Manage Google Drive files.
+
+ - upload: Upload file from URL (requires file_url)
+ - download: Download file (requires file_id)
+ - list: List/search files
+ - share: Share file with user (requires file_id, email)
+ """
+ operation: str = Field(
+ description="Operation: 'upload', 'download', 'list', or 'share'"
+ )
+ # upload fields
+ file_url: Optional[str] = Field(default=None, description="[upload] URL of file to upload")
+ filename: Optional[str] = Field(default=None, description="[upload] Custom filename (auto-detected from URL)")
+ mime_type: Optional[str] = Field(default=None, description="[upload] MIME type (auto-detected if omitted)")
+ # upload/list fields
+ folder_id: Optional[str] = Field(default=None, description="[upload/list] Folder ID (omit for root)")
+ # download/share fields
+ file_id: Optional[str] = Field(default=None, description="[download/share] Drive file ID")
+ # list fields
+ query: Optional[str] = Field(default=None, description="[list] Drive search query")
+ max_results: int = Field(default=100, description="[list] Max files (1-1000)")
+ file_types: Optional[str] = Field(default=None, description="[list] Filter: 'documents', 'spreadsheets', 'images', etc.")
+ # share fields
+ email: Optional[str] = Field(default=None, description="[share] Email to share with")
+ role: str = Field(default="reader", description="[share] Role: 'reader', 'writer', 'commenter'")
+ send_notification: bool = Field(default=True, description="[share] Send email notification")
+
+ return GoogleDriveSchema
+
+ if node_type == 'sheets':
+ class GoogleSheetsSchema(BaseModel):
+ """Read and write Google Sheets data.
+
+ - read: Read data from range (requires spreadsheet_id, range)
+ - write: Write data to range (requires spreadsheet_id, range, values)
+ - append: Append rows (requires spreadsheet_id, range, values)
+ """
+ operation: str = Field(
+ description="Operation: 'read', 'write', or 'append'"
+ )
+ spreadsheet_id: str = Field(description="Spreadsheet ID (from URL between /d/ and /edit)")
+ range: str = Field(description="A1 notation range (e.g., 'Sheet1!A1:D10')")
+ # write/append fields
+ values: Optional[str] = Field(default=None, description="[write/append] 2D array as JSON string (e.g., '[[\"Name\",\"Age\"],[\"Alice\",25]]')")
+ value_input_option: str = Field(default="USER_ENTERED", description="[write/append] Input mode: 'USER_ENTERED' or 'RAW'")
+ # read fields
+ value_render_option: str = Field(default="FORMATTED_VALUE", description="[read] Render: 'FORMATTED_VALUE', 'UNFORMATTED_VALUE', 'FORMULA'")
+ major_dimension: str = Field(default="ROWS", description="[read] Dimension: 'ROWS' or 'COLUMNS'")
+ # append fields
+ insert_data_option: str = Field(default="INSERT_ROWS", description="[append] Insert mode: 'INSERT_ROWS' or 'OVERWRITE'")
+
+ return GoogleSheetsSchema
+
+ if node_type == 'tasks':
+ class GoogleTasksSchema(BaseModel):
+ """Manage Google Tasks.
+
+ - create: Create new task (requires title)
+ - list: List tasks from a task list
+ - complete: Mark task as done (requires task_id)
+ - update: Update task (requires task_id)
+ - delete: Delete task (requires task_id)
+ """
+ operation: str = Field(
+ description="Operation: 'create', 'list', 'complete', 'update', or 'delete'"
+ )
+ tasklist_id: str = Field(default="@default", description="Task list ID ('@default' for default list)")
+ # create/update fields
+ title: Optional[str] = Field(default=None, description="[create/update] Task title")
+ notes: Optional[str] = Field(default=None, description="[create/update] Task notes/description")
+ due_date: Optional[str] = Field(default=None, description="[create/update] Due date ISO 8601 (e.g., '2026-02-25')")
+ # complete/update/delete fields
+ task_id: Optional[str] = Field(default=None, description="[complete/update/delete] Task ID")
+ # update fields
+ status: Optional[str] = Field(default=None, description="[update] Status: 'needsAction' or 'completed'")
+ # list fields
+ show_completed: bool = Field(default=False, description="[list] Include completed tasks")
+ show_hidden: bool = Field(default=False, description="[list] Include hidden tasks")
+ max_results: int = Field(default=100, description="[list] Max tasks to return")
+
+ return GoogleTasksSchema
+
+ if node_type == 'contacts':
+ class GoogleContactsSchema(BaseModel):
+ """Manage Google Contacts.
+
+ - create: Create contact (requires first_name)
+ - list: Browse contacts with pagination
+ - search: Find contacts by name/email/phone (requires query)
+ - get: Get contact details (requires resource_name)
+ - update: Update contact (requires resource_name)
+ - delete: Delete contact (requires resource_name)
+ """
+ operation: str = Field(
+ description="Operation: 'create', 'list', 'search', 'get', 'update', or 'delete'"
+ )
+ # create/update fields
+ first_name: Optional[str] = Field(default=None, description="[create/update] First name")
+ last_name: Optional[str] = Field(default=None, description="[create/update] Last name")
+ email: Optional[str] = Field(default=None, description="[create/update] Email address")
+ phone: Optional[str] = Field(default=None, description="[create/update] Phone number")
+ company: Optional[str] = Field(default=None, description="[create/update] Company name")
+ job_title: Optional[str] = Field(default=None, description="[create/update] Job title")
+ notes: Optional[str] = Field(default=None, description="[create] Notes about the contact")
+ # get/update/delete fields
+ resource_name: Optional[str] = Field(default=None, description="[get/update/delete] Contact resource name (e.g., 'people/c12345678')")
+ # search fields
+ query: Optional[str] = Field(default=None, description="[search] Search query (name, email, phone)")
+ # list/search fields
+ page_size: int = Field(default=100, description="[list/search] Number of results (1-1000)")
+ sort_order: str = Field(default="LAST_MODIFIED_DESCENDING", description="[list] Sort: 'LAST_MODIFIED_DESCENDING', 'FIRST_NAME_ASCENDING', etc.")
+ page_token: Optional[str] = Field(default=None, description="[list] Pagination token")
+
+ return GoogleContactsSchema
# Check delegated tasks schema (built-in tool for result retrieval)
if node_type == '_builtin_check_delegated_tasks':
diff --git a/server/services/handlers/__init__.py b/server/services/handlers/__init__.py
index 2ca03e64..ff3c3ec0 100644
--- a/server/services/handlers/__init__.py
+++ b/server/services/handlers/__init__.py
@@ -11,6 +11,12 @@ This package contains all node execution handlers organized by category:
- utility.py: Maps, Text, Chat, Cron, Start
- whatsapp.py: WhatsApp Send, WhatsApp DB
- social.py: Social Receive, Social Send (unified messaging)
+- gmail.py: Consolidated Gmail handler (send, search, read)
+- calendar.py: Consolidated Calendar handler (create, list, update, delete)
+- drive.py: Consolidated Drive handler (upload, download, list, share)
+- sheets.py: Consolidated Sheets handler (read, write, append)
+- tasks.py: Consolidated Tasks handler (create, list, complete, update, delete)
+- contacts.py: Consolidated Contacts handler (create, list, search, get, update, delete)
- polyglot.py: Polyglot server integration (standalone, not auto-imported)
"""
@@ -74,12 +80,13 @@ from .twitter import (
handle_twitter_user,
)
-# Gmail handlers
-from .gmail import (
- handle_gmail_send,
- handle_gmail_search,
- handle_gmail_read,
-)
+# Google Workspace handlers (consolidated)
+from .gmail import handle_google_gmail
+from .calendar import handle_google_calendar
+from .drive import handle_google_drive
+from .sheets import handle_google_sheets
+from .tasks import handle_google_tasks
+from .contacts import handle_google_contacts
# Social handlers (unified messaging)
from .social import (
@@ -147,10 +154,13 @@ __all__ = [
'handle_twitter_send',
'handle_twitter_search',
'handle_twitter_user',
- # Gmail
- 'handle_gmail_send',
- 'handle_gmail_search',
- 'handle_gmail_read',
+ # Google Workspace (consolidated)
+ 'handle_google_gmail',
+ 'handle_google_calendar',
+ 'handle_google_drive',
+ 'handle_google_sheets',
+ 'handle_google_tasks',
+ 'handle_google_contacts',
# Social
'handle_social_receive',
'handle_social_send',
diff --git a/server/services/handlers/calendar.py b/server/services/handlers/calendar.py
index a9f0b95d..7470e735 100644
--- a/server/services/handlers/calendar.py
+++ b/server/services/handlers/calendar.py
@@ -442,3 +442,52 @@ async def handle_calendar_delete(
except Exception as e:
logger.error(f"Calendar delete error: {e}")
return {"success": False, "error": str(e), "execution_time": time.time() - start_time}
+
+
+# ============================================================================
+# CONSOLIDATED DISPATCHER
+# ============================================================================
+
+async def handle_google_calendar(
+ node_id: str,
+ node_type: str,
+ parameters: Dict[str, Any],
+ context: Dict[str, Any]
+) -> Dict[str, Any]:
+ """Consolidated Calendar handler with operation dispatcher.
+
+ Routes to appropriate handler based on 'operation' parameter:
+ - create: Create calendar event
+ - list: List calendar events
+ - update: Update existing event
+ - delete: Delete event
+ """
+ operation = parameters.get('operation', 'create')
+
+ # Map update_* parameters to standard names for update operation
+ if operation == 'update':
+ if parameters.get('update_title'):
+ parameters['title'] = parameters['update_title']
+ if parameters.get('update_start_time'):
+ parameters['start_time'] = parameters['update_start_time']
+ if parameters.get('update_end_time'):
+ parameters['end_time'] = parameters['update_end_time']
+ if parameters.get('update_description'):
+ parameters['description'] = parameters['update_description']
+ if parameters.get('update_location'):
+ parameters['location'] = parameters['update_location']
+
+ if operation == 'create':
+ return await handle_calendar_create(node_id, node_type, parameters, context)
+ elif operation == 'list':
+ return await handle_calendar_list(node_id, node_type, parameters, context)
+ elif operation == 'update':
+ return await handle_calendar_update(node_id, node_type, parameters, context)
+ elif operation == 'delete':
+ return await handle_calendar_delete(node_id, node_type, parameters, context)
+ else:
+ return {
+ "success": False,
+ "error": f"Unknown Calendar operation: {operation}. Supported: create, list, update, delete",
+ "execution_time": 0
+ }
diff --git a/server/services/handlers/contacts.py b/server/services/handlers/contacts.py
index a6d34210..012a696e 100644
--- a/server/services/handlers/contacts.py
+++ b/server/services/handlers/contacts.py
@@ -520,3 +520,60 @@ async def handle_contacts_delete(
except Exception as e:
logger.error(f"Contacts delete error: {e}")
return {"success": False, "error": str(e), "execution_time": time.time() - start_time}
+
+
+# ============================================================================
+# CONSOLIDATED DISPATCHER
+# ============================================================================
+
+async def handle_google_contacts(
+ node_id: str,
+ node_type: str,
+ parameters: Dict[str, Any],
+ context: Dict[str, Any]
+) -> Dict[str, Any]:
+ """Consolidated Contacts handler with operation dispatcher.
+
+ Routes to appropriate handler based on 'operation' parameter:
+ - create: Create new contact
+ - list: List contacts
+ - search: Search contacts
+ - get: Get contact by resource name
+ - update: Update existing contact
+ - delete: Delete contact
+ """
+ operation = parameters.get('operation', 'create')
+
+ # Map update_* parameters to standard names for update operation
+ if operation == 'update':
+ if parameters.get('update_first_name'):
+ parameters['first_name'] = parameters['update_first_name']
+ if parameters.get('update_last_name'):
+ parameters['last_name'] = parameters['update_last_name']
+ if parameters.get('update_email'):
+ parameters['email'] = parameters['update_email']
+ if parameters.get('update_phone'):
+ parameters['phone'] = parameters['update_phone']
+ if parameters.get('update_company'):
+ parameters['company'] = parameters['update_company']
+ if parameters.get('update_job_title'):
+ parameters['job_title'] = parameters['update_job_title']
+
+ if operation == 'create':
+ return await handle_contacts_create(node_id, node_type, parameters, context)
+ elif operation == 'list':
+ return await handle_contacts_list(node_id, node_type, parameters, context)
+ elif operation == 'search':
+ return await handle_contacts_search(node_id, node_type, parameters, context)
+ elif operation == 'get':
+ return await handle_contacts_get(node_id, node_type, parameters, context)
+ elif operation == 'update':
+ return await handle_contacts_update(node_id, node_type, parameters, context)
+ elif operation == 'delete':
+ return await handle_contacts_delete(node_id, node_type, parameters, context)
+ else:
+ return {
+ "success": False,
+ "error": f"Unknown Contacts operation: {operation}. Supported: create, list, search, get, update, delete",
+ "execution_time": 0
+ }
diff --git a/server/services/handlers/drive.py b/server/services/handlers/drive.py
index 41350ceb..80882ea3 100644
--- a/server/services/handlers/drive.py
+++ b/server/services/handlers/drive.py
@@ -474,3 +474,39 @@ async def handle_drive_share(
except Exception as e:
logger.error(f"Drive share error: {e}")
return {"success": False, "error": str(e), "execution_time": time.time() - start_time}
+
+
+# ============================================================================
+# CONSOLIDATED DISPATCHER
+# ============================================================================
+
+async def handle_google_drive(
+ node_id: str,
+ node_type: str,
+ parameters: Dict[str, Any],
+ context: Dict[str, Any]
+) -> Dict[str, Any]:
+ """Consolidated Drive handler with operation dispatcher.
+
+ Routes to appropriate handler based on 'operation' parameter:
+ - upload: Upload file to Drive
+ - download: Download file from Drive
+ - list: List files in Drive
+ - share: Share file with user
+ """
+ operation = parameters.get('operation', 'upload')
+
+ if operation == 'upload':
+ return await handle_drive_upload(node_id, node_type, parameters, context)
+ elif operation == 'download':
+ return await handle_drive_download(node_id, node_type, parameters, context)
+ elif operation == 'list':
+ return await handle_drive_list(node_id, node_type, parameters, context)
+ elif operation == 'share':
+ return await handle_drive_share(node_id, node_type, parameters, context)
+ else:
+ return {
+ "success": False,
+ "error": f"Unknown Drive operation: {operation}. Supported: upload, download, list, share",
+ "execution_time": 0
+ }
diff --git a/server/services/handlers/gmail.py b/server/services/handlers/gmail.py
index f5b29476..1c17934f 100644
--- a/server/services/handlers/gmail.py
+++ b/server/services/handlers/gmail.py
@@ -414,3 +414,36 @@ def _extract_attachments(payload: Dict[str, Any]) -> list:
attachments.extend(nested)
return attachments
+
+
+# ============================================================================
+# CONSOLIDATED DISPATCHER
+# ============================================================================
+
+async def handle_google_gmail(
+ node_id: str,
+ node_type: str,
+ parameters: Dict[str, Any],
+ context: Dict[str, Any]
+) -> Dict[str, Any]:
+ """Consolidated Gmail handler with operation dispatcher.
+
+ Routes to appropriate handler based on 'operation' parameter:
+ - send: Send email
+ - search: Search emails
+ - read: Read specific email by ID
+ """
+ operation = parameters.get('operation', 'send')
+
+ if operation == 'send':
+ return await handle_gmail_send(node_id, node_type, parameters, context)
+ elif operation == 'search':
+ return await handle_gmail_search(node_id, node_type, parameters, context)
+ elif operation == 'read':
+ return await handle_gmail_read(node_id, node_type, parameters, context)
+ else:
+ return {
+ "success": False,
+ "error": f"Unknown Gmail operation: {operation}. Supported: send, search, read",
+ "execution_time": 0
+ }
diff --git a/server/services/handlers/sheets.py b/server/services/handlers/sheets.py
index c06933fb..ec6e1e52 100644
--- a/server/services/handlers/sheets.py
+++ b/server/services/handlers/sheets.py
@@ -321,3 +321,36 @@ async def handle_sheets_append(
except Exception as e:
logger.error(f"Sheets append error: {e}")
return {"success": False, "error": str(e), "execution_time": time.time() - start_time}
+
+
+# ============================================================================
+# CONSOLIDATED DISPATCHER
+# ============================================================================
+
+async def handle_google_sheets(
+ node_id: str,
+ node_type: str,
+ parameters: Dict[str, Any],
+ context: Dict[str, Any]
+) -> Dict[str, Any]:
+ """Consolidated Sheets handler with operation dispatcher.
+
+ Routes to appropriate handler based on 'operation' parameter:
+ - read: Read data from spreadsheet
+ - write: Write data to spreadsheet
+ - append: Append rows to spreadsheet
+ """
+ operation = parameters.get('operation', 'read')
+
+ if operation == 'read':
+ return await handle_sheets_read(node_id, node_type, parameters, context)
+ elif operation == 'write':
+ return await handle_sheets_write(node_id, node_type, parameters, context)
+ elif operation == 'append':
+ return await handle_sheets_append(node_id, node_type, parameters, context)
+ else:
+ return {
+ "success": False,
+ "error": f"Unknown Sheets operation: {operation}. Supported: read, write, append",
+ "execution_time": 0
+ }
diff --git a/server/services/handlers/tasks.py b/server/services/handlers/tasks.py
index ccb78580..e868e767 100644
--- a/server/services/handlers/tasks.py
+++ b/server/services/handlers/tasks.py
@@ -442,3 +442,53 @@ async def handle_tasks_delete(
except Exception as e:
logger.error(f"Tasks delete error: {e}")
return {"success": False, "error": str(e), "execution_time": time.time() - start_time}
+
+
+# ============================================================================
+# CONSOLIDATED DISPATCHER
+# ============================================================================
+
+async def handle_google_tasks(
+ node_id: str,
+ node_type: str,
+ parameters: Dict[str, Any],
+ context: Dict[str, Any]
+) -> Dict[str, Any]:
+ """Consolidated Tasks handler with operation dispatcher.
+
+ Routes to appropriate handler based on 'operation' parameter:
+ - create: Create new task
+ - list: List tasks
+ - complete: Mark task as complete
+ - update: Update existing task
+ - delete: Delete task
+ """
+ operation = parameters.get('operation', 'create')
+
+ # Map update_* parameters to standard names for update operation
+ if operation == 'update':
+ if parameters.get('update_title'):
+ parameters['title'] = parameters['update_title']
+ if parameters.get('update_notes'):
+ parameters['notes'] = parameters['update_notes']
+ if parameters.get('update_due_date'):
+ parameters['due_date'] = parameters['update_due_date']
+ if parameters.get('update_status'):
+ parameters['status'] = parameters['update_status']
+
+ if operation == 'create':
+ return await handle_tasks_create(node_id, node_type, parameters, context)
+ elif operation == 'list':
+ return await handle_tasks_list(node_id, node_type, parameters, context)
+ elif operation == 'complete':
+ return await handle_tasks_complete(node_id, node_type, parameters, context)
+ elif operation == 'update':
+ return await handle_tasks_update(node_id, node_type, parameters, context)
+ elif operation == 'delete':
+ return await handle_tasks_delete(node_id, node_type, parameters, context)
+ else:
+ return {
+ "success": False,
+ "error": f"Unknown Tasks operation: {operation}. Supported: create, list, complete, update, delete",
+ "execution_time": 0
+ }
diff --git a/server/services/handlers/tools.py b/server/services/handlers/tools.py
index 8615e5d4..38e5f826 100644
--- a/server/services/handlers/tools.py
+++ b/server/services/handlers/tools.py
@@ -119,75 +119,22 @@ async def execute_tool(tool_name: str, tool_args: Dict[str, Any],
if node_type == 'twitterUser':
return await _execute_twitter_user(tool_args, config.get('parameters', {}))
- # Gmail Send (dual-purpose: workflow node + AI tool)
- if node_type == 'gmailSend':
- return await _execute_gmail_send(tool_args, config.get('parameters', {}))
-
- # Gmail Search (dual-purpose: workflow node + AI tool)
- if node_type == 'gmailSearch':
- return await _execute_gmail_search(tool_args, config.get('parameters', {}))
-
- # Gmail Read (dual-purpose: workflow node + AI tool)
- if node_type == 'gmailRead':
- return await _execute_gmail_read(tool_args, config.get('parameters', {}))
-
# ========================================================================
- # GOOGLE WORKSPACE TOOLS (Calendar, Drive, Sheets, Tasks, Contacts)
+ # GOOGLE WORKSPACE TOOLS (consolidated: gmail, calendar, drive, sheets, tasks, contacts)
# ========================================================================
- # Google Calendar tools
- if node_type == 'calendarCreate':
- return await _execute_calendar_create(tool_args, config.get('parameters', {}))
- if node_type == 'calendarList':
- return await _execute_calendar_list(tool_args, config.get('parameters', {}))
- if node_type == 'calendarUpdate':
- return await _execute_calendar_update(tool_args, config.get('parameters', {}))
- if node_type == 'calendarDelete':
- return await _execute_calendar_delete(tool_args, config.get('parameters', {}))
-
- # Google Drive tools
- if node_type == 'driveUpload':
- return await _execute_drive_upload(tool_args, config.get('parameters', {}))
- if node_type == 'driveDownload':
- return await _execute_drive_download(tool_args, config.get('parameters', {}))
- if node_type == 'driveList':
- return await _execute_drive_list(tool_args, config.get('parameters', {}))
- if node_type == 'driveShare':
- return await _execute_drive_share(tool_args, config.get('parameters', {}))
-
- # Google Sheets tools
- if node_type == 'sheetsRead':
- return await _execute_sheets_read(tool_args, config.get('parameters', {}))
- if node_type == 'sheetsWrite':
- return await _execute_sheets_write(tool_args, config.get('parameters', {}))
- if node_type == 'sheetsAppend':
- return await _execute_sheets_append(tool_args, config.get('parameters', {}))
-
- # Google Tasks tools
- if node_type == 'tasksCreate':
- return await _execute_tasks_create(tool_args, config.get('parameters', {}))
- if node_type == 'tasksList':
- return await _execute_tasks_list(tool_args, config.get('parameters', {}))
- if node_type == 'tasksComplete':
- return await _execute_tasks_complete(tool_args, config.get('parameters', {}))
- if node_type == 'tasksUpdate':
- return await _execute_tasks_update(tool_args, config.get('parameters', {}))
- if node_type == 'tasksDelete':
- return await _execute_tasks_delete(tool_args, config.get('parameters', {}))
-
- # Google Contacts tools
- if node_type == 'contactsCreate':
- return await _execute_contacts_create(tool_args, config.get('parameters', {}))
- if node_type == 'contactsList':
- return await _execute_contacts_list(tool_args, config.get('parameters', {}))
- if node_type == 'contactsSearch':
- return await _execute_contacts_search(tool_args, config.get('parameters', {}))
- if node_type == 'contactsGet':
- return await _execute_contacts_get(tool_args, config.get('parameters', {}))
- if node_type == 'contactsUpdate':
- return await _execute_contacts_update(tool_args, config.get('parameters', {}))
- if node_type == 'contactsDelete':
- return await _execute_contacts_delete(tool_args, config.get('parameters', {}))
+ if node_type == 'gmail':
+ return await _execute_google_gmail(tool_args, config.get('parameters', {}))
+ if node_type == 'calendar':
+ return await _execute_google_calendar(tool_args, config.get('parameters', {}))
+ if node_type == 'drive':
+ return await _execute_google_drive(tool_args, config.get('parameters', {}))
+ if node_type == 'sheets':
+ return await _execute_google_sheets(tool_args, config.get('parameters', {}))
+ if node_type == 'tasks':
+ return await _execute_google_tasks(tool_args, config.get('parameters', {}))
+ if node_type == 'contacts':
+ return await _execute_google_contacts(tool_args, config.get('parameters', {}))
# Android toolkit - routes to connected service nodes
if node_type == 'androidTool':
@@ -1288,402 +1235,89 @@ async def _execute_twitter_user(args: Dict[str, Any],
)
-async def _execute_gmail_send(args: Dict[str, Any],
- node_params: Dict[str, Any]) -> Dict[str, Any]:
- """Execute Gmail send action via Google API.
-
- Args:
- args: LLM-provided arguments (to, subject, body, cc, bcc, body_type)
- node_params: Node parameters (may include account_mode, customer_id)
-
- Returns:
- Gmail API result with message_id and thread_id
- """
- from services.handlers.gmail import handle_gmail_send
-
- parameters = {**node_params, **args}
-
- return await handle_gmail_send(
- node_id="tool_gmail_send",
- node_type="gmailSend",
- parameters=parameters,
- context={}
- )
-
-
-async def _execute_gmail_search(args: Dict[str, Any],
+async def _execute_google_gmail(args: Dict[str, Any],
node_params: Dict[str, Any]) -> Dict[str, Any]:
- """Execute Gmail search via Google API.
-
- Args:
- args: LLM-provided arguments (query, max_results, include_body)
- node_params: Node parameters (may include account_mode, customer_id)
-
- Returns:
- Search results with message list
- """
- from services.handlers.gmail import handle_gmail_search
+ """Execute Gmail operations via consolidated dispatcher."""
+ from services.handlers.gmail import handle_google_gmail
parameters = {**node_params, **args}
-
- return await handle_gmail_search(
- node_id="tool_gmail_search",
- node_type="gmailSearch",
- parameters=parameters,
- context={}
- )
-
-
-async def _execute_gmail_read(args: Dict[str, Any],
- node_params: Dict[str, Any]) -> Dict[str, Any]:
- """Execute Gmail read via Google API.
-
- Args:
- args: LLM-provided arguments (message_id, format)
- node_params: Node parameters (may include account_mode, customer_id)
-
- Returns:
- Full message content
- """
- from services.handlers.gmail import handle_gmail_read
-
- parameters = {**node_params, **args}
-
- return await handle_gmail_read(
- node_id="tool_gmail_read",
- node_type="gmailRead",
+ return await handle_google_gmail(
+ node_id="tool_google_gmail",
+ node_type="gmail",
parameters=parameters,
context={}
)
# ============================================================================
-# GOOGLE WORKSPACE TOOL HANDLERS (Calendar, Drive, Sheets, Tasks, Contacts)
+# GOOGLE WORKSPACE CONSOLIDATED TOOL HANDLERS
# ============================================================================
-# ---------------------------------------------------------------------------
-# Google Calendar Tools
-# ---------------------------------------------------------------------------
-
-async def _execute_calendar_create(args: Dict[str, Any],
+async def _execute_google_calendar(args: Dict[str, Any],
node_params: Dict[str, Any]) -> Dict[str, Any]:
- """Execute Calendar create event via Google API."""
- from services.handlers.calendar import handle_calendar_create
-
- parameters = {**node_params, **args}
- return await handle_calendar_create(
- node_id="tool_calendar_create",
- node_type="calendarCreate",
- parameters=parameters,
- context={}
- )
-
-
-async def _execute_calendar_list(args: Dict[str, Any],
- node_params: Dict[str, Any]) -> Dict[str, Any]:
- """Execute Calendar list events via Google API."""
- from services.handlers.calendar import handle_calendar_list
-
- parameters = {**node_params, **args}
- return await handle_calendar_list(
- node_id="tool_calendar_list",
- node_type="calendarList",
- parameters=parameters,
- context={}
- )
-
-
-async def _execute_calendar_update(args: Dict[str, Any],
- node_params: Dict[str, Any]) -> Dict[str, Any]:
- """Execute Calendar update event via Google API."""
- from services.handlers.calendar import handle_calendar_update
-
- parameters = {**node_params, **args}
- return await handle_calendar_update(
- node_id="tool_calendar_update",
- node_type="calendarUpdate",
- parameters=parameters,
- context={}
- )
-
-
-async def _execute_calendar_delete(args: Dict[str, Any],
- node_params: Dict[str, Any]) -> Dict[str, Any]:
- """Execute Calendar delete event via Google API."""
- from services.handlers.calendar import handle_calendar_delete
-
- parameters = {**node_params, **args}
- return await handle_calendar_delete(
- node_id="tool_calendar_delete",
- node_type="calendarDelete",
- parameters=parameters,
- context={}
- )
-
-
-# ---------------------------------------------------------------------------
-# Google Drive Tools
-# ---------------------------------------------------------------------------
-
-async def _execute_drive_upload(args: Dict[str, Any],
- node_params: Dict[str, Any]) -> Dict[str, Any]:
- """Execute Drive upload file via Google API."""
- from services.handlers.drive import handle_drive_upload
-
- parameters = {**node_params, **args}
- return await handle_drive_upload(
- node_id="tool_drive_upload",
- node_type="driveUpload",
- parameters=parameters,
- context={}
- )
-
-
-async def _execute_drive_download(args: Dict[str, Any],
- node_params: Dict[str, Any]) -> Dict[str, Any]:
- """Execute Drive download file via Google API."""
- from services.handlers.drive import handle_drive_download
-
- parameters = {**node_params, **args}
- return await handle_drive_download(
- node_id="tool_drive_download",
- node_type="driveDownload",
- parameters=parameters,
- context={}
- )
-
-
-async def _execute_drive_list(args: Dict[str, Any],
- node_params: Dict[str, Any]) -> Dict[str, Any]:
- """Execute Drive list files via Google API."""
- from services.handlers.drive import handle_drive_list
-
- parameters = {**node_params, **args}
- return await handle_drive_list(
- node_id="tool_drive_list",
- node_type="driveList",
- parameters=parameters,
- context={}
- )
-
-
-async def _execute_drive_share(args: Dict[str, Any],
- node_params: Dict[str, Any]) -> Dict[str, Any]:
- """Execute Drive share file via Google API."""
- from services.handlers.drive import handle_drive_share
+ """Execute Google Calendar operations via consolidated dispatcher."""
+ from services.handlers.calendar import handle_google_calendar
parameters = {**node_params, **args}
- return await handle_drive_share(
- node_id="tool_drive_share",
- node_type="driveShare",
+ return await handle_google_calendar(
+ node_id="tool_google_calendar",
+ node_type="calendar",
parameters=parameters,
context={}
)
-# ---------------------------------------------------------------------------
-# Google Sheets Tools
-# ---------------------------------------------------------------------------
-
-async def _execute_sheets_read(args: Dict[str, Any],
- node_params: Dict[str, Any]) -> Dict[str, Any]:
- """Execute Sheets read data via Google API."""
- from services.handlers.sheets import handle_sheets_read
-
- parameters = {**node_params, **args}
- return await handle_sheets_read(
- node_id="tool_sheets_read",
- node_type="sheetsRead",
- parameters=parameters,
- context={}
- )
-
-
-async def _execute_sheets_write(args: Dict[str, Any],
+async def _execute_google_drive(args: Dict[str, Any],
node_params: Dict[str, Any]) -> Dict[str, Any]:
- """Execute Sheets write data via Google API."""
- from services.handlers.sheets import handle_sheets_write
+ """Execute Google Drive operations via consolidated dispatcher."""
+ from services.handlers.drive import handle_google_drive
parameters = {**node_params, **args}
- return await handle_sheets_write(
- node_id="tool_sheets_write",
- node_type="sheetsWrite",
+ return await handle_google_drive(
+ node_id="tool_google_drive",
+ node_type="drive",
parameters=parameters,
context={}
)
-async def _execute_sheets_append(args: Dict[str, Any],
+async def _execute_google_sheets(args: Dict[str, Any],
node_params: Dict[str, Any]) -> Dict[str, Any]:
- """Execute Sheets append rows via Google API."""
- from services.handlers.sheets import handle_sheets_append
+ """Execute Google Sheets operations via consolidated dispatcher."""
+ from services.handlers.sheets import handle_google_sheets
parameters = {**node_params, **args}
- return await handle_sheets_append(
- node_id="tool_sheets_append",
- node_type="sheetsAppend",
+ return await handle_google_sheets(
+ node_id="tool_google_sheets",
+ node_type="sheets",
parameters=parameters,
context={}
)
-# ---------------------------------------------------------------------------
-# Google Tasks Tools
-# ---------------------------------------------------------------------------
-
-async def _execute_tasks_create(args: Dict[str, Any],
+async def _execute_google_tasks(args: Dict[str, Any],
node_params: Dict[str, Any]) -> Dict[str, Any]:
- """Execute Tasks create via Google API."""
- from services.handlers.tasks import handle_tasks_create
-
- parameters = {**node_params, **args}
- return await handle_tasks_create(
- node_id="tool_tasks_create",
- node_type="tasksCreate",
- parameters=parameters,
- context={}
- )
-
-
-async def _execute_tasks_list(args: Dict[str, Any],
- node_params: Dict[str, Any]) -> Dict[str, Any]:
- """Execute Tasks list via Google API."""
- from services.handlers.tasks import handle_tasks_list
-
- parameters = {**node_params, **args}
- return await handle_tasks_list(
- node_id="tool_tasks_list",
- node_type="tasksList",
- parameters=parameters,
- context={}
- )
-
-
-async def _execute_tasks_complete(args: Dict[str, Any],
- node_params: Dict[str, Any]) -> Dict[str, Any]:
- """Execute Tasks complete via Google API."""
- from services.handlers.tasks import handle_tasks_complete
-
- parameters = {**node_params, **args}
- return await handle_tasks_complete(
- node_id="tool_tasks_complete",
- node_type="tasksComplete",
- parameters=parameters,
- context={}
- )
-
-
-async def _execute_tasks_update(args: Dict[str, Any],
- node_params: Dict[str, Any]) -> Dict[str, Any]:
- """Execute Tasks update via Google API."""
- from services.handlers.tasks import handle_tasks_update
-
- parameters = {**node_params, **args}
- return await handle_tasks_update(
- node_id="tool_tasks_update",
- node_type="tasksUpdate",
- parameters=parameters,
- context={}
- )
-
-
-async def _execute_tasks_delete(args: Dict[str, Any],
- node_params: Dict[str, Any]) -> Dict[str, Any]:
- """Execute Tasks delete via Google API."""
- from services.handlers.tasks import handle_tasks_delete
-
- parameters = {**node_params, **args}
- return await handle_tasks_delete(
- node_id="tool_tasks_delete",
- node_type="tasksDelete",
- parameters=parameters,
- context={}
- )
-
-
-# ---------------------------------------------------------------------------
-# Google Contacts Tools
-# ---------------------------------------------------------------------------
-
-async def _execute_contacts_create(args: Dict[str, Any],
- node_params: Dict[str, Any]) -> Dict[str, Any]:
- """Execute Contacts create via Google People API."""
- from services.handlers.contacts import handle_contacts_create
-
- parameters = {**node_params, **args}
- return await handle_contacts_create(
- node_id="tool_contacts_create",
- node_type="contactsCreate",
- parameters=parameters,
- context={}
- )
-
-
-async def _execute_contacts_list(args: Dict[str, Any],
- node_params: Dict[str, Any]) -> Dict[str, Any]:
- """Execute Contacts list via Google People API."""
- from services.handlers.contacts import handle_contacts_list
-
- parameters = {**node_params, **args}
- return await handle_contacts_list(
- node_id="tool_contacts_list",
- node_type="contactsList",
- parameters=parameters,
- context={}
- )
-
-
-async def _execute_contacts_search(args: Dict[str, Any],
- node_params: Dict[str, Any]) -> Dict[str, Any]:
- """Execute Contacts search via Google People API."""
- from services.handlers.contacts import handle_contacts_search
-
- parameters = {**node_params, **args}
- return await handle_contacts_search(
- node_id="tool_contacts_search",
- node_type="contactsSearch",
- parameters=parameters,
- context={}
- )
-
-
-async def _execute_contacts_get(args: Dict[str, Any],
- node_params: Dict[str, Any]) -> Dict[str, Any]:
- """Execute Contacts get via Google People API."""
- from services.handlers.contacts import handle_contacts_get
-
- parameters = {**node_params, **args}
- return await handle_contacts_get(
- node_id="tool_contacts_get",
- node_type="contactsGet",
- parameters=parameters,
- context={}
- )
-
-
-async def _execute_contacts_update(args: Dict[str, Any],
- node_params: Dict[str, Any]) -> Dict[str, Any]:
- """Execute Contacts update via Google People API."""
- from services.handlers.contacts import handle_contacts_update
+ """Execute Google Tasks operations via consolidated dispatcher."""
+ from services.handlers.tasks import handle_google_tasks
parameters = {**node_params, **args}
- return await handle_contacts_update(
- node_id="tool_contacts_update",
- node_type="contactsUpdate",
+ return await handle_google_tasks(
+ node_id="tool_google_tasks",
+ node_type="tasks",
parameters=parameters,
context={}
)
-async def _execute_contacts_delete(args: Dict[str, Any],
+async def _execute_google_contacts(args: Dict[str, Any],
node_params: Dict[str, Any]) -> Dict[str, Any]:
- """Execute Contacts delete via Google People API."""
- from services.handlers.contacts import handle_contacts_delete
+ """Execute Google Contacts operations via consolidated dispatcher."""
+ from services.handlers.contacts import handle_google_contacts
parameters = {**node_params, **args}
- return await handle_contacts_delete(
- node_id="tool_contacts_delete",
- node_type="contactsDelete",
+ return await handle_google_contacts(
+ node_id="tool_google_contacts",
+ node_type="contacts",
parameters=parameters,
context={}
)
diff --git a/server/services/node_executor.py b/server/services/node_executor.py
index 1d9105de..2bde8665 100644
--- a/server/services/node_executor.py
+++ b/server/services/node_executor.py
@@ -37,26 +37,16 @@ from services.handlers import (
handle_text_chunker, handle_embedding_generator, handle_vector_store,
handle_task_manager,
handle_twitter_send, handle_twitter_search, handle_twitter_user,
- handle_gmail_send, handle_gmail_search, handle_gmail_read,
handle_brave_search, handle_serper_search, handle_perplexity_search,
)
from services.handlers.apify import handle_apify_actor
-from services.handlers.calendar import (
- handle_calendar_create, handle_calendar_list, handle_calendar_update, handle_calendar_delete,
-)
-from services.handlers.drive import (
- handle_drive_upload, handle_drive_download, handle_drive_list, handle_drive_share,
-)
-from services.handlers.sheets import (
- handle_sheets_read, handle_sheets_write, handle_sheets_append,
-)
-from services.handlers.tasks import (
- handle_tasks_create, handle_tasks_list, handle_tasks_complete, handle_tasks_update, handle_tasks_delete,
-)
-from services.handlers.contacts import (
- handle_contacts_create, handle_contacts_list, handle_contacts_search,
- handle_contacts_get, handle_contacts_update, handle_contacts_delete,
-)
+# Consolidated Google Workspace handlers (6 services with operation dispatchers)
+from services.handlers.gmail import handle_google_gmail
+from services.handlers.calendar import handle_google_calendar
+from services.handlers.drive import handle_google_drive
+from services.handlers.sheets import handle_google_sheets
+from services.handlers.tasks import handle_google_tasks
+from services.handlers.contacts import handle_google_contacts
if TYPE_CHECKING:
from core.config import Settings
@@ -158,37 +148,14 @@ class NodeExecutor:
'twitterSend': handle_twitter_send,
'twitterSearch': handle_twitter_search,
'twitterUser': handle_twitter_user,
- # Gmail
- 'gmailSend': handle_gmail_send,
- 'gmailSearch': handle_gmail_search,
- 'gmailRead': handle_gmail_read,
- # Google Calendar
- 'calendarCreate': handle_calendar_create,
- 'calendarList': handle_calendar_list,
- 'calendarUpdate': handle_calendar_update,
- 'calendarDelete': handle_calendar_delete,
- # Google Drive
- 'driveUpload': handle_drive_upload,
- 'driveDownload': handle_drive_download,
- 'driveList': handle_drive_list,
- 'driveShare': handle_drive_share,
- # Google Sheets
- 'sheetsRead': handle_sheets_read,
- 'sheetsWrite': handle_sheets_write,
- 'sheetsAppend': handle_sheets_append,
- # Google Tasks
- 'tasksCreate': handle_tasks_create,
- 'tasksList': handle_tasks_list,
- 'tasksComplete': handle_tasks_complete,
- 'tasksUpdate': handle_tasks_update,
- 'tasksDelete': handle_tasks_delete,
- # Google Contacts (People API)
- 'contactsCreate': handle_contacts_create,
- 'contactsList': handle_contacts_list,
- 'contactsSearch': handle_contacts_search,
- 'contactsGet': handle_contacts_get,
- 'contactsUpdate': handle_contacts_update,
- 'contactsDelete': handle_contacts_delete,
+ # Google Workspace (consolidated with operation dispatchers)
+ # Note: gmailReceive is a trigger node, handled by event_waiter
+ 'gmail': handle_google_gmail,
+ 'calendar': handle_google_calendar,
+ 'drive': handle_google_drive,
+ 'sheets': handle_google_sheets,
+ 'tasks': handle_google_tasks,
+ 'contacts': handle_google_contacts,
# Search
'braveSearch': handle_brave_search,
'serperSearch': handle_serper_search,
diff --git a/server/skills/productivity_agent/calendar-skill/SKILL.md b/server/skills/productivity_agent/calendar-skill/SKILL.md
index a988877d..c516e2bf 100644
--- a/server/skills/productivity_agent/calendar-skill/SKILL.md
+++ b/server/skills/productivity_agent/calendar-skill/SKILL.md
@@ -1,7 +1,7 @@
---
name: calendar-skill
description: Create, list, update, and delete Google Calendar events. Supports attendees, reminders, and recurring events.
-allowed-tools: calendar_create calendar_list calendar_update calendar_delete
+allowed-tools: google_calendar
metadata:
author: machina
version: "1.0"
@@ -14,14 +14,24 @@ metadata:
Manage Google Calendar events - create, list, update, and delete.
-## Available Tools
+## Tool: google_calendar
-### calendar_create
+Consolidated Google Calendar tool with `operation` parameter.
-Create a new calendar event.
+### Operations
+
+| Operation | Description | Required Fields |
+|-----------|-------------|-----------------|
+| `create` | Create a new event | title, start_time, end_time |
+| `list` | List events in date range | (none, defaults to this week) |
+| `update` | Update an existing event | event_id |
+| `delete` | Delete an event | event_id |
+
+### create - Create a new event
| Field | Type | Required | Description |
|-------|------|----------|-------------|
+| operation | string | Yes | Must be `"create"` |
| title | string | Yes | Event title/summary |
| start_time | string | Yes | Start time in ISO 8601 format |
| end_time | string | Yes | End time in ISO 8601 format |
@@ -34,6 +44,7 @@ Create a new calendar event.
**Example - Simple event:**
```json
{
+ "operation": "create",
"title": "Team Meeting",
"start_time": "2024-02-01T14:00:00",
"end_time": "2024-02-01T15:00:00",
@@ -44,6 +55,7 @@ Create a new calendar event.
**Example - Event with attendees:**
```json
{
+ "operation": "create",
"title": "Project Review",
"start_time": "2024-02-01T10:00:00",
"end_time": "2024-02-01T11:30:00",
@@ -53,89 +65,62 @@ Create a new calendar event.
}
```
-**Response:**
-```json
-{
- "success": true,
- "event_id": "abc123xyz",
- "title": "Team Meeting",
- "html_link": "https://calendar.google.com/event?eid=..."
-}
-```
-
-### calendar_list
-
-List calendar events within a date range.
+### list - List events in date range
| Field | Type | Required | Description |
|-------|------|----------|-------------|
+| operation | string | Yes | Must be `"list"` |
| start_date | string | No | Start date (ISO 8601, default: today) |
| end_date | string | No | End date (ISO 8601, default: 7 days ahead) |
| max_results | integer | No | Maximum results (default: 10, max: 100) |
| calendar_id | string | No | Calendar ID (default: primary) |
-**Example - List this week's events:**
+**Example:**
```json
{
+ "operation": "list",
"start_date": "2024-02-01",
"end_date": "2024-02-07",
"max_results": 20
}
```
-**Response:**
-```json
-{
- "events": [
- {
- "id": "abc123",
- "title": "Team Meeting",
- "start": "2024-02-01T14:00:00Z",
- "end": "2024-02-01T15:00:00Z",
- "location": "Conference Room A",
- "attendees": ["[email protected]"]
- }
- ],
- "count": 1
-}
-```
-
-### calendar_update
-
-Update an existing calendar event.
+### update - Update an existing event
| Field | Type | Required | Description |
|-------|------|----------|-------------|
+| operation | string | Yes | Must be `"update"` |
| event_id | string | Yes | Event ID to update |
-| title | string | No | New title |
-| start_time | string | No | New start time |
-| end_time | string | No | New end time |
-| description | string | No | New description |
-| location | string | No | New location |
-| attendees | string | No | New attendees (replaces existing) |
+| update_title | string | No | New title |
+| update_start_time | string | No | New start time |
+| update_end_time | string | No | New end time |
+| update_description | string | No | New description |
+| update_location | string | No | New location |
+| update_attendees | string | No | New attendees (replaces existing) |
**Example:**
```json
{
+ "operation": "update",
"event_id": "abc123xyz",
- "title": "Updated Team Meeting",
- "start_time": "2024-02-01T15:00:00",
- "end_time": "2024-02-01T16:00:00"
+ "update_title": "Updated Team Meeting",
+ "update_start_time": "2024-02-01T15:00:00",
+ "update_end_time": "2024-02-01T16:00:00"
}
```
-### calendar_delete
-
-Delete a calendar event.
+### delete - Delete an event
| Field | Type | Required | Description |
|-------|------|----------|-------------|
+| operation | string | Yes | Must be `"delete"` |
| event_id | string | Yes | Event ID to delete |
| calendar_id | string | No | Calendar ID (default: primary) |
**Example:**
```json
{
+ "operation": "delete",
"event_id": "abc123xyz"
}
```
@@ -156,6 +141,6 @@ Delete a calendar event.
## Setup Requirements
-1. Connect Calendar nodes to AI Agent's `input-tools` handle
+1. Connect Calendar node to AI Agent's `input-tools` handle
2. Authenticate with Google Workspace in Credentials Modal
3. Ensure Calendar API scopes are authorized
diff --git a/server/skills/productivity_agent/contacts-skill/SKILL.md b/server/skills/productivity_agent/contacts-skill/SKILL.md
index 2d3efbf4..14bc2e97 100644
--- a/server/skills/productivity_agent/contacts-skill/SKILL.md
+++ b/server/skills/productivity_agent/contacts-skill/SKILL.md
@@ -1,7 +1,7 @@
---
name: contacts-skill
description: Create, list, and search Google Contacts. Supports names, emails, phone numbers, and organizations.
-allowed-tools: contacts_create contacts_list contacts_search
+allowed-tools: google_contacts
metadata:
author: machina
version: "1.0"
@@ -14,14 +14,26 @@ metadata:
Manage Google Contacts - create, list, and search contacts.
-## Available Tools
+## Tool: google_contacts
-### contacts_create
+Consolidated Google Contacts tool with `operation` parameter.
-Create a new contact.
+### Operations
+
+| Operation | Description | Required Fields |
+|-----------|-------------|-----------------|
+| `create` | Create a new contact | first_name |
+| `list` | List contacts | (none) |
+| `search` | Search contacts by query | query |
+| `get` | Get contact details | resource_name |
+| `update` | Update existing contact | resource_name |
+| `delete` | Delete a contact | resource_name |
+
+### create - Create a new contact
| Field | Type | Required | Description |
|-------|------|----------|-------------|
+| operation | string | Yes | Must be `"create"` |
| first_name | string | Yes | Contact's first name |
| last_name | string | No | Contact's last name |
| email | string | No | Email address |
@@ -33,6 +45,7 @@ Create a new contact.
**Example - Basic contact:**
```json
{
+ "operation": "create",
"first_name": "John",
"last_name": "Smith",
"email": "[email protected]",
@@ -43,6 +56,7 @@ Create a new contact.
**Example - Full contact:**
```json
{
+ "operation": "create",
"first_name": "Jane",
"last_name": "Doe",
"email": "[email protected]",
@@ -53,71 +67,36 @@ Create a new contact.
}
```
-**Response:**
-```json
-{
- "success": true,
- "resource_name": "people/c1234567890",
- "display_name": "John Smith",
- "email": "[email protected]",
- "phone": "+1-555-123-4567"
-}
-```
-
-### contacts_list
-
-List contacts from your address book.
+### list - List contacts
| Field | Type | Required | Description |
|-------|------|----------|-------------|
+| operation | string | Yes | Must be `"list"` |
| page_size | integer | No | Results per page (default: 20, max: 100) |
| page_token | string | No | Token for next page |
-| sort_order | string | No | Sort by: LAST_MODIFIED_ASCENDING, LAST_MODIFIED_DESCENDING, FIRST_NAME_ASCENDING, LAST_NAME_ASCENDING |
+| sort_order | string | No | LAST_MODIFIED_ASCENDING, LAST_MODIFIED_DESCENDING, FIRST_NAME_ASCENDING, LAST_NAME_ASCENDING |
-**Example - List contacts:**
+**Example:**
```json
{
+ "operation": "list",
"page_size": 50,
"sort_order": "FIRST_NAME_ASCENDING"
}
```
-**Response:**
-```json
-{
- "contacts": [
- {
- "resource_name": "people/c1234567890",
- "display_name": "Alice Johnson",
- "email": "[email protected]",
- "phone": "+1-555-111-2222",
- "company": "Tech Corp",
- "job_title": "Product Manager"
- },
- {
- "resource_name": "people/c0987654321",
- "display_name": "Bob Williams",
- "email": "[email protected]",
- "phone": "+1-555-333-4444"
- }
- ],
- "count": 2,
- "next_page_token": "..."
-}
-```
-
-### contacts_search
-
-Search contacts by name or email.
+### search - Search contacts
| Field | Type | Required | Description |
|-------|------|----------|-------------|
+| operation | string | Yes | Must be `"search"` |
| query | string | Yes | Search query (name or email) |
| page_size | integer | No | Results per page (default: 10, max: 30) |
**Example - Search by name:**
```json
{
+ "operation": "search",
"query": "John"
}
```
@@ -125,23 +104,61 @@ Search contacts by name or email.
**Example - Search by email domain:**
```json
{
+ "operation": "search",
"query": "@company.com"
}
```
-**Response:**
+### get - Get contact details
+
+| Field | Type | Required | Description |
+|-------|------|----------|-------------|
+| operation | string | Yes | Must be `"get"` |
+| resource_name | string | Yes | Contact resource name (e.g., "people/c1234567890") |
+
+**Example:**
+```json
+{
+ "operation": "get",
+ "resource_name": "people/c1234567890"
+}
+```
+
+### update - Update a contact
+
+| Field | Type | Required | Description |
+|-------|------|----------|-------------|
+| operation | string | Yes | Must be `"update"` |
+| resource_name | string | Yes | Contact resource name |
+| update_first_name | string | No | New first name |
+| update_last_name | string | No | New last name |
+| update_email | string | No | New email |
+| update_phone | string | No | New phone |
+| update_company | string | No | New company |
+| update_job_title | string | No | New job title |
+
+**Example:**
+```json
+{
+ "operation": "update",
+ "resource_name": "people/c1234567890",
+ "update_email": "[email protected]",
+ "update_job_title": "Director of Engineering"
+}
+```
+
+### delete - Delete a contact
+
+| Field | Type | Required | Description |
+|-------|------|----------|-------------|
+| operation | string | Yes | Must be `"delete"` |
+| resource_name | string | Yes | Contact resource name |
+
+**Example:**
```json
{
- "contacts": [
- {
- "resource_name": "people/c1234567890",
- "display_name": "John Smith",
- "email": "[email protected]",
- "phone": "+1-555-123-4567",
- "company": "Example Inc"
- }
- ],
- "count": 1
+ "operation": "delete",
+ "resource_name": "people/c1234567890"
}
```
@@ -183,6 +200,6 @@ Accepted formats:
## Setup Requirements
-1. Connect Contacts nodes to AI Agent's `input-tools` handle
+1. Connect Contacts node to AI Agent's `input-tools` handle
2. Authenticate with Google Workspace in Credentials Modal
3. Ensure People API (Contacts) scopes are authorized
diff --git a/server/skills/productivity_agent/drive-skill/SKILL.md b/server/skills/productivity_agent/drive-skill/SKILL.md
index f25e828e..8f4a4ec4 100644
--- a/server/skills/productivity_agent/drive-skill/SKILL.md
+++ b/server/skills/productivity_agent/drive-skill/SKILL.md
@@ -1,7 +1,7 @@
---
name: drive-skill
description: Upload, download, list, and share Google Drive files. Supports folders, file search, and permission management.
-allowed-tools: drive_upload drive_download drive_list drive_share
+allowed-tools: google_drive
metadata:
author: machina
version: "1.0"
@@ -14,14 +14,24 @@ metadata:
Manage Google Drive files - upload, download, list, and share.
-## Available Tools
+## Tool: google_drive
-### drive_upload
+Consolidated Google Drive tool with `operation` parameter.
-Upload a file to Google Drive.
+### Operations
+
+| Operation | Description | Required Fields |
+|-----------|-------------|-----------------|
+| `upload` | Upload a file to Drive | filename + (file_url or file_content) |
+| `download` | Download a file by ID | file_id |
+| `list` | List/search files | (none, defaults to root) |
+| `share` | Share a file with a user | file_id, email |
+
+### upload - Upload a file
| Field | Type | Required | Description |
|-------|------|----------|-------------|
+| operation | string | Yes | Must be `"upload"` |
| file_url | string | Yes* | URL of file to upload |
| file_content | string | Yes* | Base64 encoded file content |
| filename | string | Yes | Name for the uploaded file |
@@ -33,149 +43,76 @@ Upload a file to Google Drive.
**Example - Upload from URL:**
```json
{
+ "operation": "upload",
"file_url": "https://example.com/report.pdf",
"filename": "Q4_Report.pdf",
"folder_id": "1abc123def456"
}
```
-**Example - Upload with content:**
-```json
-{
- "file_content": "SGVsbG8gV29ybGQh...",
- "filename": "notes.txt",
- "mime_type": "text/plain"
-}
-```
-
-**Response:**
-```json
-{
- "success": true,
- "file_id": "1xyz789abc",
- "name": "Q4_Report.pdf",
- "web_link": "https://drive.google.com/file/d/1xyz789abc/view",
- "size": 102400
-}
-```
-
-### drive_download
-
-Download a file from Google Drive.
+### download - Download a file
| Field | Type | Required | Description |
|-------|------|----------|-------------|
+| operation | string | Yes | Must be `"download"` |
| file_id | string | Yes | File ID to download |
-| output_path | string | No | Local path to save file |
+| output_format | string | No | `"base64"` or `"url"` (default: base64) |
**Example:**
```json
{
+ "operation": "download",
"file_id": "1xyz789abc"
}
```
-**Response:**
-```json
-{
- "success": true,
- "file_id": "1xyz789abc",
- "name": "report.pdf",
- "mime_type": "application/pdf",
- "size": 102400,
- "content": "base64_encoded_content..."
-}
-```
-
-### drive_list
-
-List files in Google Drive.
+### list - List/search files
| Field | Type | Required | Description |
|-------|------|----------|-------------|
+| operation | string | Yes | Must be `"list"` |
| folder_id | string | No | Folder ID (default: root) |
-| query | string | No | Search query |
-| max_results | integer | No | Maximum results (default: 10, max: 100) |
-| file_types | string | No | Filter by MIME types (comma-separated) |
+| query | string | No | Drive search query |
+| max_results | integer | No | Maximum results (default: 20, max: 1000) |
+| file_types | string | No | Filter: `"all"`, `"folder"`, `"document"`, `"spreadsheet"`, `"image"` |
+| order_by | string | No | Sort order (default: `"modifiedTime desc"`) |
**Query Syntax:**
- `name contains 'report'` - Files with "report" in name
- `mimeType = 'application/pdf'` - PDF files only
- `modifiedTime > '2024-01-01'` - Recently modified
-- `'folder_id' in parents` - Files in specific folder
- `trashed = false` - Exclude trashed files
-**Example - List folder contents:**
-```json
-{
- "folder_id": "1abc123def456",
- "max_results": 20
-}
-```
-
**Example - Search for PDFs:**
```json
{
+ "operation": "list",
"query": "name contains 'invoice' and mimeType = 'application/pdf'",
"max_results": 50
}
```
-**Response:**
-```json
-{
- "files": [
- {
- "id": "1xyz789abc",
- "name": "invoice_001.pdf",
- "mime_type": "application/pdf",
- "size": 51200,
- "created_time": "2024-01-15T10:30:00Z",
- "modified_time": "2024-01-15T10:30:00Z",
- "web_link": "https://drive.google.com/file/d/1xyz789abc/view"
- }
- ],
- "count": 1,
- "next_page_token": "..."
-}
-```
-
-### drive_share
-
-Share a file with specific users.
+### share - Share a file
| Field | Type | Required | Description |
|-------|------|----------|-------------|
+| operation | string | Yes | Must be `"share"` |
| file_id | string | Yes | File ID to share |
| email | string | Yes | Email address to share with |
-| role | string | No | Permission role (default: reader) |
+| role | string | No | `"reader"`, `"commenter"`, `"writer"` (default: reader) |
| send_notification | boolean | No | Send email notification (default: true) |
-
-**Roles:**
-- `reader` - View only
-- `commenter` - View and comment
-- `writer` - View, comment, and edit
+| message | string | No | Custom notification message |
**Example:**
```json
{
+ "operation": "share",
"file_id": "1xyz789abc",
"email": "[email protected]",
"role": "writer"
}
```
-**Response:**
-```json
-{
- "success": true,
- "file_id": "1xyz789abc",
- "shared_with": "[email protected]",
- "role": "writer",
- "share_link": "https://drive.google.com/file/d/1xyz789abc/view?usp=sharing"
-}
-```
-
## Common MIME Types
| Type | MIME Type |
@@ -197,6 +134,6 @@ Share a file with specific users.
## Setup Requirements
-1. Connect Drive nodes to AI Agent's `input-tools` handle
+1. Connect Drive node to AI Agent's `input-tools` handle
2. Authenticate with Google Workspace in Credentials Modal
3. Ensure Drive API scopes are authorized
diff --git a/server/skills/productivity_agent/gmail-skill/SKILL.md b/server/skills/productivity_agent/gmail-skill/SKILL.md
index ad412a04..176a997d 100644
--- a/server/skills/productivity_agent/gmail-skill/SKILL.md
+++ b/server/skills/productivity_agent/gmail-skill/SKILL.md
@@ -1,7 +1,7 @@
---
name: gmail-skill
description: Send, search, and read Gmail emails. Supports composing emails with attachments, searching by query, and reading email content.
-allowed-tools: gmail_send gmail_search gmail_read
+allowed-tools: google_gmail
metadata:
author: machina
version: "1.0"
@@ -14,24 +14,34 @@ metadata:
Send, search, and read emails using Gmail API.
-## Available Tools
+## Tool: google_gmail
-### gmail_send
+Consolidated Gmail tool with `operation` parameter.
-Send an email message.
+### Operations
+
+| Operation | Description | Required Fields |
+|-----------|-------------|-----------------|
+| `send` | Send an email | to, subject, body |
+| `search` | Search emails by query | query |
+| `read` | Read email by ID | message_id |
+
+### send - Send an email
| Field | Type | Required | Description |
|-------|------|----------|-------------|
+| operation | string | Yes | Must be `"send"` |
| to | string | Yes | Recipient email address |
| subject | string | Yes | Email subject line |
| body | string | Yes | Email body (plain text or HTML) |
| cc | string | No | CC recipients (comma-separated) |
| bcc | string | No | BCC recipients (comma-separated) |
-| is_html | boolean | No | Set true for HTML body (default: false) |
+| body_type | string | No | `"text"` or `"html"` (default: text) |
**Example - Send plain text email:**
```json
{
+ "operation": "send",
"subject": "Meeting Tomorrow",
"body": "Hi,\n\nJust a reminder about our meeting tomorrow at 2pm.\n\nBest regards"
@@ -41,21 +51,22 @@ Send an email message.
**Example - Send HTML email:**
```json
{
+ "operation": "send",
"subject": "Weekly Report",
"body": "<h1>Weekly Report</h1><p>Here are the highlights...</p>",
- "is_html": true
+ "body_type": "html"
}
```
-### gmail_search
-
-Search emails using Gmail query syntax.
+### search - Search emails
| Field | Type | Required | Description |
|-------|------|----------|-------------|
+| operation | string | Yes | Must be `"search"` |
| query | string | Yes | Gmail search query |
| max_results | integer | No | Maximum results (default: 10, max: 100) |
+| include_body | boolean | No | Fetch full message body (default: false) |
**Query Syntax Examples:**
- `from:[email protected]` - Emails from specific sender
@@ -72,57 +83,25 @@ Search emails using Gmail query syntax.
**Example:**
```json
{
+ "operation": "search",
"query": "from:[email protected] has:attachment after:2024/01/01",
"max_results": 20
}
```
-**Response:**
-```json
-{
- "emails": [
- {
- "id": "abc123",
- "thread_id": "thread456",
- "subject": "Project Files",
- "from": "[email protected]",
- "date": "2024-01-15T10:30:00Z",
- "snippet": "Please find attached..."
- }
- ],
- "count": 1
-}
-```
-
-### gmail_read
-
-Read full email content by ID.
+### read - Read email content
| Field | Type | Required | Description |
|-------|------|----------|-------------|
-| email_id | string | Yes | Email ID from search results |
+| operation | string | Yes | Must be `"read"` |
+| message_id | string | Yes | Gmail message ID from search results |
+| format | string | No | `"full"`, `"minimal"`, `"raw"`, `"metadata"` (default: full) |
**Example:**
```json
{
- "email_id": "abc123"
-}
-```
-
-**Response:**
-```json
-{
- "id": "abc123",
- "thread_id": "thread456",
- "subject": "Project Files",
- "from": "[email protected]",
- "date": "2024-01-15T10:30:00Z",
- "body": "Full email body content...",
- "attachments": [
- {"filename": "report.pdf", "mime_type": "application/pdf", "size": 102400}
- ]
+ "operation": "read",
+ "message_id": "abc123"
}
```
@@ -135,6 +114,6 @@ Read full email content by ID.
## Setup Requirements
-1. Connect Gmail nodes to AI Agent's `input-tools` handle
+1. Connect Gmail node to AI Agent's `input-tools` handle
2. Authenticate with Google Workspace in Credentials Modal
3. Ensure Gmail API scopes are authorized
diff --git a/server/skills/productivity_agent/sheets-skill/SKILL.md b/server/skills/productivity_agent/sheets-skill/SKILL.md
index 4b453811..3891c022 100644
--- a/server/skills/productivity_agent/sheets-skill/SKILL.md
+++ b/server/skills/productivity_agent/sheets-skill/SKILL.md
@@ -1,7 +1,7 @@
---
name: sheets-skill
description: Read, write, and append data to Google Sheets spreadsheets. Supports cell ranges, formulas, and batch operations.
-allowed-tools: sheets_read sheets_write sheets_append
+allowed-tools: google_sheets
metadata:
author: machina
version: "1.0"
@@ -14,14 +14,23 @@ metadata:
Read and write data to Google Sheets spreadsheets.
-## Available Tools
+## Tool: google_sheets
-### sheets_read
+Consolidated Google Sheets tool with `operation` parameter.
-Read data from a spreadsheet range.
+### Operations
+
+| Operation | Description | Required Fields |
+|-----------|-------------|-----------------|
+| `read` | Read data from a range | spreadsheet_id, range |
+| `write` | Write data to a range | spreadsheet_id, range, values |
+| `append` | Append rows to a table | spreadsheet_id, range, values |
+
+### read - Read spreadsheet data
| Field | Type | Required | Description |
|-------|------|----------|-------------|
+| operation | string | Yes | Must be `"read"` |
| spreadsheet_id | string | Yes | Spreadsheet ID from URL |
| range | string | Yes | A1 notation range (e.g., "Sheet1!A1:D10") |
@@ -38,44 +47,26 @@ From URL: `https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/edit`
**Example:**
```json
{
+ "operation": "read",
"spreadsheet_id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms",
"range": "Sheet1!A1:E10"
}
```
-**Response:**
-```json
-{
- "success": true,
- "range": "Sheet1!A1:E10",
- "values": [
- ["Name", "Email", "Department", "Start Date", "Status"],
- ["Alice", "[email protected]", "Engineering", "2023-01-15", "Active"],
- ["Bob", "[email protected]", "Marketing", "2023-03-20", "Active"]
- ],
- "rows": 3,
- "columns": 5
-}
-```
-
-### sheets_write
-
-Write data to a specific range (overwrites existing data).
+### write - Write data to a range
| Field | Type | Required | Description |
|-------|------|----------|-------------|
+| operation | string | Yes | Must be `"write"` |
| spreadsheet_id | string | Yes | Spreadsheet ID |
| range | string | Yes | A1 notation range |
| values | array | Yes | 2D array of values |
-| value_input_option | string | No | How to interpret values (default: USER_ENTERED) |
-
-**Value Input Options:**
-- `USER_ENTERED` - Parse values as if typed by user (formulas work)
-- `RAW` - Store values as-is (no parsing)
+| value_input_option | string | No | `"USER_ENTERED"` or `"RAW"` (default: USER_ENTERED) |
**Example - Write data:**
```json
{
+ "operation": "write",
"spreadsheet_id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms",
"range": "Sheet1!A1:C3",
"values": [
@@ -89,6 +80,7 @@ Write data to a specific range (overwrites existing data).
**Example - Write formula:**
```json
{
+ "operation": "write",
"spreadsheet_id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms",
"range": "Sheet1!D2",
"values": [["=SUM(B2:C2)"]],
@@ -96,37 +88,21 @@ Write data to a specific range (overwrites existing data).
}
```
-**Response:**
-```json
-{
- "success": true,
- "spreadsheet_id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms",
- "updated_range": "Sheet1!A1:C3",
- "updated_rows": 3,
- "updated_columns": 3,
- "updated_cells": 9
-}
-```
-
-### sheets_append
-
-Append rows to the end of a table.
+### append - Append rows to a table
| Field | Type | Required | Description |
|-------|------|----------|-------------|
+| operation | string | Yes | Must be `"append"` |
| spreadsheet_id | string | Yes | Spreadsheet ID |
| range | string | Yes | Table range (e.g., "Sheet1!A:E") |
| values | array | Yes | 2D array of rows to append |
-| value_input_option | string | No | How to interpret values (default: USER_ENTERED) |
-| insert_data_option | string | No | How to insert (default: INSERT_ROWS) |
-
-**Insert Options:**
-- `INSERT_ROWS` - Insert new rows for data
-- `OVERWRITE` - Overwrite existing data after table
+| value_input_option | string | No | `"USER_ENTERED"` or `"RAW"` (default: USER_ENTERED) |
+| insert_data_option | string | No | `"INSERT_ROWS"` or `"OVERWRITE"` (default: INSERT_ROWS) |
-**Example - Append new rows:**
+**Example:**
```json
{
+ "operation": "append",
"spreadsheet_id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms",
"range": "Sheet1!A:E",
"values": [
@@ -136,16 +112,6 @@ Append rows to the end of a table.
}
```
-**Response:**
-```json
-{
- "success": true,
- "spreadsheet_id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms",
- "updated_range": "Sheet1!A4:E5",
- "appended_rows": 2
-}
-```
-
## Common Formulas
| Formula | Description |
@@ -175,7 +141,7 @@ Append rows to the end of a table.
## Setup Requirements
-1. Connect Sheets nodes to AI Agent's `input-tools` handle
+1. Connect Sheets node to AI Agent's `input-tools` handle
2. Authenticate with Google Workspace in Credentials Modal
3. Ensure Sheets API scopes are authorized
4. Spreadsheet must be accessible to authenticated account
diff --git a/server/skills/productivity_agent/tasks-skill/SKILL.md b/server/skills/productivity_agent/tasks-skill/SKILL.md
index 92da80a1..62d8933c 100644
--- a/server/skills/productivity_agent/tasks-skill/SKILL.md
+++ b/server/skills/productivity_agent/tasks-skill/SKILL.md
@@ -1,7 +1,7 @@
---
name: tasks-skill
description: Create, list, and complete Google Tasks. Supports task lists, due dates, and notes.
-allowed-tools: tasks_create tasks_list tasks_complete
+allowed-tools: google_tasks
metadata:
author: machina
version: "1.0"
@@ -14,14 +14,25 @@ metadata:
Manage Google Tasks - create, list, and complete tasks.
-## Available Tools
+## Tool: google_tasks
-### tasks_create
+Consolidated Google Tasks tool with `operation` parameter.
-Create a new task.
+### Operations
+
+| Operation | Description | Required Fields |
+|-----------|-------------|-----------------|
+| `create` | Create a new task | title |
+| `list` | List tasks from a list | (none, defaults to @default) |
+| `complete` | Mark task as completed | task_id |
+| `update` | Update an existing task | task_id |
+| `delete` | Delete a task | task_id |
+
+### create - Create a new task
| Field | Type | Required | Description |
|-------|------|----------|-------------|
+| operation | string | Yes | Must be `"create"` |
| title | string | Yes | Task title |
| notes | string | No | Task notes/description |
| due_date | string | No | Due date (ISO 8601 or YYYY-MM-DD) |
@@ -30,6 +41,7 @@ Create a new task.
**Example - Simple task:**
```json
{
+ "operation": "create",
"title": "Review quarterly report"
}
```
@@ -37,108 +49,83 @@ Create a new task.
**Example - Task with details:**
```json
{
+ "operation": "create",
"title": "Submit expense report",
"notes": "Include receipts for conference travel",
"due_date": "2024-02-15"
}
```
-**Example - Task in specific list:**
-```json
-{
- "title": "Buy groceries",
- "tasklist_id": "MTIzNDU2Nzg5MA",
- "due_date": "2024-02-01"
-}
-```
-
-**Response:**
-```json
-{
- "success": true,
- "task_id": "abc123xyz",
- "title": "Submit expense report",
- "status": "needsAction",
- "due": "2024-02-15T00:00:00Z"
-}
-```
-
-### tasks_list
-
-List tasks from a task list.
+### list - List tasks
| Field | Type | Required | Description |
|-------|------|----------|-------------|
+| operation | string | Yes | Must be `"list"` |
| tasklist_id | string | No | Task list ID (default: @default) |
| show_completed | boolean | No | Include completed tasks (default: false) |
| show_hidden | boolean | No | Include hidden tasks (default: false) |
-| max_results | integer | No | Maximum results (default: 20, max: 100) |
-| due_min | string | No | Filter by minimum due date |
-| due_max | string | No | Filter by maximum due date |
+| max_results | integer | No | Maximum results (default: 100) |
**Example - List pending tasks:**
```json
{
+ "operation": "list",
"show_completed": false,
"max_results": 50
}
```
-**Example - Tasks due this week:**
-```json
-{
- "due_min": "2024-02-01",
- "due_max": "2024-02-07"
-}
-```
+### complete - Mark task as completed
-**Response:**
+| Field | Type | Required | Description |
+|-------|------|----------|-------------|
+| operation | string | Yes | Must be `"complete"` |
+| task_id | string | Yes | Task ID to complete |
+| tasklist_id | string | No | Task list ID (default: @default) |
+
+**Example:**
```json
{
- "tasks": [
- {
- "id": "abc123xyz",
- "title": "Submit expense report",
- "notes": "Include receipts for conference travel",
- "status": "needsAction",
- "due": "2024-02-15T00:00:00Z",
- "updated": "2024-02-01T10:30:00Z"
- },
- {
- "id": "def456uvw",
- "title": "Review quarterly report",
- "status": "needsAction",
- "updated": "2024-02-01T09:00:00Z"
- }
- ],
- "count": 2
+ "operation": "complete",
+ "task_id": "abc123xyz"
}
```
-### tasks_complete
-
-Mark a task as completed.
+### update - Update a task
| Field | Type | Required | Description |
|-------|------|----------|-------------|
-| task_id | string | Yes | Task ID to complete |
+| operation | string | Yes | Must be `"update"` |
+| task_id | string | Yes | Task ID to update |
| tasklist_id | string | No | Task list ID (default: @default) |
+| update_title | string | No | New title |
+| update_notes | string | No | New notes |
+| update_due_date | string | No | New due date |
+| update_status | string | No | New status: `"needsAction"` or `"completed"` |
**Example:**
```json
{
- "task_id": "abc123xyz"
+ "operation": "update",
+ "task_id": "abc123xyz",
+ "update_title": "Updated task title",
+ "update_due_date": "2024-03-01"
}
```
-**Response:**
+### delete - Delete a task
+
+| Field | Type | Required | Description |
+|-------|------|----------|-------------|
+| operation | string | Yes | Must be `"delete"` |
+| task_id | string | Yes | Task ID to delete |
+| tasklist_id | string | No | Task list ID (default: @default) |
+
+**Example:**
```json
{
- "success": true,
- "task_id": "abc123xyz",
- "title": "Submit expense report",
- "status": "completed",
- "completed": "2024-02-10T14:30:00Z"
+ "operation": "delete",
+ "task_id": "abc123xyz"
}
```
@@ -178,6 +165,6 @@ The default task list is `@default`. To work with custom lists:
## Setup Requirements
-1. Connect Tasks nodes to AI Agent's `input-tools` handle
+1. Connect Tasks node to AI Agent's `input-tools` handle
2. Authenticate with Google Workspace in Credentials Modal
3. Ensure Tasks API scopes are authorized