Skip to content

Commit 8512dbd

Browse files
committed
fix(selectors): rename canonicalParamIds to avoid subBlock ID clashes
Prefix all clashing canonicalParamId values with `selected_` so they don't match any subBlock ID. Update each block's `inputs` section and `tools.config.params` function to destructure the new canonical names and remap them to the original tool param names. SubBlock IDs and tool definitions remain unchanged for backwards compatibility. Affected: 25 canonical params across 14 blocks (airtable, asana, attio, calcom, confluence, google_bigquery, google_tasks, jsm, microsoft_planner, notion, pipedrive, sharepoint, trello, zoom).
1 parent 517d400 commit 8512dbd

File tree

14 files changed

+187
-149
lines changed

14 files changed

+187
-149
lines changed

apps/sim/blocks/blocks/airtable.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export const AirtableBlock: BlockConfig<AirtableResponse> = {
6161
id: 'baseSelector',
6262
title: 'Base',
6363
type: 'project-selector',
64-
canonicalParamId: 'baseId',
64+
canonicalParamId: 'selected_baseId',
6565
serviceId: 'airtable',
6666
selectorKey: 'airtable.bases',
6767
selectorAllowSearch: false,
@@ -75,7 +75,7 @@ export const AirtableBlock: BlockConfig<AirtableResponse> = {
7575
id: 'baseId',
7676
title: 'Base ID',
7777
type: 'short-input',
78-
canonicalParamId: 'baseId',
78+
canonicalParamId: 'selected_baseId',
7979
placeholder: 'Enter your base ID (e.g., appXXXXXXXXXXXXXX)',
8080
mode: 'advanced',
8181
condition: { field: 'operation', value: 'listBases', not: true },
@@ -85,7 +85,7 @@ export const AirtableBlock: BlockConfig<AirtableResponse> = {
8585
id: 'tableSelector',
8686
title: 'Table',
8787
type: 'file-selector',
88-
canonicalParamId: 'tableId',
88+
canonicalParamId: 'selected_tableId',
8989
serviceId: 'airtable',
9090
selectorKey: 'airtable.tables',
9191
selectorAllowSearch: false,
@@ -99,7 +99,7 @@ export const AirtableBlock: BlockConfig<AirtableResponse> = {
9999
id: 'tableId',
100100
title: 'Table ID',
101101
type: 'short-input',
102-
canonicalParamId: 'tableId',
102+
canonicalParamId: 'selected_tableId',
103103
placeholder: 'Enter table ID (e.g., tblXXXXXXXXXXXXXX)',
104104
mode: 'advanced',
105105
condition: { field: 'operation', value: ['listBases', 'listTables'], not: true },
@@ -274,7 +274,8 @@ Return ONLY the valid JSON object - no explanations, no markdown.`,
274274
}
275275
},
276276
params: (params) => {
277-
const { oauthCredential, records, fields, ...rest } = params
277+
const { oauthCredential, records, fields, selected_baseId, selected_tableId, ...rest } =
278+
params
278279
let parsedRecords: any | undefined
279280
let parsedFields: any | undefined
280281

@@ -293,6 +294,8 @@ Return ONLY the valid JSON object - no explanations, no markdown.`,
293294
// Construct parameters based on operation
294295
const baseParams = {
295296
credential: oauthCredential,
297+
baseId: selected_baseId,
298+
tableId: selected_tableId,
296299
...rest,
297300
}
298301

@@ -311,8 +314,8 @@ Return ONLY the valid JSON object - no explanations, no markdown.`,
311314
inputs: {
312315
operation: { type: 'string', description: 'Operation to perform' },
313316
oauthCredential: { type: 'string', description: 'Airtable access token' },
314-
baseId: { type: 'string', description: 'Airtable base identifier' },
315-
tableId: { type: 'string', description: 'Airtable table identifier' },
317+
selected_baseId: { type: 'string', description: 'Airtable base identifier' },
318+
selected_tableId: { type: 'string', description: 'Airtable table identifier' },
316319
// Conditional inputs
317320
recordId: { type: 'string', description: 'Record identifier' }, // Required for get/update
318321
maxRecords: { type: 'number', description: 'Maximum records to return' }, // Optional for list

apps/sim/blocks/blocks/asana.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export const AsanaBlock: BlockConfig<AsanaResponse> = {
5252
id: 'workspaceSelector',
5353
title: 'Workspace',
5454
type: 'project-selector',
55-
canonicalParamId: 'workspace',
55+
canonicalParamId: 'selected_workspace',
5656
serviceId: 'asana',
5757
selectorKey: 'asana.workspaces',
5858
selectorAllowSearch: false,
@@ -69,7 +69,7 @@ export const AsanaBlock: BlockConfig<AsanaResponse> = {
6969
id: 'workspace',
7070
title: 'Workspace GID',
7171
type: 'short-input',
72-
canonicalParamId: 'workspace',
72+
canonicalParamId: 'selected_workspace',
7373
required: true,
7474
placeholder: 'Enter Asana workspace GID',
7575
mode: 'advanced',
@@ -104,7 +104,7 @@ export const AsanaBlock: BlockConfig<AsanaResponse> = {
104104
id: 'getTasksWorkspaceSelector',
105105
title: 'Workspace',
106106
type: 'project-selector',
107-
canonicalParamId: 'getTasks_workspace',
107+
canonicalParamId: 'selected_getTasks_workspace',
108108
serviceId: 'asana',
109109
selectorKey: 'asana.workspaces',
110110
selectorAllowSearch: false,
@@ -120,7 +120,7 @@ export const AsanaBlock: BlockConfig<AsanaResponse> = {
120120
id: 'getTasks_workspace',
121121
title: 'Workspace GID',
122122
type: 'short-input',
123-
canonicalParamId: 'getTasks_workspace',
123+
canonicalParamId: 'selected_getTasks_workspace',
124124
placeholder: 'Enter workspace GID',
125125
mode: 'advanced',
126126
condition: {
@@ -280,14 +280,14 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
280280
return {
281281
...baseParams,
282282
taskGid: params.taskGid,
283-
workspace: params.getTasks_workspace,
283+
workspace: params.selected_getTasks_workspace,
284284
project: params.getTasks_project,
285285
limit: params.getTasks_limit ? Number(params.getTasks_limit) : undefined,
286286
}
287287
case 'create_task':
288288
return {
289289
...baseParams,
290-
workspace: params.workspace,
290+
workspace: params.selected_workspace,
291291
name: params.name,
292292
notes: params.notes,
293293
assignee: params.assignee,
@@ -306,12 +306,12 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
306306
case 'get_projects':
307307
return {
308308
...baseParams,
309-
workspace: params.workspace,
309+
workspace: params.selected_workspace,
310310
}
311311
case 'search_tasks':
312312
return {
313313
...baseParams,
314-
workspace: params.workspace,
314+
workspace: params.selected_workspace,
315315
text: params.searchText,
316316
assignee: params.assignee,
317317
projects: projectsArray,
@@ -332,9 +332,9 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
332332
inputs: {
333333
operation: { type: 'string', description: 'Operation to perform' },
334334
oauthCredential: { type: 'string', description: 'Asana OAuth credential' },
335-
workspace: { type: 'string', description: 'Workspace GID' },
335+
selected_workspace: { type: 'string', description: 'Workspace GID' },
336336
taskGid: { type: 'string', description: 'Task GID' },
337-
getTasks_workspace: { type: 'string', description: 'Workspace GID for getting tasks' },
337+
selected_getTasks_workspace: { type: 'string', description: 'Workspace GID for getting tasks' },
338338
getTasks_project: { type: 'string', description: 'Project GID filter for getting tasks' },
339339
getTasks_limit: { type: 'string', description: 'Limit for getting tasks' },
340340
name: { type: 'string', description: 'Task name' },

apps/sim/blocks/blocks/attio.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export const AttioBlock: BlockConfig<AttioResponse> = {
9090
id: 'objectTypeSelector',
9191
title: 'Object Type',
9292
type: 'project-selector',
93-
canonicalParamId: 'objectType',
93+
canonicalParamId: 'selected_objectType',
9494
serviceId: 'attio',
9595
selectorKey: 'attio.objects',
9696
selectorAllowSearch: false,
@@ -124,7 +124,7 @@ export const AttioBlock: BlockConfig<AttioResponse> = {
124124
id: 'objectType',
125125
title: 'Object Type',
126126
type: 'short-input',
127-
canonicalParamId: 'objectType',
127+
canonicalParamId: 'selected_objectType',
128128
placeholder: 'e.g. people, companies',
129129
mode: 'advanced',
130130
condition: {
@@ -564,7 +564,7 @@ Return ONLY the JSON array. No explanations, no markdown, no extra text.
564564
id: 'listSelector',
565565
title: 'List',
566566
type: 'project-selector',
567-
canonicalParamId: 'listIdOrSlug',
567+
canonicalParamId: 'selected_listIdOrSlug',
568568
serviceId: 'attio',
569569
selectorKey: 'attio.lists',
570570
selectorAllowSearch: false,
@@ -600,7 +600,7 @@ Return ONLY the JSON array. No explanations, no markdown, no extra text.
600600
id: 'listIdOrSlug',
601601
title: 'List ID or Slug',
602602
type: 'short-input',
603-
canonicalParamId: 'listIdOrSlug',
603+
canonicalParamId: 'selected_listIdOrSlug',
604604
placeholder: 'Enter the list ID or slug',
605605
mode: 'advanced',
606606
condition: {
@@ -1116,7 +1116,7 @@ workspace-member.created
11161116
}
11171117

11181118
// Record params
1119-
if (params.objectType) cleanParams.objectType = params.objectType
1119+
if (params.selected_objectType) cleanParams.objectType = params.selected_objectType
11201120
if (params.recordId) cleanParams.recordId = params.recordId
11211121
if (params.matchingAttribute) cleanParams.matchingAttribute = params.matchingAttribute
11221122
if (params.values) cleanParams.values = params.values
@@ -1157,7 +1157,7 @@ workspace-member.created
11571157
if (params.objectPluralNoun) cleanParams.pluralNoun = params.objectPluralNoun
11581158

11591159
// List params
1160-
if (params.listIdOrSlug) cleanParams.list = params.listIdOrSlug
1160+
if (params.selected_listIdOrSlug) cleanParams.list = params.selected_listIdOrSlug
11611161
if (params.listName) cleanParams.name = params.listName
11621162
if (params.listParentObject) cleanParams.parentObject = params.listParentObject
11631163
if (params.listApiSlug) cleanParams.apiSlug = params.listApiSlug
@@ -1209,7 +1209,7 @@ workspace-member.created
12091209
inputs: {
12101210
operation: { type: 'string', description: 'The operation to perform' },
12111211
oauthCredential: { type: 'string', description: 'Attio OAuth credential' },
1212-
objectType: { type: 'string', description: 'Object type slug' },
1212+
selected_objectType: { type: 'string', description: 'Object type slug' },
12131213
recordId: { type: 'string', description: 'Record ID' },
12141214
matchingAttribute: { type: 'string', description: 'Matching attribute for upsert' },
12151215
values: { type: 'json', description: 'Record attribute values' },
@@ -1235,7 +1235,7 @@ workspace-member.created
12351235
objectApiSlug: { type: 'string', description: 'Object API slug' },
12361236
objectSingularNoun: { type: 'string', description: 'Object singular name' },
12371237
objectPluralNoun: { type: 'string', description: 'Object plural name' },
1238-
listIdOrSlug: { type: 'string', description: 'List ID or slug' },
1238+
selected_listIdOrSlug: { type: 'string', description: 'List ID or slug' },
12391239
listName: { type: 'string', description: 'List name' },
12401240
listParentObject: { type: 'string', description: 'List parent object' },
12411241
listApiSlug: { type: 'string', description: 'List API slug' },

apps/sim/blocks/blocks/calcom.ts

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export const CalComBlock: BlockConfig<ToolResponse> = {
6969
id: 'eventTypeSelector',
7070
title: 'Event Type',
7171
type: 'project-selector',
72-
canonicalParamId: 'eventTypeId',
72+
canonicalParamId: 'selected_eventTypeId',
7373
serviceId: 'calcom',
7474
selectorKey: 'calcom.eventTypes',
7575
selectorAllowSearch: false,
@@ -86,7 +86,7 @@ export const CalComBlock: BlockConfig<ToolResponse> = {
8686
id: 'eventTypeId',
8787
title: 'Event Type ID',
8888
type: 'short-input',
89-
canonicalParamId: 'eventTypeId',
89+
canonicalParamId: 'selected_eventTypeId',
9090
placeholder: 'Enter event type ID (number)',
9191
mode: 'advanced',
9292
condition: {
@@ -284,7 +284,7 @@ Return ONLY the IANA timezone string - no explanations or quotes.`,
284284
id: 'eventTypeParamSelector',
285285
title: 'Event Type',
286286
type: 'project-selector',
287-
canonicalParamId: 'eventTypeIdParam',
287+
canonicalParamId: 'selected_eventTypeIdParam',
288288
serviceId: 'calcom',
289289
selectorKey: 'calcom.eventTypes',
290290
selectorAllowSearch: false,
@@ -304,7 +304,7 @@ Return ONLY the IANA timezone string - no explanations or quotes.`,
304304
id: 'eventTypeIdParam',
305305
title: 'Event Type ID',
306306
type: 'short-input',
307-
canonicalParamId: 'eventTypeIdParam',
307+
canonicalParamId: 'selected_eventTypeIdParam',
308308
placeholder: 'Enter event type ID',
309309
mode: 'advanced',
310310
condition: {
@@ -409,7 +409,7 @@ Return ONLY the IANA timezone string - no explanations or quotes.`,
409409
id: 'eventTypeScheduleSelector',
410410
title: 'Schedule',
411411
type: 'project-selector',
412-
canonicalParamId: 'eventTypeScheduleId',
412+
canonicalParamId: 'selected_eventTypeScheduleId',
413413
serviceId: 'calcom',
414414
selectorKey: 'calcom.schedules',
415415
selectorAllowSearch: false,
@@ -425,7 +425,7 @@ Return ONLY the IANA timezone string - no explanations or quotes.`,
425425
id: 'eventTypeScheduleId',
426426
title: 'Schedule ID',
427427
type: 'short-input',
428-
canonicalParamId: 'eventTypeScheduleId',
428+
canonicalParamId: 'selected_eventTypeScheduleId',
429429
placeholder: 'Assign to a specific schedule',
430430
condition: {
431431
field: 'operation',
@@ -450,7 +450,7 @@ Return ONLY the IANA timezone string - no explanations or quotes.`,
450450
id: 'scheduleSelector',
451451
title: 'Schedule',
452452
type: 'project-selector',
453-
canonicalParamId: 'scheduleId',
453+
canonicalParamId: 'selected_scheduleId',
454454
serviceId: 'calcom',
455455
selectorKey: 'calcom.schedules',
456456
selectorAllowSearch: false,
@@ -470,7 +470,7 @@ Return ONLY the IANA timezone string - no explanations or quotes.`,
470470
id: 'scheduleId',
471471
title: 'Schedule ID',
472472
type: 'short-input',
473-
canonicalParamId: 'scheduleId',
473+
canonicalParamId: 'selected_scheduleId',
474474
placeholder: 'Enter schedule ID',
475475
mode: 'advanced',
476476
condition: {
@@ -659,17 +659,17 @@ Return ONLY valid JSON - no explanations.`,
659659
reschedulingReason,
660660
bookingStatus,
661661
lengthInMinutes,
662-
eventTypeIdParam,
663-
eventTypeId,
662+
selected_eventTypeIdParam,
663+
selected_eventTypeId,
664664
eventLength,
665-
eventTypeScheduleId,
665+
selected_eventTypeScheduleId,
666666
slotInterval,
667667
minimumBookingNotice,
668668
beforeEventBuffer,
669669
afterEventBuffer,
670670
disableGuests,
671671
name,
672-
scheduleId,
672+
selected_scheduleId,
673673
isDefault,
674674
eventTypeSlug,
675675
username,
@@ -698,7 +698,7 @@ Return ONLY valid JSON - no explanations.`,
698698
...(attendeePhone && { phoneNumber: attendeePhone }),
699699
}
700700
{
701-
const eventTypeIdNum = toNumber(eventTypeId)
701+
const eventTypeIdNum = toNumber(selected_eventTypeId)
702702
if (eventTypeIdNum !== undefined) result.eventTypeId = eventTypeIdNum
703703
}
704704
if (start) result.start = start
@@ -736,12 +736,12 @@ Return ONLY valid JSON - no explanations.`,
736736
case 'calcom_update_event_type':
737737
{
738738
if (operation === 'calcom_update_event_type') {
739-
const eventTypeIdNum = toNumber(eventTypeIdParam)
739+
const eventTypeIdNum = toNumber(selected_eventTypeIdParam)
740740
if (eventTypeIdNum !== undefined) result.eventTypeId = eventTypeIdNum
741741
}
742742
const lengthNum = toNumber(eventLength)
743743
if (lengthNum !== undefined) result.lengthInMinutes = lengthNum
744-
const scheduleIdNum = toNumber(eventTypeScheduleId)
744+
const scheduleIdNum = toNumber(selected_eventTypeScheduleId)
745745
if (scheduleIdNum !== undefined) result.scheduleId = scheduleIdNum
746746
const slotIntervalNum = toNumber(slotInterval)
747747
if (slotIntervalNum !== undefined) result.slotInterval = slotIntervalNum
@@ -760,7 +760,7 @@ Return ONLY valid JSON - no explanations.`,
760760
case 'calcom_get_event_type':
761761
case 'calcom_delete_event_type':
762762
{
763-
const eventTypeIdNum = toNumber(eventTypeIdParam)
763+
const eventTypeIdNum = toNumber(selected_eventTypeIdParam)
764764
if (eventTypeIdNum !== undefined) result.eventTypeId = eventTypeIdNum
765765
}
766766
break
@@ -782,7 +782,7 @@ Return ONLY valid JSON - no explanations.`,
782782
case 'calcom_update_schedule':
783783
case 'calcom_delete_schedule':
784784
{
785-
const scheduleIdNum = toNumber(scheduleId)
785+
const scheduleIdNum = toNumber(selected_scheduleId)
786786
if (scheduleIdNum !== undefined) result.scheduleId = scheduleIdNum
787787
}
788788
if (operation === 'calcom_update_schedule') {
@@ -801,7 +801,7 @@ Return ONLY valid JSON - no explanations.`,
801801

802802
case 'calcom_get_slots':
803803
{
804-
const eventTypeIdNum = toNumber(eventTypeId)
804+
const eventTypeIdNum = toNumber(selected_eventTypeId)
805805
const hasEventTypeId = eventTypeIdNum !== undefined
806806
const hasSlugAndUsername = Boolean(eventTypeSlug) && Boolean(username)
807807

@@ -837,7 +837,7 @@ Return ONLY valid JSON - no explanations.`,
837837
inputs: {
838838
operation: { type: 'string', description: 'Operation to perform' },
839839
oauthCredential: { type: 'string', description: 'Cal.com OAuth credential' },
840-
eventTypeId: { type: 'number', description: 'Event type ID' },
840+
selected_eventTypeId: { type: 'number', description: 'Event type ID' },
841841
start: { type: 'string', description: 'Start time (ISO 8601)' },
842842
end: { type: 'string', description: 'End time (ISO 8601)' },
843843
attendeeName: { type: 'string', description: 'Attendee name' },
@@ -851,7 +851,7 @@ Return ONLY valid JSON - no explanations.`,
851851
cancellationReason: { type: 'string', description: 'Reason for cancellation' },
852852
reschedulingReason: { type: 'string', description: 'Reason for rescheduling' },
853853
bookingStatus: { type: 'string', description: 'Filter by booking status' },
854-
eventTypeIdParam: { type: 'number', description: 'Event type ID for get/update/delete' },
854+
selected_eventTypeIdParam: { type: 'number', description: 'Event type ID for get/update/delete' },
855855
title: { type: 'string', description: 'Event type title' },
856856
slug: { type: 'string', description: 'URL-friendly slug' },
857857
eventLength: { type: 'number', description: 'Event duration in minutes' },
@@ -860,10 +860,10 @@ Return ONLY valid JSON - no explanations.`,
860860
minimumBookingNotice: { type: 'number', description: 'Minimum advance notice' },
861861
beforeEventBuffer: { type: 'number', description: 'Buffer before event' },
862862
afterEventBuffer: { type: 'number', description: 'Buffer after event' },
863-
eventTypeScheduleId: { type: 'number', description: 'Schedule ID for event type' },
863+
selected_eventTypeScheduleId: { type: 'number', description: 'Schedule ID for event type' },
864864
disableGuests: { type: 'boolean', description: 'Disable guest additions' },
865865
sortCreatedAt: { type: 'string', description: 'Sort order for event types' },
866-
scheduleId: { type: 'number', description: 'Schedule ID' },
866+
selected_scheduleId: { type: 'number', description: 'Schedule ID' },
867867
name: { type: 'string', description: 'Schedule name' },
868868
timeZone: { type: 'string', description: 'Time zone' },
869869
isDefault: { type: 'boolean', description: 'Set as default schedule' },

0 commit comments

Comments
 (0)