improvement(loops): validate loops integration and update skill files (#3384)

* improvement(loops): validate loops integration and update skill files

* loops icon color

* update databricks icon
This commit is contained in:
Waleed
2026-02-28 12:37:01 -08:00
committed by GitHub
parent 40bab7731a
commit 9be75e3633
11 changed files with 53 additions and 36 deletions
+2 -2
View File
@@ -3998,7 +3998,7 @@ export function LoopsIcon(props: SVGProps<SVGSVGElement>) {
return (
<svg {...props} viewBox='0 0 256 256' fill='none' xmlns='http://www.w3.org/2000/svg'>
<path
fill='currentColor'
fill='#FD4E00'
d='M192.352 88.042c0-7.012-5.685-12.697-12.697-12.697s-12.697 5.685-12.697 12.697c0 .634.052 1.255.142 1.866a25.248 25.248 0 0 0-4.9-.49c-14.006 0-25.36 11.354-25.36 25.36 0 1.63.16 3.222.456 4.765a37.8 37.8 0 0 0-9.296-1.173c-20.95 0-37.935 16.985-37.935 37.935S107.05 194.24 128 194.24s37.935-16.985 37.935-37.935a37.7 37.7 0 0 0-3.78-16.555 25.2 25.2 0 0 0 12.487-3.336 25.2 25.2 0 0 0 4.558 3.336v.02c14.006 0 25.36-11.354 25.36-25.36 0-12.48-9.018-22.855-20.888-24.996a12.6 12.6 0 0 0 8.68-11.972m-77.05 68.263c0-7.012 5.685-12.697 12.697-12.697s12.697 5.685 12.697 12.697c0 7.013-5.685 12.697-12.697 12.697s-12.697-5.685-12.697-12.697'
/>
</svg>
@@ -4542,7 +4542,7 @@ export function DatabricksIcon(props: SVGProps<SVGSVGElement>) {
<svg {...props} viewBox='0 0 241 266' fill='none' xmlns='http://www.w3.org/2000/svg'>
<path
d='M228.085 109.654L120.615 171.674L5.53493 105.41L0 108.475V156.582L120.615 225.911L228.085 164.128V189.596L120.615 251.615L5.53493 185.351L0 188.417V196.67L120.615 266L241 196.67V148.564L235.465 145.498L120.615 211.527L12.9148 149.743V124.275L120.615 186.059L241 116.729V69.3298L235.004 65.7925L120.615 131.585L18.4498 73.1028L120.615 14.3848L204.562 62.7269L211.942 58.4823V52.5869L120.615 0L0 69.3298V76.8759L120.615 146.206L228.085 84.1862V109.654Z'
fill='#F9F7F4'
fill='#FF3621'
/>
</svg>
)
@@ -7,7 +7,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="databricks"
color="#FF3621"
color="#F9F7F4"
/>
{/* MANUAL-CONTENT-START:intro */}
+1 -1
View File
@@ -12,7 +12,7 @@ export const DatabricksBlock: BlockConfig<DatabricksResponse> = {
'Connect to Databricks to execute SQL queries against SQL warehouses, trigger and monitor job runs, manage clusters, and retrieve run outputs. Requires a Personal Access Token and workspace host URL.',
docsLink: 'https://docs.sim.ai/tools/databricks',
category: 'tools',
bgColor: '#FF3621',
bgColor: '#F9F7F4',
icon: DatabricksIcon,
subBlocks: [
{
+27 -10
View File
@@ -154,7 +154,9 @@ Example:
{
"clxf1nxlb000t0ml79ajwcsj0": true,
"clxf2q43u00010mlh12q9ggx1": false
}`,
}
Return ONLY the JSON object - no explanations, no extra text.`,
placeholder: 'Describe the mailing list subscriptions...',
},
},
@@ -183,7 +185,9 @@ Example:
"signupDate": "2024-01-15T00:00:00Z",
"isActive": true,
"seats": 5
}`,
}
Return ONLY the JSON object - no explanations, no extra text.`,
placeholder: 'Describe the custom properties...',
},
},
@@ -221,7 +225,9 @@ Example:
"name": "John Smith",
"confirmationUrl": "https://example.com/confirm?token=abc123",
"expiresIn": 24
}`,
}
Return ONLY the JSON object - no explanations, no extra text.`,
placeholder: 'Describe the template variables...',
},
},
@@ -261,7 +267,9 @@ Example:
"contentType": "application/pdf",
"data": "JVBERi0xLjQK..."
}
]`,
]
Return ONLY the JSON array - no explanations, no extra text.`,
placeholder: 'Describe the attachments...',
},
},
@@ -300,7 +308,9 @@ Example:
"amount": 49.99,
"currency": "USD",
"isUpgrade": true
}`,
}
Return ONLY the JSON object - no explanations, no extra text.`,
placeholder: 'Describe the event properties...',
},
},
@@ -349,6 +359,7 @@ Example:
{ label: 'Boolean', id: 'boolean' },
{ label: 'Date', id: 'date' },
],
value: () => 'string',
condition: {
field: 'operation',
value: 'create_contact_property',
@@ -363,6 +374,7 @@ Example:
{ label: 'All Properties', id: 'all' },
{ label: 'Custom Only', id: 'custom' },
],
value: () => 'all',
condition: {
field: 'operation',
value: 'list_contact_properties',
@@ -497,23 +509,28 @@ Example:
outputs: {
success: { type: 'boolean', description: 'Whether the operation succeeded' },
id: { type: 'string', description: 'Contact ID (create/update operations)' },
contacts: { type: 'json', description: 'Array of matching contacts (find operation)' },
contacts: {
type: 'json',
description:
'Array of matching contacts (id, email, firstName, lastName, source, subscribed, userGroup, userId, mailingLists, optInStatus)',
},
message: { type: 'string', description: 'Status message (delete operation)' },
mailingLists: {
type: 'json',
description: 'Array of mailing lists (list mailing lists operation)',
description: 'Array of mailing lists (id, name, description, isPublic)',
},
transactionalEmails: {
type: 'json',
description: 'Array of transactional email templates (list transactional emails operation)',
description: 'Array of transactional email templates (id, name, lastUpdated, dataVariables)',
},
pagination: {
type: 'json',
description: 'Pagination info (list transactional emails operation)',
description:
'Pagination info (totalResults, returnedResults, perPage, totalPages, nextCursor, nextPage)',
},
properties: {
type: 'json',
description: 'Array of contact properties (list contact properties operation)',
description: 'Array of contact properties (key, label, type)',
},
},
}
+2 -2
View File
@@ -3998,7 +3998,7 @@ export function LoopsIcon(props: SVGProps<SVGSVGElement>) {
return (
<svg {...props} viewBox='0 0 256 256' fill='none' xmlns='http://www.w3.org/2000/svg'>
<path
fill='currentColor'
fill='#FD4E00'
d='M192.352 88.042c0-7.012-5.685-12.697-12.697-12.697s-12.697 5.685-12.697 12.697c0 .634.052 1.255.142 1.866a25.248 25.248 0 0 0-4.9-.49c-14.006 0-25.36 11.354-25.36 25.36 0 1.63.16 3.222.456 4.765a37.8 37.8 0 0 0-9.296-1.173c-20.95 0-37.935 16.985-37.935 37.935S107.05 194.24 128 194.24s37.935-16.985 37.935-37.935a37.7 37.7 0 0 0-3.78-16.555 25.2 25.2 0 0 0 12.487-3.336 25.2 25.2 0 0 0 4.558 3.336v.02c14.006 0 25.36-11.354 25.36-25.36 0-12.48-9.018-22.855-20.888-24.996a12.6 12.6 0 0 0 8.68-11.972m-77.05 68.263c0-7.012 5.685-12.697 12.697-12.697s12.697 5.685 12.697 12.697c0 7.013-5.685 12.697-12.697 12.697s-12.697-5.685-12.697-12.697'
/>
</svg>
@@ -4542,7 +4542,7 @@ export function DatabricksIcon(props: SVGProps<SVGSVGElement>) {
<svg {...props} viewBox='0 0 241 266' fill='none' xmlns='http://www.w3.org/2000/svg'>
<path
d='M228.085 109.654L120.615 171.674L5.53493 105.41L0 108.475V156.582L120.615 225.911L228.085 164.128V189.596L120.615 251.615L5.53493 185.351L0 188.417V196.67L120.615 266L241 196.67V148.564L235.465 145.498L120.615 211.527L12.9148 149.743V124.275L120.615 186.059L241 116.729V69.3298L235.004 65.7925L120.615 131.585L18.4498 73.1028L120.615 14.3848L204.562 62.7269L211.942 58.4823V52.5869L120.615 0L0 69.3298V76.8759L120.615 146.206L228.085 84.1862V109.654Z'
fill='#F9F7F4'
fill='#FF3621'
/>
</svg>
)
+6 -6
View File
@@ -95,13 +95,13 @@ export const loopsCreateContactTool: ToolConfig<
Object.assign(body, props)
}
body.email = params.email
if (params.firstName) body.firstName = params.firstName
if (params.lastName) body.lastName = params.lastName
if (params.source) body.source = params.source
body.email = params.email.trim()
if (params.firstName) body.firstName = params.firstName.trim()
if (params.lastName) body.lastName = params.lastName.trim()
if (params.source) body.source = params.source.trim()
if (params.subscribed != null) body.subscribed = params.subscribed
if (params.userGroup) body.userGroup = params.userGroup
if (params.userId) body.userId = params.userId
if (params.userGroup) body.userGroup = params.userGroup.trim()
if (params.userId) body.userId = params.userId.trim()
if (params.mailingLists) {
body.mailingLists =
+2 -2
View File
@@ -46,8 +46,8 @@ export const loopsDeleteContactTool: ToolConfig<
throw new Error('At least one of email or userId is required to delete a contact')
}
const body: Record<string, unknown> = {}
if (params.email) body.email = params.email
if (params.userId) body.userId = params.userId
if (params.email) body.email = params.email.trim()
if (params.userId) body.userId = params.userId.trim()
return body
},
},
+2 -2
View File
@@ -37,8 +37,8 @@ export const loopsFindContactTool: ToolConfig<LoopsFindContactParams, LoopsFindC
throw new Error('At least one of email or userId is required to find a contact')
}
const base = 'https://app.loops.so/api/v1/contacts/find'
if (params.email) return `${base}?email=${encodeURIComponent(params.email)}`
return `${base}?userId=${encodeURIComponent(params.userId!)}`
if (params.email) return `${base}?email=${encodeURIComponent(params.email.trim())}`
return `${base}?userId=${encodeURIComponent(params.userId!.trim())}`
},
method: 'GET',
headers: (params) => ({
+2 -2
View File
@@ -64,8 +64,8 @@ export const loopsSendEventTool: ToolConfig<LoopsSendEventParams, LoopsSendEvent
eventName: params.eventName,
}
if (params.email) body.email = params.email
if (params.userId) body.userId = params.userId
if (params.email) body.email = params.email.trim()
if (params.userId) body.userId = params.userId.trim()
if (params.eventProperties) {
body.eventProperties =
@@ -64,8 +64,8 @@ export const loopsSendTransactionalEmailTool: ToolConfig<
}),
body: (params) => {
const body: Record<string, unknown> = {
email: params.email,
transactionalId: params.transactionalId,
email: params.email.trim(),
transactionalId: params.transactionalId.trim(),
}
if (params.dataVariables) {
+6 -6
View File
@@ -99,13 +99,13 @@ export const loopsUpdateContactTool: ToolConfig<
Object.assign(body, props)
}
if (params.email) body.email = params.email
if (params.userId) body.userId = params.userId
if (params.firstName) body.firstName = params.firstName
if (params.lastName) body.lastName = params.lastName
if (params.source) body.source = params.source
if (params.email) body.email = params.email.trim()
if (params.userId) body.userId = params.userId.trim()
if (params.firstName) body.firstName = params.firstName.trim()
if (params.lastName) body.lastName = params.lastName.trim()
if (params.source) body.source = params.source.trim()
if (params.subscribed != null) body.subscribed = params.subscribed
if (params.userGroup) body.userGroup = params.userGroup
if (params.userGroup) body.userGroup = params.userGroup.trim()
if (params.mailingLists) {
body.mailingLists =