Skip to content

Commit 3702b26

Browse files
committed
fix(apollo): drop undocumented task type, preserve mixed-array IDs, migrate note→task_notes
1 parent 391b06b commit 3702b26

2 files changed

Lines changed: 13 additions & 9 deletions

File tree

apps/sim/blocks/blocks/apollo.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,6 @@ Return ONLY the date string in YYYY-MM-DD format - no explanations, no quotes, n
739739
options: [
740740
{ label: 'Call', id: 'call' },
741741
{ label: 'Outreach Manual Email', id: 'outreach_manual_email' },
742-
{ label: 'LinkedIn Step Message', id: 'linkedin_step_message' },
743742
{ label: 'Action Item', id: 'action_item' },
744743
],
745744
value: () => 'action_item',
@@ -1004,21 +1003,25 @@ Return ONLY the timestamp string in ISO 8601 format - no explanations, no quotes
10041003

10051004
if (params.operation === 'contact_bulk_update') {
10061005
const { ids, attributes } = splitBulkUpdateInput(parsedParams.contacts)
1007-
if (attributes && parsedParams.contact_attributes === undefined) {
1008-
parsedParams.contact_attributes = attributes
1009-
}
1010-
if (ids && !attributes && parsedParams.contact_ids === undefined) {
1006+
if (attributes) {
1007+
const merged = ids ? [...attributes, ...ids.map((id) => ({ id }))] : attributes
1008+
if (parsedParams.contact_attributes === undefined) {
1009+
parsedParams.contact_attributes = merged
1010+
}
1011+
} else if (ids && parsedParams.contact_ids === undefined) {
10111012
parsedParams.contact_ids = ids
10121013
}
10131014
parsedParams.contacts = undefined
10141015
}
10151016

10161017
if (params.operation === 'account_bulk_update') {
10171018
const { ids, attributes } = splitBulkUpdateInput(parsedParams.accounts)
1018-
if (attributes && parsedParams.account_attributes === undefined) {
1019-
parsedParams.account_attributes = attributes
1020-
}
1021-
if (ids && !attributes && parsedParams.account_ids === undefined) {
1019+
if (attributes) {
1020+
const merged = ids ? [...attributes, ...ids.map((id) => ({ id }))] : attributes
1021+
if (parsedParams.account_attributes === undefined) {
1022+
parsedParams.account_attributes = merged
1023+
}
1024+
} else if (ids && parsedParams.account_ids === undefined) {
10221025
parsedParams.account_ids = ids
10231026
}
10241027
parsedParams.accounts = undefined

apps/sim/lib/workflows/migrations/subblock-migrations.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export const SUBBLOCK_ID_MIGRATIONS: Record<string, Record<string, string>> = {
4242
account_ids_bulk: 'accounts',
4343
close_date: 'closed_date',
4444
stage_id: 'opportunity_stage_id',
45+
note: 'task_notes',
4546
},
4647
rippling: {
4748
action: '_removed_action',

0 commit comments

Comments
 (0)