Skip to content

Commit 721af52

Browse files
committed
fix(apollo): allow skipped_contact_ids as hash per Apollo docs
1 parent 7447852 commit 721af52

3 files changed

Lines changed: 9 additions & 4 deletions

File tree

apps/sim/app/(landing)/integrations/data/integrations.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14173,7 +14173,7 @@
1417314173
"description": "Hire a pre-hire into an employee position. Converts an applicant into an active employee record with position, start date, and manager assignment."
1417414174
},
1417514175
{
14176-
"name": "Update Worker",
14176+
"name": "Update Personal Information",
1417714177
"description": "Update fields on an existing worker record in Workday."
1417814178
},
1417914179
{

apps/sim/tools/apollo/sequence_add_contacts.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,11 @@ export const apolloSequenceAddContactsTool: ToolConfig<
138138

139139
const added = Array.isArray(data?.contacts?.added) ? data.contacts.added : []
140140
const skipped = Array.isArray(data?.contacts?.skipped) ? data.contacts.skipped : []
141-
const skippedIds = Array.isArray(data?.skipped_contact_ids) ? data.skipped_contact_ids : null
141+
const rawSkippedIds = data?.skipped_contact_ids
142+
const skippedIds =
143+
Array.isArray(rawSkippedIds) || (rawSkippedIds && typeof rawSkippedIds === 'object')
144+
? rawSkippedIds
145+
: null
142146

143147
return {
144148
success: true,
@@ -165,7 +169,8 @@ export const apolloSequenceAddContactsTool: ToolConfig<
165169
},
166170
skipped_contact_ids: {
167171
type: 'json',
168-
description: 'Array of contact IDs that were skipped',
172+
description:
173+
'Skipped contact IDs — either an array of IDs or a hash mapping ID → reason code',
169174
optional: true,
170175
},
171176
emailer_campaign: {

apps/sim/tools/apollo/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ export interface ApolloSequenceAddContactsResponse extends ToolResponse {
485485
output: {
486486
added: ApolloSequenceAddedContact[]
487487
skipped: ApolloSequenceSkippedContact[]
488-
skipped_contact_ids: string[] | null
488+
skipped_contact_ids: string[] | Record<string, string> | null
489489
emailer_campaign: { id: string; name: string } | null
490490
sequence_id: string
491491
total_added: number

0 commit comments

Comments
 (0)