diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/settings-modal/components/credentials/credentials-manager.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/settings-modal/components/credentials/credentials-manager.tsx index 04a57eb84..ff68b4276 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/settings-modal/components/credentials/credentials-manager.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/settings-modal/components/credentials/credentials-manager.tsx @@ -2,7 +2,7 @@ import { createElement, useEffect, useMemo, useState } from 'react' import { createLogger } from '@sim/logger' -import { AlertTriangle, Plus, RefreshCw, Search, Share2, Trash2 } from 'lucide-react' +import { AlertTriangle, Check, Copy, Plus, RefreshCw, Search, Share2, Trash2 } from 'lucide-react' import { useParams } from 'next/navigation' import { Badge, @@ -185,6 +185,7 @@ export function CredentialsManager() { const [selectedDescriptionDraft, setSelectedDescriptionDraft] = useState('') const [selectedDisplayNameDraft, setSelectedDisplayNameDraft] = useState('') const [showCreateOAuthRequiredModal, setShowCreateOAuthRequiredModal] = useState(false) + const [copyIdSuccess, setCopyIdSuccess] = useState(false) const { data: session } = useSession() const currentUserId = session?.user?.id || '' @@ -1103,7 +1104,29 @@ export function CredentialsManager() { {selectedCredential.type === 'oauth' ? (
- +
+ + + + + + Copy credential ID + +
= { id: 'credential', title: 'Airtable Account', type: 'oauth-input', + canonicalParamId: 'oauthCredential', + mode: 'basic', serviceId: 'airtable', requiredScopes: [ 'data.records:read', @@ -42,6 +44,15 @@ export const AirtableBlock: BlockConfig = { placeholder: 'Select Airtable account', required: true, }, + { + id: 'manualCredential', + title: 'Airtable Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + required: true, + }, { id: 'baseId', title: 'Base ID', diff --git a/apps/sim/blocks/blocks/asana.ts b/apps/sim/blocks/blocks/asana.ts index d91bfba16..de8f8794c 100644 --- a/apps/sim/blocks/blocks/asana.ts +++ b/apps/sim/blocks/blocks/asana.ts @@ -32,12 +32,22 @@ export const AsanaBlock: BlockConfig = { id: 'credential', title: 'Asana Account', type: 'oauth-input', - + canonicalParamId: 'oauthCredential', + mode: 'basic', required: true, serviceId: 'asana', requiredScopes: ['default'], placeholder: 'Select Asana account', }, + { + id: 'manualCredential', + title: 'Asana Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + required: true, + }, { id: 'workspace', title: 'Workspace GID', diff --git a/apps/sim/blocks/blocks/calcom.ts b/apps/sim/blocks/blocks/calcom.ts index 17b33aaa4..2697ccd37 100644 --- a/apps/sim/blocks/blocks/calcom.ts +++ b/apps/sim/blocks/blocks/calcom.ts @@ -49,9 +49,20 @@ export const CalComBlock: BlockConfig = { title: 'Cal.com Account', type: 'oauth-input', serviceId: 'calcom', + canonicalParamId: 'oauthCredential', + mode: 'basic', placeholder: 'Select Cal.com account', required: true, }, + { + id: 'manualCredential', + title: 'Cal.com Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + required: true, + }, // === Create Booking fields === { diff --git a/apps/sim/blocks/blocks/confluence.ts b/apps/sim/blocks/blocks/confluence.ts index 970945c0c..e08510890 100644 --- a/apps/sim/blocks/blocks/confluence.ts +++ b/apps/sim/blocks/blocks/confluence.ts @@ -51,6 +51,8 @@ export const ConfluenceBlock: BlockConfig = { id: 'credential', title: 'Confluence Account', type: 'oauth-input', + canonicalParamId: 'oauthCredential', + mode: 'basic', serviceId: 'confluence', requiredScopes: [ 'read:confluence-content.all', @@ -85,6 +87,15 @@ export const ConfluenceBlock: BlockConfig = { placeholder: 'Select Confluence account', required: true, }, + { + id: 'manualCredential', + title: 'Confluence Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + required: true, + }, { id: 'pageId', title: 'Select Page', @@ -424,6 +435,8 @@ export const ConfluenceV2Block: BlockConfig = { id: 'credential', title: 'Confluence Account', type: 'oauth-input', + canonicalParamId: 'oauthCredential', + mode: 'basic', serviceId: 'confluence', requiredScopes: [ 'read:confluence-content.all', @@ -458,6 +471,15 @@ export const ConfluenceV2Block: BlockConfig = { placeholder: 'Select Confluence account', required: true, }, + { + id: 'manualCredential', + title: 'Confluence Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + required: true, + }, { id: 'domain', title: 'Domain', diff --git a/apps/sim/blocks/blocks/dropbox.ts b/apps/sim/blocks/blocks/dropbox.ts index 90be6e74f..5a6da8c1b 100644 --- a/apps/sim/blocks/blocks/dropbox.ts +++ b/apps/sim/blocks/blocks/dropbox.ts @@ -38,6 +38,8 @@ export const DropboxBlock: BlockConfig = { id: 'credential', title: 'Dropbox Account', type: 'oauth-input', + canonicalParamId: 'oauthCredential', + mode: 'basic', serviceId: 'dropbox', requiredScopes: [ 'account_info.read', @@ -51,6 +53,15 @@ export const DropboxBlock: BlockConfig = { placeholder: 'Select Dropbox account', required: true, }, + { + id: 'manualCredential', + title: 'Dropbox Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + required: true, + }, // Upload operation inputs { id: 'path', diff --git a/apps/sim/blocks/blocks/gmail.ts b/apps/sim/blocks/blocks/gmail.ts index 4a6d66e37..53f10d46c 100644 --- a/apps/sim/blocks/blocks/gmail.ts +++ b/apps/sim/blocks/blocks/gmail.ts @@ -76,6 +76,8 @@ export const GmailBlock: BlockConfig = { id: 'credential', title: 'Gmail Account', type: 'oauth-input', + canonicalParamId: 'oauthCredential', + mode: 'basic', serviceId: 'gmail', requiredScopes: [ 'https://www.googleapis.com/auth/gmail.send', @@ -85,6 +87,15 @@ export const GmailBlock: BlockConfig = { placeholder: 'Select Gmail account', required: true, }, + { + id: 'manualCredential', + title: 'Gmail Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + required: true, + }, // Send Email Fields { id: 'to', @@ -406,7 +417,7 @@ Return ONLY the search query - no explanations, no extra text.`, tool: selectGmailToolId, params: (params) => { const { - credential, + oauthCredential, folder, addLabelIds, removeLabelIds, @@ -467,7 +478,7 @@ Return ONLY the search query - no explanations, no extra text.`, return { ...rest, - credential, + credential: oauthCredential, ...(normalizedAttachments && { attachments: normalizedAttachments }), } }, diff --git a/apps/sim/blocks/blocks/google_calendar.ts b/apps/sim/blocks/blocks/google_calendar.ts index 2c28ebeba..b06a796d9 100644 --- a/apps/sim/blocks/blocks/google_calendar.ts +++ b/apps/sim/blocks/blocks/google_calendar.ts @@ -39,11 +39,22 @@ export const GoogleCalendarBlock: BlockConfig = { id: 'credential', title: 'Google Calendar Account', type: 'oauth-input', + canonicalParamId: 'oauthCredential', + mode: 'basic', required: true, serviceId: 'google-calendar', requiredScopes: ['https://www.googleapis.com/auth/calendar'], placeholder: 'Select Google Calendar account', }, + { + id: 'manualCredential', + title: 'Google Calendar Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + required: true, + }, // Calendar selector (basic mode) - not needed for list_calendars { id: 'calendarId', @@ -576,7 +587,7 @@ Return ONLY the natural language event text - no explanations.`, } return { - credential, + credential: oauthCredential, ...processedParams, } }, diff --git a/apps/sim/blocks/blocks/google_docs.ts b/apps/sim/blocks/blocks/google_docs.ts index 2a780fd78..d20332a53 100644 --- a/apps/sim/blocks/blocks/google_docs.ts +++ b/apps/sim/blocks/blocks/google_docs.ts @@ -32,6 +32,8 @@ export const GoogleDocsBlock: BlockConfig = { id: 'credential', title: 'Google Account', type: 'oauth-input', + canonicalParamId: 'oauthCredential', + mode: 'basic', required: true, serviceId: 'google-docs', requiredScopes: [ @@ -40,6 +42,15 @@ export const GoogleDocsBlock: BlockConfig = { ], placeholder: 'Select Google account', }, + { + id: 'manualCredential', + title: 'Google Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + required: true, + }, // Document selector (basic mode) { id: 'documentId', @@ -157,7 +168,7 @@ Return ONLY the document content - no explanations, no extra text.`, } }, params: (params) => { - const { credential, documentId, folderId, ...rest } = params + const { oauthCredential, documentId, folderId, ...rest } = params const effectiveDocumentId = documentId ? String(documentId).trim() : '' const effectiveFolderId = folderId ? String(folderId).trim() : '' @@ -166,7 +177,7 @@ Return ONLY the document content - no explanations, no extra text.`, ...rest, documentId: effectiveDocumentId || undefined, folderId: effectiveFolderId || undefined, - credential, + credential: oauthCredential, } }, }, diff --git a/apps/sim/blocks/blocks/google_drive.ts b/apps/sim/blocks/blocks/google_drive.ts index 3c44d8092..64edf3747 100644 --- a/apps/sim/blocks/blocks/google_drive.ts +++ b/apps/sim/blocks/blocks/google_drive.ts @@ -44,6 +44,8 @@ export const GoogleDriveBlock: BlockConfig = { id: 'credential', title: 'Google Drive Account', type: 'oauth-input', + canonicalParamId: 'oauthCredential', + mode: 'basic', required: true, serviceId: 'google-drive', requiredScopes: [ @@ -52,6 +54,15 @@ export const GoogleDriveBlock: BlockConfig = { ], placeholder: 'Select Google Drive account', }, + { + id: 'manualCredential', + title: 'Google Drive Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + required: true, + }, // Create/Upload File Fields { id: 'fileName', @@ -786,7 +797,7 @@ Return ONLY the message text - no subject line, no greetings/signatures, no extr }, params: (params) => { const { - credential, + oauthCredential, // Folder canonical params (per-operation) uploadFolderId, createFolderParentId, @@ -873,7 +884,7 @@ Return ONLY the message text - no subject line, no greetings/signatures, no extr sendNotification === 'true' ? true : sendNotification === 'false' ? false : undefined return { - credential, + credential: oauthCredential, folderId: effectiveFolderId, fileId: effectiveFileId, destinationFolderId: effectiveDestinationFolderId, diff --git a/apps/sim/blocks/blocks/google_forms.ts b/apps/sim/blocks/blocks/google_forms.ts index 435259c57..9eba01913 100644 --- a/apps/sim/blocks/blocks/google_forms.ts +++ b/apps/sim/blocks/blocks/google_forms.ts @@ -34,6 +34,8 @@ export const GoogleFormsBlock: BlockConfig = { id: 'credential', title: 'Google Account', type: 'oauth-input', + canonicalParamId: 'oauthCredential', + mode: 'basic', required: true, serviceId: 'google-forms', requiredScopes: [ @@ -45,6 +47,15 @@ export const GoogleFormsBlock: BlockConfig = { ], placeholder: 'Select Google account', }, + { + id: 'manualCredential', + title: 'Google Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + required: true, + }, // Form selector (basic mode) { id: 'formSelector', @@ -233,7 +244,7 @@ Example for "Add a required multiple choice question about favorite color": }, params: (params) => { const { - credential, + oauthCredential, operation, formId, // Canonical param from formSelector (basic) or manualFormId (advanced) responseId, @@ -251,7 +262,7 @@ Example for "Add a required multiple choice question about favorite color": ...rest } = params - const baseParams = { ...rest, credential } + const baseParams = { ...rest, credential: oauthCredential } const effectiveFormId = formId ? String(formId).trim() : undefined switch (operation) { diff --git a/apps/sim/blocks/blocks/google_groups.ts b/apps/sim/blocks/blocks/google_groups.ts index 2e847d8c7..5c3f6fa04 100644 --- a/apps/sim/blocks/blocks/google_groups.ts +++ b/apps/sim/blocks/blocks/google_groups.ts @@ -42,6 +42,8 @@ export const GoogleGroupsBlock: BlockConfig = { id: 'credential', title: 'Google Groups Account', type: 'oauth-input', + canonicalParamId: 'oauthCredential', + mode: 'basic', required: true, serviceId: 'google-groups', requiredScopes: [ @@ -50,6 +52,15 @@ export const GoogleGroupsBlock: BlockConfig = { ], placeholder: 'Select Google Workspace account', }, + { + id: 'manualCredential', + title: 'Google Groups Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + required: true, + }, { id: 'customer', @@ -311,12 +322,12 @@ Return ONLY the description text - no explanations, no quotes, no extra text.`, } }, params: (params) => { - const { credential, operation, ...rest } = params + const { oauthCredential, operation, ...rest } = params switch (operation) { case 'list_groups': return { - credential, + credential: oauthCredential, customer: rest.customer, domain: rest.domain, query: rest.query, @@ -325,19 +336,19 @@ Return ONLY the description text - no explanations, no quotes, no extra text.`, case 'get_group': case 'delete_group': return { - credential, + credential: oauthCredential, groupKey: rest.groupKey, } case 'create_group': return { - credential, + credential: oauthCredential, email: rest.email, name: rest.name, description: rest.description, } case 'update_group': return { - credential, + credential: oauthCredential, groupKey: rest.groupKey, name: rest.newName, email: rest.newEmail, @@ -345,7 +356,7 @@ Return ONLY the description text - no explanations, no quotes, no extra text.`, } case 'list_members': return { - credential, + credential: oauthCredential, groupKey: rest.groupKey, maxResults: rest.maxResults ? Number(rest.maxResults) : undefined, roles: rest.roles, @@ -353,59 +364,59 @@ Return ONLY the description text - no explanations, no quotes, no extra text.`, case 'get_member': case 'remove_member': return { - credential, + credential: oauthCredential, groupKey: rest.groupKey, memberKey: rest.memberKey, } case 'add_member': return { - credential, + credential: oauthCredential, groupKey: rest.groupKey, email: rest.memberEmail, role: rest.role, } case 'update_member': return { - credential, + credential: oauthCredential, groupKey: rest.groupKey, memberKey: rest.memberKey, role: rest.role, } case 'has_member': return { - credential, + credential: oauthCredential, groupKey: rest.groupKey, memberKey: rest.memberKey, } case 'list_aliases': return { - credential, + credential: oauthCredential, groupKey: rest.groupKey, } case 'add_alias': return { - credential, + credential: oauthCredential, groupKey: rest.groupKey, alias: rest.alias, } case 'remove_alias': return { - credential, + credential: oauthCredential, groupKey: rest.groupKey, alias: rest.alias, } case 'get_settings': return { - credential, + credential: oauthCredential, groupEmail: rest.groupEmail, } case 'update_settings': return { - credential, + credential: oauthCredential, groupEmail: rest.groupEmail, } default: - return { credential, ...rest } + return { credential: oauthCredential, ...rest } } }, }, diff --git a/apps/sim/blocks/blocks/google_sheets.ts b/apps/sim/blocks/blocks/google_sheets.ts index 3294f0036..dedc77fa3 100644 --- a/apps/sim/blocks/blocks/google_sheets.ts +++ b/apps/sim/blocks/blocks/google_sheets.ts @@ -36,6 +36,8 @@ export const GoogleSheetsBlock: BlockConfig = { id: 'credential', title: 'Google Account', type: 'oauth-input', + canonicalParamId: 'oauthCredential', + mode: 'basic', required: true, serviceId: 'google-sheets', requiredScopes: [ @@ -44,6 +46,15 @@ export const GoogleSheetsBlock: BlockConfig = { ], placeholder: 'Select Google account', }, + { + id: 'manualCredential', + title: 'Google Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + required: true, + }, // Spreadsheet Selector { id: 'spreadsheetId', @@ -246,7 +257,7 @@ Return ONLY the JSON array - no explanations, no markdown, no extra text.`, } }, params: (params) => { - const { credential, values, spreadsheetId, ...rest } = params + const { oauthCredential, values, spreadsheetId, ...rest } = params const parsedValues = values ? JSON.parse(values as string) : undefined @@ -260,7 +271,7 @@ Return ONLY the JSON array - no explanations, no markdown, no extra text.`, ...rest, spreadsheetId: effectiveSpreadsheetId, values: parsedValues, - credential, + credential: oauthCredential, } }, }, @@ -323,6 +334,8 @@ export const GoogleSheetsV2Block: BlockConfig = { id: 'credential', title: 'Google Account', type: 'oauth-input', + canonicalParamId: 'oauthCredential', + mode: 'basic', required: true, serviceId: 'google-sheets', requiredScopes: [ @@ -331,6 +344,15 @@ export const GoogleSheetsV2Block: BlockConfig = { ], placeholder: 'Select Google account', }, + { + id: 'manualCredential', + title: 'Google Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + required: true, + }, // Spreadsheet Selector (basic mode) - not for create operation { id: 'spreadsheetId', @@ -715,7 +737,7 @@ Return ONLY the JSON array - no explanations, no markdown, no extra text.`, }), params: (params) => { const { - credential, + oauthCredential, values, spreadsheetId, sheetName, @@ -739,7 +761,7 @@ Return ONLY the JSON array - no explanations, no markdown, no extra text.`, return { title: (title as string)?.trim(), sheetTitles: sheetTitlesArray, - credential, + credential: oauthCredential, } } @@ -753,7 +775,7 @@ Return ONLY the JSON array - no explanations, no markdown, no extra text.`, if (operation === 'get_info') { return { spreadsheetId: effectiveSpreadsheetId, - credential, + credential: oauthCredential, } } @@ -763,7 +785,7 @@ Return ONLY the JSON array - no explanations, no markdown, no extra text.`, return { spreadsheetId: effectiveSpreadsheetId, ranges: parsedRanges, - credential, + credential: oauthCredential, } } @@ -774,7 +796,7 @@ Return ONLY the JSON array - no explanations, no markdown, no extra text.`, ...rest, spreadsheetId: effectiveSpreadsheetId, data: parsedData, - credential, + credential: oauthCredential, } } @@ -784,7 +806,7 @@ Return ONLY the JSON array - no explanations, no markdown, no extra text.`, return { spreadsheetId: effectiveSpreadsheetId, ranges: parsedRanges, - credential, + credential: oauthCredential, } } @@ -794,7 +816,7 @@ Return ONLY the JSON array - no explanations, no markdown, no extra text.`, sourceSpreadsheetId: effectiveSpreadsheetId, sheetId: Number.parseInt(sheetId as string, 10), destinationSpreadsheetId: (destinationSpreadsheetId as string)?.trim(), - credential, + credential: oauthCredential, } } @@ -813,7 +835,7 @@ Return ONLY the JSON array - no explanations, no markdown, no extra text.`, sheetName: effectiveSheetName, cellRange: cellRange ? (cellRange as string).trim() : undefined, values: parsedValues, - credential, + credential: oauthCredential, } }, }, diff --git a/apps/sim/blocks/blocks/google_slides.ts b/apps/sim/blocks/blocks/google_slides.ts index baa890a2a..9116017c7 100644 --- a/apps/sim/blocks/blocks/google_slides.ts +++ b/apps/sim/blocks/blocks/google_slides.ts @@ -46,6 +46,8 @@ export const GoogleSlidesBlock: BlockConfig = { id: 'credential', title: 'Google Account', type: 'oauth-input', + canonicalParamId: 'oauthCredential', + mode: 'basic', required: true, serviceId: 'google-drive', requiredScopes: [ @@ -54,6 +56,15 @@ export const GoogleSlidesBlock: BlockConfig = { ], placeholder: 'Select Google account', }, + { + id: 'manualCredential', + title: 'Google Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + required: true, + }, // Presentation selector (basic mode) - for operations that need an existing presentation { id: 'presentationId', @@ -679,7 +690,7 @@ Return ONLY the text content - no explanations, no markdown formatting markers, const result: Record = { ...rest, presentationId: effectivePresentationId || undefined, - credential, + credential: oauthCredential, } // Handle operation-specific params diff --git a/apps/sim/blocks/blocks/google_vault.ts b/apps/sim/blocks/blocks/google_vault.ts index 47e53d56d..c636bce55 100644 --- a/apps/sim/blocks/blocks/google_vault.ts +++ b/apps/sim/blocks/blocks/google_vault.ts @@ -34,6 +34,8 @@ export const GoogleVaultBlock: BlockConfig = { id: 'credential', title: 'Google Vault Account', type: 'oauth-input', + canonicalParamId: 'oauthCredential', + mode: 'basic', required: true, serviceId: 'google-vault', requiredScopes: [ @@ -42,6 +44,15 @@ export const GoogleVaultBlock: BlockConfig = { ], placeholder: 'Select Google Vault account', }, + { + id: 'manualCredential', + title: 'Google Vault Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + required: true, + }, // Create Hold inputs { id: 'matterId', @@ -438,10 +449,10 @@ Return ONLY the description text - no explanations, no quotes, no extra text.`, } }, params: (params) => { - const { credential, holdStartTime, holdEndTime, holdTerms, ...rest } = params + const { oauthCredential, holdStartTime, holdEndTime, holdTerms, ...rest } = params return { ...rest, - credential, + credential: oauthCredential, // Map hold-specific fields to their tool parameter names ...(holdStartTime && { startTime: holdStartTime }), ...(holdEndTime && { endTime: holdEndTime }), diff --git a/apps/sim/blocks/blocks/hubspot.ts b/apps/sim/blocks/blocks/hubspot.ts index fcd3e6d65..15d8e3dd7 100644 --- a/apps/sim/blocks/blocks/hubspot.ts +++ b/apps/sim/blocks/blocks/hubspot.ts @@ -39,6 +39,8 @@ export const HubSpotBlock: BlockConfig = { id: 'credential', title: 'HubSpot Account', type: 'oauth-input', + canonicalParamId: 'oauthCredential', + mode: 'basic', serviceId: 'hubspot', requiredScopes: [ 'crm.objects.contacts.read', @@ -68,6 +70,15 @@ export const HubSpotBlock: BlockConfig = { placeholder: 'Select HubSpot account', required: true, }, + { + id: 'manualCredential', + title: 'HubSpot Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + required: true, + }, { id: 'contactId', title: 'Contact ID or Email', diff --git a/apps/sim/blocks/blocks/jira.ts b/apps/sim/blocks/blocks/jira.ts index 63e06ea53..c67315b82 100644 --- a/apps/sim/blocks/blocks/jira.ts +++ b/apps/sim/blocks/blocks/jira.ts @@ -60,6 +60,8 @@ export const JiraBlock: BlockConfig = { id: 'credential', title: 'Jira Account', type: 'oauth-input', + canonicalParamId: 'oauthCredential', + mode: 'basic', required: true, serviceId: 'jira', requiredScopes: [ @@ -96,6 +98,15 @@ export const JiraBlock: BlockConfig = { ], placeholder: 'Select Jira account', }, + { + id: 'manualCredential', + title: 'Jira Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + required: true, + }, // Project selector (basic mode) { id: 'projectId', diff --git a/apps/sim/blocks/blocks/jira_service_management.ts b/apps/sim/blocks/blocks/jira_service_management.ts index 11cda3858..957676f93 100644 --- a/apps/sim/blocks/blocks/jira_service_management.ts +++ b/apps/sim/blocks/blocks/jira_service_management.ts @@ -55,6 +55,8 @@ export const JiraServiceManagementBlock: BlockConfig = { id: 'credential', title: 'Jira Account', type: 'oauth-input', + canonicalParamId: 'oauthCredential', + mode: 'basic', required: true, serviceId: 'jira', requiredScopes: [ @@ -95,6 +97,15 @@ export const JiraServiceManagementBlock: BlockConfig = { ], placeholder: 'Select Jira account', }, + { + id: 'manualCredential', + title: 'Jira Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + required: true, + }, { id: 'serviceDeskId', title: 'Service Desk ID', diff --git a/apps/sim/blocks/blocks/linear.ts b/apps/sim/blocks/blocks/linear.ts index b7b838ef2..8cece59da 100644 --- a/apps/sim/blocks/blocks/linear.ts +++ b/apps/sim/blocks/blocks/linear.ts @@ -129,11 +129,22 @@ export const LinearBlock: BlockConfig = { id: 'credential', title: 'Linear Account', type: 'oauth-input', + canonicalParamId: 'oauthCredential', + mode: 'basic', serviceId: 'linear', requiredScopes: ['read', 'write'], placeholder: 'Select Linear account', required: true, }, + { + id: 'manualCredential', + title: 'Linear Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + required: true, + }, // Team selector (for most operations) { id: 'teamId', diff --git a/apps/sim/blocks/blocks/linkedin.ts b/apps/sim/blocks/blocks/linkedin.ts index 25e1dfb57..281970a91 100644 --- a/apps/sim/blocks/blocks/linkedin.ts +++ b/apps/sim/blocks/blocks/linkedin.ts @@ -33,10 +33,21 @@ export const LinkedInBlock: BlockConfig = { title: 'LinkedIn Account', type: 'oauth-input', serviceId: 'linkedin', + canonicalParamId: 'oauthCredential', + mode: 'basic', requiredScopes: ['profile', 'openid', 'email', 'w_member_social'], placeholder: 'Select LinkedIn account', required: true, }, + { + id: 'manualCredential', + title: 'LinkedIn Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + required: true, + }, // Share Post specific fields { diff --git a/apps/sim/blocks/blocks/microsoft_excel.ts b/apps/sim/blocks/blocks/microsoft_excel.ts index 990912424..1acef517b 100644 --- a/apps/sim/blocks/blocks/microsoft_excel.ts +++ b/apps/sim/blocks/blocks/microsoft_excel.ts @@ -36,6 +36,8 @@ export const MicrosoftExcelBlock: BlockConfig = { id: 'credential', title: 'Microsoft Account', type: 'oauth-input', + canonicalParamId: 'oauthCredential', + mode: 'basic', serviceId: 'microsoft-excel', requiredScopes: [ 'openid', @@ -48,6 +50,15 @@ export const MicrosoftExcelBlock: BlockConfig = { placeholder: 'Select Microsoft account', required: true, }, + { + id: 'manualCredential', + title: 'Microsoft Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + required: true, + }, { id: 'spreadsheetId', title: 'Select Sheet', @@ -351,6 +362,8 @@ export const MicrosoftExcelV2Block: BlockConfig = { id: 'credential', title: 'Microsoft Account', type: 'oauth-input', + canonicalParamId: 'oauthCredential', + mode: 'basic', serviceId: 'microsoft-excel', requiredScopes: [ 'openid', @@ -363,6 +376,15 @@ export const MicrosoftExcelV2Block: BlockConfig = { placeholder: 'Select Microsoft account', required: true, }, + { + id: 'manualCredential', + title: 'Microsoft Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + required: true, + }, // Spreadsheet Selector (basic mode) { id: 'spreadsheetId', diff --git a/apps/sim/blocks/blocks/microsoft_planner.ts b/apps/sim/blocks/blocks/microsoft_planner.ts index b49f8c284..7d3867e57 100644 --- a/apps/sim/blocks/blocks/microsoft_planner.ts +++ b/apps/sim/blocks/blocks/microsoft_planner.ts @@ -61,6 +61,8 @@ export const MicrosoftPlannerBlock: BlockConfig = { id: 'credential', title: 'Microsoft Account', type: 'oauth-input', + canonicalParamId: 'oauthCredential', + mode: 'basic', serviceId: 'microsoft-planner', requiredScopes: [ 'openid', @@ -73,6 +75,14 @@ export const MicrosoftPlannerBlock: BlockConfig = { ], placeholder: 'Select Microsoft account', }, + { + id: 'manualCredential', + title: 'Microsoft Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + }, // Plan ID - for various operations { diff --git a/apps/sim/blocks/blocks/microsoft_teams.ts b/apps/sim/blocks/blocks/microsoft_teams.ts index 9cf21df99..da287ba63 100644 --- a/apps/sim/blocks/blocks/microsoft_teams.ts +++ b/apps/sim/blocks/blocks/microsoft_teams.ts @@ -44,6 +44,8 @@ export const MicrosoftTeamsBlock: BlockConfig = { id: 'credential', title: 'Microsoft Account', type: 'oauth-input', + canonicalParamId: 'oauthCredential', + mode: 'basic', serviceId: 'microsoft-teams', requiredScopes: [ 'openid', @@ -70,6 +72,15 @@ export const MicrosoftTeamsBlock: BlockConfig = { placeholder: 'Select Microsoft account', required: true, }, + { + id: 'manualCredential', + title: 'Microsoft Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + required: true, + }, { id: 'teamSelector', title: 'Select Team', diff --git a/apps/sim/blocks/blocks/notion.ts b/apps/sim/blocks/blocks/notion.ts index a970de73f..f0ac80786 100644 --- a/apps/sim/blocks/blocks/notion.ts +++ b/apps/sim/blocks/blocks/notion.ts @@ -38,10 +38,21 @@ export const NotionBlock: BlockConfig = { id: 'credential', title: 'Notion Account', type: 'oauth-input', + canonicalParamId: 'oauthCredential', + mode: 'basic', serviceId: 'notion', placeholder: 'Select Notion account', required: true, }, + { + id: 'manualCredential', + title: 'Notion Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + required: true, + }, // Read/Write operation - Page ID { id: 'pageId', diff --git a/apps/sim/blocks/blocks/onedrive.ts b/apps/sim/blocks/blocks/onedrive.ts index 47a15d0cc..6ddcc4e07 100644 --- a/apps/sim/blocks/blocks/onedrive.ts +++ b/apps/sim/blocks/blocks/onedrive.ts @@ -39,6 +39,8 @@ export const OneDriveBlock: BlockConfig = { id: 'credential', title: 'Microsoft Account', type: 'oauth-input', + canonicalParamId: 'oauthCredential', + mode: 'basic', serviceId: 'onedrive', requiredScopes: [ 'openid', @@ -50,6 +52,14 @@ export const OneDriveBlock: BlockConfig = { ], placeholder: 'Select Microsoft account', }, + { + id: 'manualCredential', + title: 'Microsoft Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + }, // Create File Fields { id: 'fileName', diff --git a/apps/sim/blocks/blocks/outlook.ts b/apps/sim/blocks/blocks/outlook.ts index a22d4195c..5bc98bea2 100644 --- a/apps/sim/blocks/blocks/outlook.ts +++ b/apps/sim/blocks/blocks/outlook.ts @@ -39,6 +39,8 @@ export const OutlookBlock: BlockConfig = { id: 'credential', title: 'Microsoft Account', type: 'oauth-input', + canonicalParamId: 'oauthCredential', + mode: 'basic', serviceId: 'outlook', requiredScopes: [ 'Mail.ReadWrite', @@ -53,6 +55,15 @@ export const OutlookBlock: BlockConfig = { placeholder: 'Select Microsoft account', required: true, }, + { + id: 'manualCredential', + title: 'Microsoft Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + required: true, + }, { id: 'to', title: 'To', diff --git a/apps/sim/blocks/blocks/pipedrive.ts b/apps/sim/blocks/blocks/pipedrive.ts index 22d81d782..68f4e940f 100644 --- a/apps/sim/blocks/blocks/pipedrive.ts +++ b/apps/sim/blocks/blocks/pipedrive.ts @@ -45,6 +45,8 @@ export const PipedriveBlock: BlockConfig = { id: 'credential', title: 'Pipedrive Account', type: 'oauth-input', + canonicalParamId: 'oauthCredential', + mode: 'basic', serviceId: 'pipedrive', requiredScopes: [ 'base', @@ -58,6 +60,15 @@ export const PipedriveBlock: BlockConfig = { placeholder: 'Select Pipedrive account', required: true, }, + { + id: 'manualCredential', + title: 'Pipedrive Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + required: true, + }, { id: 'status', title: 'Status', diff --git a/apps/sim/blocks/blocks/reddit.ts b/apps/sim/blocks/blocks/reddit.ts index 5eb27e5fb..0ef54f740 100644 --- a/apps/sim/blocks/blocks/reddit.ts +++ b/apps/sim/blocks/blocks/reddit.ts @@ -43,6 +43,8 @@ export const RedditBlock: BlockConfig = { title: 'Reddit Account', type: 'oauth-input', serviceId: 'reddit', + canonicalParamId: 'oauthCredential', + mode: 'basic', requiredScopes: [ 'identity', 'read', @@ -64,6 +66,15 @@ export const RedditBlock: BlockConfig = { placeholder: 'Select Reddit account', required: true, }, + { + id: 'manualCredential', + title: 'Reddit Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + required: true, + }, // Common fields - appear for all actions { diff --git a/apps/sim/blocks/blocks/salesforce.ts b/apps/sim/blocks/blocks/salesforce.ts index e5f077e5f..77549ca84 100644 --- a/apps/sim/blocks/blocks/salesforce.ts +++ b/apps/sim/blocks/blocks/salesforce.ts @@ -62,11 +62,22 @@ export const SalesforceBlock: BlockConfig = { id: 'credential', title: 'Salesforce Account', type: 'oauth-input', + canonicalParamId: 'oauthCredential', + mode: 'basic', serviceId: 'salesforce', requiredScopes: ['api', 'refresh_token', 'openid', 'offline_access'], placeholder: 'Select Salesforce account', required: true, }, + { + id: 'manualCredential', + title: 'Salesforce Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + required: true, + }, // Common fields for GET operations { id: 'fields', diff --git a/apps/sim/blocks/blocks/sharepoint.ts b/apps/sim/blocks/blocks/sharepoint.ts index f10c1d5d9..f85f3fd40 100644 --- a/apps/sim/blocks/blocks/sharepoint.ts +++ b/apps/sim/blocks/blocks/sharepoint.ts @@ -38,6 +38,8 @@ export const SharepointBlock: BlockConfig = { id: 'credential', title: 'Microsoft Account', type: 'oauth-input', + canonicalParamId: 'oauthCredential', + mode: 'basic', serviceId: 'sharepoint', requiredScopes: [ 'openid', @@ -50,6 +52,14 @@ export const SharepointBlock: BlockConfig = { ], placeholder: 'Select Microsoft account', }, + { + id: 'manualCredential', + title: 'Microsoft Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + }, { id: 'siteSelector', diff --git a/apps/sim/blocks/blocks/shopify.ts b/apps/sim/blocks/blocks/shopify.ts index 3d98542f4..dbd3a0471 100644 --- a/apps/sim/blocks/blocks/shopify.ts +++ b/apps/sim/blocks/blocks/shopify.ts @@ -61,6 +61,8 @@ export const ShopifyBlock: BlockConfig = { title: 'Shopify Account', type: 'oauth-input', serviceId: 'shopify', + canonicalParamId: 'oauthCredential', + mode: 'basic', requiredScopes: [ 'write_products', 'write_orders', @@ -72,6 +74,15 @@ export const ShopifyBlock: BlockConfig = { placeholder: 'Select Shopify account', required: true, }, + { + id: 'manualCredential', + title: 'Shopify Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + required: true, + }, { id: 'shopDomain', title: 'Shop Domain', diff --git a/apps/sim/blocks/blocks/slack.ts b/apps/sim/blocks/blocks/slack.ts index 38f22ca78..b7b91a792 100644 --- a/apps/sim/blocks/blocks/slack.ts +++ b/apps/sim/blocks/blocks/slack.ts @@ -69,6 +69,8 @@ export const SlackBlock: BlockConfig = { id: 'credential', title: 'Slack Account', type: 'oauth-input', + canonicalParamId: 'oauthCredential', + mode: 'basic', serviceId: 'slack', requiredScopes: [ 'channels:read', @@ -94,6 +96,20 @@ export const SlackBlock: BlockConfig = { }, required: true, }, + { + id: 'manualCredential', + title: 'Slack Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + dependsOn: ['authMethod'], + condition: { + field: 'authMethod', + value: 'oauth', + }, + required: true, + }, { id: 'botToken', title: 'Bot Token', @@ -547,7 +563,7 @@ Return ONLY the timestamp string - no explanations, no quotes, no extra text.`, }, params: (params) => { const { - credential, + oauthCredential, authMethod, botToken, operation, @@ -597,7 +613,7 @@ Return ONLY the timestamp string - no explanations, no quotes, no extra text.`, baseParams.accessToken = botToken } else { // Default to OAuth - baseParams.credential = credential + baseParams.credential = oauthCredential } switch (operation) { diff --git a/apps/sim/blocks/blocks/spotify.ts b/apps/sim/blocks/blocks/spotify.ts index 4b450bac3..8a80846e1 100644 --- a/apps/sim/blocks/blocks/spotify.ts +++ b/apps/sim/blocks/blocks/spotify.ts @@ -160,6 +160,17 @@ export const SpotifyBlock: BlockConfig = { title: 'Spotify Account', type: 'oauth-input', serviceId: 'spotify', + canonicalParamId: 'oauthCredential', + mode: 'basic', + required: true, + }, + { + id: 'manualCredential', + title: 'Spotify Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', required: true, }, diff --git a/apps/sim/blocks/blocks/trello.ts b/apps/sim/blocks/blocks/trello.ts index 0de378a8c..9cfd4d15b 100644 --- a/apps/sim/blocks/blocks/trello.ts +++ b/apps/sim/blocks/blocks/trello.ts @@ -42,10 +42,21 @@ export const TrelloBlock: BlockConfig = { title: 'Trello Account', type: 'oauth-input', serviceId: 'trello', + canonicalParamId: 'oauthCredential', + mode: 'basic', requiredScopes: ['read', 'write'], placeholder: 'Select Trello account', required: true, }, + { + id: 'manualCredential', + title: 'Trello Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + required: true, + }, { id: 'boardId', diff --git a/apps/sim/blocks/blocks/wealthbox.ts b/apps/sim/blocks/blocks/wealthbox.ts index f14921377..d4810e22d 100644 --- a/apps/sim/blocks/blocks/wealthbox.ts +++ b/apps/sim/blocks/blocks/wealthbox.ts @@ -33,11 +33,22 @@ export const WealthboxBlock: BlockConfig = { id: 'credential', title: 'Wealthbox Account', type: 'oauth-input', + canonicalParamId: 'oauthCredential', + mode: 'basic', serviceId: 'wealthbox', requiredScopes: ['login', 'data'], placeholder: 'Select Wealthbox account', required: true, }, + { + id: 'manualCredential', + title: 'Wealthbox Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + required: true, + }, { id: 'noteId', title: 'Note ID', diff --git a/apps/sim/blocks/blocks/webflow.ts b/apps/sim/blocks/blocks/webflow.ts index c785413bf..734f62635 100644 --- a/apps/sim/blocks/blocks/webflow.ts +++ b/apps/sim/blocks/blocks/webflow.ts @@ -34,11 +34,22 @@ export const WebflowBlock: BlockConfig = { id: 'credential', title: 'Webflow Account', type: 'oauth-input', + canonicalParamId: 'oauthCredential', + mode: 'basic', serviceId: 'webflow', requiredScopes: ['sites:read', 'sites:write', 'cms:read', 'cms:write'], placeholder: 'Select Webflow account', required: true, }, + { + id: 'manualCredential', + title: 'Webflow Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + required: true, + }, { id: 'siteSelector', title: 'Site', diff --git a/apps/sim/blocks/blocks/wordpress.ts b/apps/sim/blocks/blocks/wordpress.ts index 207c19740..1e53f6e4f 100644 --- a/apps/sim/blocks/blocks/wordpress.ts +++ b/apps/sim/blocks/blocks/wordpress.ts @@ -65,11 +65,22 @@ export const WordPressBlock: BlockConfig = { id: 'credential', title: 'WordPress Account', type: 'oauth-input', + canonicalParamId: 'oauthCredential', + mode: 'basic', serviceId: 'wordpress', requiredScopes: ['global'], placeholder: 'Select WordPress account', required: true, }, + { + id: 'manualCredential', + title: 'WordPress Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + required: true, + }, // Site ID for WordPress.com (required for OAuth) { diff --git a/apps/sim/blocks/blocks/x.ts b/apps/sim/blocks/blocks/x.ts index 4fc65d14b..971f59af9 100644 --- a/apps/sim/blocks/blocks/x.ts +++ b/apps/sim/blocks/blocks/x.ts @@ -32,9 +32,19 @@ export const XBlock: BlockConfig = { title: 'X Account', type: 'oauth-input', serviceId: 'x', + canonicalParamId: 'oauthCredential', + mode: 'basic', requiredScopes: ['tweet.read', 'tweet.write', 'users.read', 'offline.access'], placeholder: 'Select X account', }, + { + id: 'manualCredential', + title: 'X Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + }, { id: 'text', title: 'Tweet Text', diff --git a/apps/sim/blocks/blocks/zoom.ts b/apps/sim/blocks/blocks/zoom.ts index 77d9bbb55..d76c01916 100644 --- a/apps/sim/blocks/blocks/zoom.ts +++ b/apps/sim/blocks/blocks/zoom.ts @@ -38,6 +38,8 @@ export const ZoomBlock: BlockConfig = { title: 'Zoom Account', type: 'oauth-input', serviceId: 'zoom', + canonicalParamId: 'oauthCredential', + mode: 'basic', requiredScopes: [ 'user:read:user', 'meeting:write:meeting', @@ -54,6 +56,15 @@ export const ZoomBlock: BlockConfig = { placeholder: 'Select Zoom account', required: true, }, + { + id: 'manualCredential', + title: 'Zoom Account', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + placeholder: 'Enter credential ID', + required: true, + }, // User ID for create/list operations { id: 'userId',