Skip to content

Commit fe0bfbb

Browse files
committed
improvement(integrations): tighten sixtyfour, agentmail, agentphone outputs
1 parent 59792c0 commit fe0bfbb

13 files changed

Lines changed: 76 additions & 5 deletions

File tree

apps/sim/blocks/blocks/agentmail.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,9 @@ export const AgentMailBlock: BlockConfig = {
193193
},
194194
{
195195
id: 'replyTo',
196-
title: 'Override To',
196+
title: 'Override Recipients',
197197
type: 'short-input',
198-
placeholder: 'Override recipient (optional)',
198+
placeholder: 'Override recipient (comma-separated)',
199199
condition: { field: 'operation', value: 'reply_message' },
200200
mode: 'advanced',
201201
},
@@ -349,6 +349,7 @@ export const AgentMailBlock: BlockConfig = {
349349
type: 'short-input',
350350
placeholder: 'Optional username for email address',
351351
condition: { field: 'operation', value: 'create_inbox' },
352+
mode: 'advanced',
352353
},
353354
{
354355
id: 'domain',
@@ -564,7 +565,7 @@ export const AgentMailBlock: BlockConfig = {
564565
cc: { type: 'string', description: 'CC email addresses' },
565566
bcc: { type: 'string', description: 'BCC email addresses' },
566567
replyMessageId: { type: 'string', description: 'Message ID to reply to' },
567-
replyTo: { type: 'string', description: 'Override recipient for reply' },
568+
replyTo: { type: 'string', description: 'Override recipients for reply (comma-separated)' },
568569
replyAll: { type: 'string', description: 'Reply to all recipients' },
569570
forwardMessageId: { type: 'string', description: 'Message ID to forward' },
570571
updateMessageId: { type: 'string', description: 'Message ID to update labels on' },
@@ -603,7 +604,8 @@ export const AgentMailBlock: BlockConfig = {
603604
preview: { type: 'string', description: 'Message or draft preview text' },
604605
senders: { type: 'json', description: 'List of sender email addresses' },
605606
recipients: { type: 'json', description: 'List of recipient email addresses' },
606-
labels: { type: 'json', description: 'Thread or draft labels' },
607+
labels: { type: 'json', description: 'Thread, message, or draft labels' },
608+
timestamp: { type: 'string', description: 'Time the message was sent or drafted' },
607609
messages: { type: 'json', description: 'List of messages' },
608610
threads: { type: 'json', description: 'List of threads' },
609611
inboxes: { type: 'json', description: 'List of inboxes' },

apps/sim/blocks/blocks/sixtyfour.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,10 +266,20 @@ export const SixtyfourBlock: BlockConfig = {
266266
emails: {
267267
type: 'json',
268268
description: 'Email addresses found with validation status and type (find_email)',
269+
properties: {
270+
address: { type: 'string', description: 'Email address' },
271+
status: { type: 'string', description: 'Validation status (OK, UNKNOWN, NOT_FOUND)' },
272+
type: { type: 'string', description: 'Email type (COMPANY or PERSONAL)' },
273+
},
269274
},
270275
personalEmails: {
271276
type: 'json',
272277
description: 'Personal email addresses found in PERSONAL mode (find_email)',
278+
properties: {
279+
address: { type: 'string', description: 'Email address' },
280+
status: { type: 'string', description: 'Validation status (OK, UNKNOWN, NOT_FOUND)' },
281+
type: { type: 'string', description: 'Email type (COMPANY or PERSONAL)' },
282+
},
273283
},
274284
notes: {
275285
type: 'string',
@@ -288,5 +298,9 @@ export const SixtyfourBlock: BlockConfig = {
288298
type: 'number',
289299
description: 'Quality score for the returned data, 0-10 (enrich_lead, enrich_company)',
290300
},
301+
orgChart: {
302+
type: 'json',
303+
description: 'Org chart returned when fullOrgChart is enabled (enrich_company)',
304+
},
291305
},
292306
}

apps/sim/tools/agentmail/get_message.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ export const agentmailGetMessageTool: ToolConfig<GetMessageParams, GetMessageRes
5454
subject: null,
5555
text: null,
5656
html: null,
57+
labels: [],
58+
timestamp: null,
5759
createdAt: '',
5860
},
5961
}
@@ -71,6 +73,8 @@ export const agentmailGetMessageTool: ToolConfig<GetMessageParams, GetMessageRes
7173
subject: data.subject ?? null,
7274
text: data.text ?? null,
7375
html: data.html ?? null,
76+
labels: data.labels ?? [],
77+
timestamp: data.timestamp ?? null,
7478
createdAt: data.created_at ?? '',
7579
},
7680
}
@@ -86,6 +90,12 @@ export const agentmailGetMessageTool: ToolConfig<GetMessageParams, GetMessageRes
8690
subject: { type: 'string', description: 'Message subject', optional: true },
8791
text: { type: 'string', description: 'Plain text content', optional: true },
8892
html: { type: 'string', description: 'HTML content', optional: true },
93+
labels: { type: 'array', description: 'Labels assigned to the message' },
94+
timestamp: {
95+
type: 'string',
96+
description: 'Time the message was sent or drafted',
97+
optional: true,
98+
},
8999
createdAt: { type: 'string', description: 'Creation timestamp' },
90100
},
91101
}

