Skip to content

Commit e78ac0f

Browse files
authored
improvement(integrations): tighten resend, azure_devops icon, loops trim (#4772)
* improvement(integrations): tighten resend, azure_devops icon, loops trim * fix(resend): drop unreachable send error branch, relabel unsubscribed default
1 parent ddc47eb commit e78ac0f

7 files changed

Lines changed: 65 additions & 16 deletions

File tree

apps/sim/blocks/blocks/azure_devops.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { AzureDevOpsIcon } from '@/components/icons'
1+
import { AzureIcon } from '@/components/icons'
22
import type { BlockConfig } from '@/blocks/types'
33
import { AuthMode, IntegrationType } from '@/blocks/types'
44
import type { AzureDevOpsBasicWorkItemType, AzureDevOpsResponse } from '@/tools/azure_devops/types'
@@ -23,7 +23,7 @@ export const AzureDevOpsBlock: BlockConfig<AzureDevOpsResponse> = {
2323
integrationType: IntegrationType.DeveloperTools,
2424
tags: ['ci-cd', 'project-management', 'version-control'],
2525
bgColor: '#0078D4',
26-
icon: AzureDevOpsIcon,
26+
icon: AzureIcon,
2727
authMode: AuthMode.ApiKey,
2828
triggerAllowed: true,
2929

apps/sim/blocks/blocks/resend.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,11 @@ Return ONLY the email body - no explanations, no extra text.`,
221221
title: 'Unsubscribed',
222222
type: 'dropdown',
223223
options: [
224+
{ label: 'Use Default', id: '' },
224225
{ label: 'No', id: 'false' },
225226
{ label: 'Yes', id: 'true' },
226227
],
227-
value: () => 'false',
228+
value: () => '',
228229
condition: { field: 'operation', value: ['create_contact', 'update_contact'] },
229230
},
230231

@@ -267,7 +268,9 @@ Return ONLY the email body - no explanations, no extra text.`,
267268
params: (params) => {
268269
const { operation, ...rest } = params
269270

270-
if (rest.unsubscribed !== undefined) {
271+
if (rest.unsubscribed === undefined || rest.unsubscribed === '') {
272+
rest.unsubscribed = undefined
273+
} else {
271274
rest.unsubscribed = rest.unsubscribed === 'true'
272275
}
273276

apps/sim/tools/loops/send_event.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export const loopsSendEventTool: ToolConfig<LoopsSendEventParams, LoopsSendEvent
6161
}
6262

6363
const body: Record<string, unknown> = {
64-
eventName: params.eventName,
64+
eventName: params.eventName.trim(),
6565
}
6666

6767
if (params.email) body.email = params.email.trim()

apps/sim/tools/resend/get_email.ts

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,42 @@ export const resendGetEmailTool: ToolConfig<GetEmailParams, GetEmailResult> = {
8383
outputs: {
8484
id: { type: 'string', description: 'Email ID' },
8585
from: { type: 'string', description: 'Sender email address' },
86-
to: { type: 'json', description: 'Recipient email addresses' },
86+
to: {
87+
type: 'array',
88+
description: 'Recipient email addresses',
89+
items: { type: 'string', description: 'Recipient email address' },
90+
},
8791
subject: { type: 'string', description: 'Email subject' },
8892
html: { type: 'string', description: 'HTML email content' },
8993
text: { type: 'string', description: 'Plain text email content', optional: true },
90-
cc: { type: 'json', description: 'CC email addresses' },
91-
bcc: { type: 'json', description: 'BCC email addresses' },
92-
replyTo: { type: 'json', description: 'Reply-to email addresses' },
94+
cc: {
95+
type: 'array',
96+
description: 'CC email addresses',
97+
items: { type: 'string', description: 'CC email address' },
98+
},
99+
bcc: {
100+
type: 'array',
101+
description: 'BCC email addresses',
102+
items: { type: 'string', description: 'BCC email address' },
103+
},
104+
replyTo: {
105+
type: 'array',
106+
description: 'Reply-to email addresses',
107+
items: { type: 'string', description: 'Reply-to email address' },
108+
},
93109
lastEvent: { type: 'string', description: 'Last event status (e.g., delivered, bounced)' },
94110
createdAt: { type: 'string', description: 'Email creation timestamp' },
95111
scheduledAt: { type: 'string', description: 'Scheduled send timestamp', optional: true },
96-
tags: { type: 'json', description: 'Email tags as name-value pairs' },
112+
tags: {
113+
type: 'array',
114+
description: 'Email tags as name-value pairs',
115+
items: {
116+
type: 'object',
117+
properties: {
118+
name: { type: 'string', description: 'Tag name' },
119+
value: { type: 'string', description: 'Tag value' },
120+
},
121+
},
122+
},
97123
},
98124
}

apps/sim/tools/resend/list_contacts.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,19 @@ export const resendListContactsTool: ToolConfig<ListContactsParams, ListContacts
5454

5555
outputs: {
5656
contacts: {
57-
type: 'json',
58-
description:
59-
'Array of contacts with id, email, first_name, last_name, created_at, unsubscribed',
57+
type: 'array',
58+
description: 'Array of contacts',
59+
items: {
60+
type: 'object',
61+
properties: {
62+
id: { type: 'string', description: 'Contact ID' },
63+
email: { type: 'string', description: 'Contact email address' },
64+
first_name: { type: 'string', description: 'Contact first name' },
65+
last_name: { type: 'string', description: 'Contact last name' },
66+
created_at: { type: 'string', description: 'Contact creation timestamp' },
67+
unsubscribed: { type: 'boolean', description: 'Whether the contact is unsubscribed' },
68+
},
69+
},
6070
},
6171
hasMore: { type: 'boolean', description: 'Whether there are more contacts to retrieve' },
6272
},

apps/sim/tools/resend/list_domains.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,18 @@ export const resendListDomainsTool: ToolConfig<ListDomainsParams, ListDomainsRes
6868

6969
outputs: {
7070
domains: {
71-
type: 'json',
72-
description: 'Array of domains with id, name, status, region, and createdAt',
71+
type: 'array',
72+
description: 'Array of domains',
73+
items: {
74+
type: 'object',
75+
properties: {
76+
id: { type: 'string', description: 'Domain ID' },
77+
name: { type: 'string', description: 'Domain name' },
78+
status: { type: 'string', description: 'Domain verification status' },
79+
region: { type: 'string', description: 'Region the domain is configured in' },
80+
createdAt: { type: 'string', description: 'Domain creation timestamp' },
81+
},
82+
},
7383
},
7484
hasMore: { type: 'boolean', description: 'Whether there are more domains to retrieve' },
7585
},

apps/sim/tools/resend/send.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export const resendSendTool: ToolConfig<MailSendParams, MailSendResult> = {
107107
return {
108108
success: true,
109109
output: {
110-
success: result.success,
110+
success: true,
111111
id: result.data?.id || '',
112112
to: params?.to || '',
113113
subject: params?.subject || '',

0 commit comments

Comments
 (0)