From f64b26ae82d5887027e81f64a39d662965217197 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Thu, 28 May 2026 12:24:20 -0700 Subject: [PATCH 1/2] improvement(integrations): tighten resend, azure_devops icon, loops trim --- apps/sim/blocks/blocks/azure_devops.ts | 4 +-- apps/sim/blocks/blocks/resend.ts | 7 +++-- apps/sim/tools/loops/send_event.ts | 2 +- apps/sim/tools/resend/get_email.ts | 36 ++++++++++++++++++++++---- apps/sim/tools/resend/list_contacts.ts | 16 +++++++++--- apps/sim/tools/resend/list_domains.ts | 14 ++++++++-- apps/sim/tools/resend/send.ts | 6 +++-- 7 files changed, 68 insertions(+), 17 deletions(-) diff --git a/apps/sim/blocks/blocks/azure_devops.ts b/apps/sim/blocks/blocks/azure_devops.ts index 7af9bb2ffe8..dc437c2624f 100644 --- a/apps/sim/blocks/blocks/azure_devops.ts +++ b/apps/sim/blocks/blocks/azure_devops.ts @@ -1,4 +1,4 @@ -import { AzureDevOpsIcon } from '@/components/icons' +import { AzureIcon } from '@/components/icons' import type { BlockConfig } from '@/blocks/types' import { AuthMode, IntegrationType } from '@/blocks/types' import type { AzureDevOpsBasicWorkItemType, AzureDevOpsResponse } from '@/tools/azure_devops/types' @@ -23,7 +23,7 @@ export const AzureDevOpsBlock: BlockConfig = { integrationType: IntegrationType.DeveloperTools, tags: ['ci-cd', 'project-management', 'version-control'], bgColor: '#0078D4', - icon: AzureDevOpsIcon, + icon: AzureIcon, authMode: AuthMode.ApiKey, triggerAllowed: true, diff --git a/apps/sim/blocks/blocks/resend.ts b/apps/sim/blocks/blocks/resend.ts index f4533978af0..bc72b4d8443 100644 --- a/apps/sim/blocks/blocks/resend.ts +++ b/apps/sim/blocks/blocks/resend.ts @@ -221,10 +221,11 @@ Return ONLY the email body - no explanations, no extra text.`, title: 'Unsubscribed', type: 'dropdown', options: [ + { label: "Don't Change", id: '' }, { label: 'No', id: 'false' }, { label: 'Yes', id: 'true' }, ], - value: () => 'false', + value: () => '', condition: { field: 'operation', value: ['create_contact', 'update_contact'] }, }, @@ -267,7 +268,9 @@ Return ONLY the email body - no explanations, no extra text.`, params: (params) => { const { operation, ...rest } = params - if (rest.unsubscribed !== undefined) { + if (rest.unsubscribed === undefined || rest.unsubscribed === '') { + rest.unsubscribed = undefined + } else { rest.unsubscribed = rest.unsubscribed === 'true' } diff --git a/apps/sim/tools/loops/send_event.ts b/apps/sim/tools/loops/send_event.ts index 984fe82c9df..91907b8dd2d 100644 --- a/apps/sim/tools/loops/send_event.ts +++ b/apps/sim/tools/loops/send_event.ts @@ -61,7 +61,7 @@ export const loopsSendEventTool: ToolConfig = { - eventName: params.eventName, + eventName: params.eventName.trim(), } if (params.email) body.email = params.email.trim() diff --git a/apps/sim/tools/resend/get_email.ts b/apps/sim/tools/resend/get_email.ts index 05b2cf8f78a..0bd3e69b77a 100644 --- a/apps/sim/tools/resend/get_email.ts +++ b/apps/sim/tools/resend/get_email.ts @@ -83,16 +83,42 @@ export const resendGetEmailTool: ToolConfig = { outputs: { id: { type: 'string', description: 'Email ID' }, from: { type: 'string', description: 'Sender email address' }, - to: { type: 'json', description: 'Recipient email addresses' }, + to: { + type: 'array', + description: 'Recipient email addresses', + items: { type: 'string', description: 'Recipient email address' }, + }, subject: { type: 'string', description: 'Email subject' }, html: { type: 'string', description: 'HTML email content' }, text: { type: 'string', description: 'Plain text email content', optional: true }, - cc: { type: 'json', description: 'CC email addresses' }, - bcc: { type: 'json', description: 'BCC email addresses' }, - replyTo: { type: 'json', description: 'Reply-to email addresses' }, + cc: { + type: 'array', + description: 'CC email addresses', + items: { type: 'string', description: 'CC email address' }, + }, + bcc: { + type: 'array', + description: 'BCC email addresses', + items: { type: 'string', description: 'BCC email address' }, + }, + replyTo: { + type: 'array', + description: 'Reply-to email addresses', + items: { type: 'string', description: 'Reply-to email address' }, + }, lastEvent: { type: 'string', description: 'Last event status (e.g., delivered, bounced)' }, createdAt: { type: 'string', description: 'Email creation timestamp' }, scheduledAt: { type: 'string', description: 'Scheduled send timestamp', optional: true }, - tags: { type: 'json', description: 'Email tags as name-value pairs' }, + tags: { + type: 'array', + description: 'Email tags as name-value pairs', + items: { + type: 'object', + properties: { + name: { type: 'string', description: 'Tag name' }, + value: { type: 'string', description: 'Tag value' }, + }, + }, + }, }, } diff --git a/apps/sim/tools/resend/list_contacts.ts b/apps/sim/tools/resend/list_contacts.ts index 808b473dd5a..f2015adedbe 100644 --- a/apps/sim/tools/resend/list_contacts.ts +++ b/apps/sim/tools/resend/list_contacts.ts @@ -54,9 +54,19 @@ export const resendListContactsTool: ToolConfig = { transformResponse: async (response: Response, params): Promise => { const result = await response.json() + const sent = result.success === true return { - success: true, + success: sent, + ...(sent ? {} : { error: result.message || 'Failed to send email' }), output: { - success: result.success, + success: sent, id: result.data?.id || '', to: params?.to || '', subject: params?.subject || '', From 0fb0844bd3a351ccee602b0fbd1681b487c3a4e8 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Thu, 28 May 2026 12:50:49 -0700 Subject: [PATCH 2/2] fix(resend): drop unreachable send error branch, relabel unsubscribed default --- apps/sim/blocks/blocks/resend.ts | 2 +- apps/sim/tools/resend/send.ts | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/apps/sim/blocks/blocks/resend.ts b/apps/sim/blocks/blocks/resend.ts index bc72b4d8443..d9855a48f38 100644 --- a/apps/sim/blocks/blocks/resend.ts +++ b/apps/sim/blocks/blocks/resend.ts @@ -221,7 +221,7 @@ Return ONLY the email body - no explanations, no extra text.`, title: 'Unsubscribed', type: 'dropdown', options: [ - { label: "Don't Change", id: '' }, + { label: 'Use Default', id: '' }, { label: 'No', id: 'false' }, { label: 'Yes', id: 'true' }, ], diff --git a/apps/sim/tools/resend/send.ts b/apps/sim/tools/resend/send.ts index ab7accd94b0..079759e8acc 100644 --- a/apps/sim/tools/resend/send.ts +++ b/apps/sim/tools/resend/send.ts @@ -103,13 +103,11 @@ export const resendSendTool: ToolConfig = { transformResponse: async (response: Response, params): Promise => { const result = await response.json() - const sent = result.success === true return { - success: sent, - ...(sent ? {} : { error: result.message || 'Failed to send email' }), + success: true, output: { - success: sent, + success: true, id: result.data?.id || '', to: params?.to || '', subject: params?.subject || '',