apps/sim/tools/agentmail/get_thread.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ export const agentmailGetThreadTool: ToolConfig<GetThreadParams, GetThreadResult
8080
subject: (msg.subject as string) ?? null,
8181
text: (msg.text as string) ?? null,
8282
html: (msg.html as string) ?? null,
83+
labels: (msg.labels as string[]) ?? [],
84+
timestamp: (msg.timestamp as string) ?? null,
8385
createdAt: (msg.created_at as string) ?? '',
8486
})),
8587
},
@@ -110,6 +112,12 @@ export const agentmailGetThreadTool: ToolConfig<GetThreadParams, GetThreadResult
110112
subject: { type: 'string', description: 'Message subject', optional: true },
111113
text: { type: 'string', description: 'Plain text content', optional: true },
112114
html: { type: 'string', description: 'HTML content', optional: true },
115+
labels: { type: 'array', description: 'Labels assigned to the message' },
116+
timestamp: {
117+
type: 'string',
118+
description: 'Time the message was sent or drafted',
119+
optional: true,
120+
},
113121
createdAt: { type: 'string', description: 'Creation timestamp' },
114122
},
115123
},

apps/sim/tools/agentmail/list_messages.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ export const agentmailListMessagesTool: ToolConfig<ListMessagesParams, ListMessa
6868
to: (msg.to as string[]) ?? [],
6969
subject: (msg.subject as string) ?? null,
7070
preview: (msg.preview as string) ?? null,
71+
timestamp: (msg.timestamp as string) ?? null,
7172
createdAt: (msg.created_at as string) ?? '',
7273
})),
7374
count: data.count ?? 0,
@@ -88,6 +89,11 @@ export const agentmailListMessagesTool: ToolConfig<ListMessagesParams, ListMessa
8889
to: { type: 'array', description: 'Recipient email addresses' },
8990
subject: { type: 'string', description: 'Message subject', optional: true },
9091
preview: { type: 'string', description: 'Message preview text', optional: true },
92+
timestamp: {
93+
type: 'string',
94+
description: 'Time the message was sent or drafted',
95+
optional: true,
96+
},
9197
createdAt: { type: 'string', description: 'Creation timestamp' },
9298
},
9399
},

apps/sim/tools/agentmail/types.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,8 @@ export interface GetThreadResult extends ToolResponse {
366366
subject: string | null
367367
text: string | null
368368
html: string | null
369+
labels: string[]
370+
timestamp: string | null
369371
createdAt: string
370372
}>
371373
}
@@ -417,6 +419,7 @@ export interface ListMessagesResult extends ToolResponse {
417419
to: string[]
418420
subject: string | null
419421
preview: string | null
422+
timestamp: string | null
420423
createdAt: string
421424
}>
422425
count: number
@@ -442,6 +445,8 @@ export interface GetMessageResult extends ToolResponse {
442445
subject: string | null
443446
text: string | null
444447
html: string | null
448+
labels: string[]
449+
timestamp: string | null
445450
createdAt: string
446451
}
447452
}

apps/sim/tools/agentphone/get_conversation.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ export const agentphoneGetConversationTool: ToolConfig<
8181
direction: (msg.direction as string) ?? '',
8282
channel: (msg.channel as string | null) ?? null,
8383
mediaUrl: (msg.mediaUrl as string | null) ?? null,
84+
mediaUrls: Array.isArray(msg.mediaUrls) ? (msg.mediaUrls as string[]) : [],
8485
receivedAt: (msg.receivedAt as string) ?? '',
8586
})
8687
)
@@ -129,6 +130,11 @@ export const agentphoneGetConversationTool: ToolConfig<
129130
direction: { type: 'string', description: 'inbound or outbound' },
130131
channel: { type: 'string', description: 'sms, mms, or imessage', optional: true },
131132
mediaUrl: { type: 'string', description: 'Attached media URL', optional: true },
133+
mediaUrls: {
134+
type: 'array',
135+
description: 'All attached media URLs',
136+
items: { type: 'string' },
137+
},
132138
receivedAt: { type: 'string', description: 'ISO 8601 timestamp' },
133139
},
134140
},

apps/sim/tools/agentphone/get_conversation_messages.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ export const agentphoneGetConversationMessagesTool: ToolConfig<
8585
direction: (msg.direction as string) ?? '',
8686
channel: (msg.channel as string | null) ?? null,
8787
mediaUrl: (msg.mediaUrl as string | null) ?? null,
88+
mediaUrls: Array.isArray(msg.mediaUrls) ? (msg.mediaUrls as string[]) : [],
8889
receivedAt: (msg.receivedAt as string) ?? '',
8990
})
9091
),
@@ -107,6 +108,11 @@ export const agentphoneGetConversationMessagesTool: ToolConfig<
107108
direction: { type: 'string', description: 'inbound or outbound' },
108109
channel: { type: 'string', description: 'sms, mms, or imessage', optional: true },
109110
mediaUrl: { type: 'string', description: 'Attached media URL', optional: true },
111+
mediaUrls: {
112+
type: 'array',
113+
description: 'All attached media URLs',
114+
items: { type: 'string' },
115+
},
110116
receivedAt: { type: 'string', description: 'ISO 8601 timestamp' },
111117
},
112118
},

apps/sim/tools/agentphone/list_contacts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const agentphoneListContactsTool: ToolConfig<
3131
type: 'number',
3232
required: false,
3333
visibility: 'user-or-llm',
34-
description: 'Number of results to return (default 50)',
34+
description: 'Number of results to return (default 50, max 200)',
3535
},
3636
offset: {
3737
type: 'number',

apps/sim/tools/agentphone/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export interface AgentPhoneConversationMessage {
4141
direction: string
4242
channel: string | null
4343
mediaUrl: string | null
44+
mediaUrls: string[]
4445
receivedAt: string
4546
}
4647

0 commit comments

Comments
 (0)