Skip to content

Commit 26a26f9

Browse files
committed
fix(integrations): map RB2B email_to_activity input via params, not canonicalParamId
The canonical-pair validation test requires canonical members to share the same condition. Replace the cross-operation canonicalParamId reuse with two distinct subblock ids (email for HEM ops, emailAddress for email_to_activity) and a small tools.config.params remap to the email tool param.
1 parent 68faa42 commit 26a26f9

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

apps/sim/blocks/blocks/rb2b.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,9 @@ export const RB2BBlock: BlockConfig<Rb2bResponse> = {
7979
condition: { field: 'operation', value: 'ip_to_hem' },
8080
},
8181
{
82-
id: 'emailOrHash',
82+
id: 'email',
8383
title: 'Email or MD5 Hash',
8484
type: 'short-input',
85-
canonicalParamId: 'email',
8685
placeholder: 'jane@example.com or an MD5 hash',
8786
condition: { field: 'operation', value: EMAIL_OPERATIONS },
8887
required: { field: 'operation', value: EMAIL_OPERATIONS },
@@ -91,7 +90,6 @@ export const RB2BBlock: BlockConfig<Rb2bResponse> = {
9190
id: 'emailAddress',
9291
title: 'Email Address',
9392
type: 'short-input',
94-
canonicalParamId: 'email',
9593
placeholder: 'jane@example.com',
9694
condition: { field: 'operation', value: 'email_to_activity' },
9795
required: { field: 'operation', value: 'email_to_activity' },
@@ -157,6 +155,10 @@ export const RB2BBlock: BlockConfig<Rb2bResponse> = {
157155
],
158156
config: {
159157
tool: (params) => `rb2b_${params.operation}`,
158+
params: (params) => {
159+
const email = params.email ?? params.emailAddress
160+
return email !== undefined ? { email } : {}
161+
},
160162
},
161163
},
162164
inputs: {
@@ -165,7 +167,8 @@ export const RB2BBlock: BlockConfig<Rb2bResponse> = {
165167
ip_address: { type: 'string', description: 'IP address to resolve' },
166168
user_agent: { type: 'string', description: 'Optional user agent string' },
167169
include_sha256: { type: 'boolean', description: 'Include SHA-256 hashes (IP to HEM)' },
168-
email: { type: 'string', description: 'Email address or MD5 hash of the email' },
170+
email: { type: 'string', description: 'Email address or MD5 hash (HEM operations)' },
171+
emailAddress: { type: 'string', description: 'Email address (Email to Last Active Date)' },
169172
linkedin_slug: { type: 'string', description: 'LinkedIn profile slug or URL' },
170173
first_name: { type: 'string', description: 'First name (LinkedIn Slug Search)' },
171174
last_name: { type: 'string', description: 'Last name (LinkedIn Slug Search)' },

0 commit comments

Comments
 (0)