Skip to content

Commit c290080

Browse files
committed
added more wandConfigs
1 parent 1f4c71e commit c290080

35 files changed

+2893
-0
lines changed

apps/sim/blocks/blocks/airtable.ts

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,37 @@ export const AirtableBlock: BlockConfig<AirtableResponse> = {
7979
type: 'long-input',
8080
placeholder: 'Airtable formula to filter records (optional)',
8181
condition: { field: 'operation', value: 'list' },
82+
wandConfig: {
83+
enabled: true,
84+
prompt: `Generate an Airtable filter formula based on the user's description.
85+
Airtable formulas use a syntax similar to Excel/spreadsheet formulas.
86+
87+
Common functions:
88+
- {Field Name} - Reference a field by name (with curly braces)
89+
- AND(condition1, condition2) - Both conditions must be true
90+
- OR(condition1, condition2) - Either condition can be true
91+
- NOT(condition) - Negates the condition
92+
- IF(condition, value_if_true, value_if_false)
93+
- FIND("text", {Field}) - Find text in a field (returns position or 0)
94+
- SEARCH("text", {Field}) - Case-insensitive search
95+
- LEN({Field}) - Length of text
96+
- DATETIME_DIFF(date1, date2, 'days') - Difference between dates
97+
- TODAY() - Current date
98+
- NOW() - Current date and time
99+
- BLANK() - Empty value
100+
- {Field} = "" - Check if field is empty
101+
- {Field} != "" - Check if field is not empty
102+
103+
Examples:
104+
- "find all completed tasks" -> {Status} = "Completed"
105+
- "records from last 7 days" -> DATETIME_DIFF(NOW(), {Created}, 'days') <= 7
106+
- "name contains John" -> FIND("John", {Name}) > 0
107+
- "status is active or pending" -> OR({Status} = "Active", {Status} = "Pending")
108+
- "priority is high and not assigned" -> AND({Priority} = "High", {Assignee} = "")
109+
110+
Return ONLY the formula - no explanations, no quotes around the entire formula.`,
111+
placeholder: 'Describe the filter criteria (e.g., "completed tasks from last week")...',
112+
},
82113
},
83114
{
84115
id: 'records',
@@ -87,6 +118,44 @@ export const AirtableBlock: BlockConfig<AirtableResponse> = {
87118
placeholder: 'For Create: `[{ "fields": { ... } }]`\n',
88119
condition: { field: 'operation', value: ['create', 'updateMultiple'] },
89120
required: true,
121+
wandConfig: {
122+
enabled: true,
123+
prompt: `Generate an Airtable records JSON array based on the user's description.
124+
The array should contain objects with a "fields" property containing the record data.
125+
126+
Current records: {context}
127+
128+
Format:
129+
[
130+
{
131+
"fields": {
132+
"Field Name": "value",
133+
"Another Field": "another value"
134+
}
135+
}
136+
]
137+
138+
For updates, include the record ID:
139+
[
140+
{
141+
"id": "recXXXXXXXXXXXXXX",
142+
"fields": {
143+
"Field Name": "updated value"
144+
}
145+
}
146+
]
147+
148+
Examples:
149+
- "add a task called 'Review PR' with status 'Pending'" ->
150+
[{"fields": {"Name": "Review PR", "Status": "Pending"}}]
151+
152+
- "create 3 contacts: John, Jane, Bob" ->
153+
[{"fields": {"Name": "John"}}, {"fields": {"Name": "Jane"}}, {"fields": {"Name": "Bob"}}]
154+
155+
Return ONLY the valid JSON array - no explanations, no markdown.`,
156+
placeholder: 'Describe the records to create or update...',
157+
generationType: 'json-object',
158+
},
90159
},
91160
{
92161
id: 'fields',
@@ -95,6 +164,32 @@ export const AirtableBlock: BlockConfig<AirtableResponse> = {
95164
placeholder: 'Fields to update: `{ "Field Name": "New Value" }`',
96165
condition: { field: 'operation', value: 'update' },
97166
required: true,
167+
wandConfig: {
168+
enabled: true,
169+
prompt: `Generate an Airtable fields JSON object based on the user's description.
170+
The object should contain field names as keys and their values.
171+
172+
Current fields: {context}
173+
174+
Format:
175+
{
176+
"Field Name": "value",
177+
"Another Field": "another value",
178+
"Number Field": 123,
179+
"Checkbox Field": true
180+
}
181+
182+
Examples:
183+
- "set status to completed and priority to low" ->
184+
{"Status": "Completed", "Priority": "Low"}
185+
186+
- "update the name to 'New Project' and set the due date" ->
187+
{"Name": "New Project", "Due Date": "2024-12-31"}
188+
189+
Return ONLY the valid JSON object - no explanations, no markdown.`,
190+
placeholder: 'Describe the fields to update...',
191+
generationType: 'json-object',
192+
},
98193
},
99194
...getTrigger('airtable_webhook').subBlocks,
100195
],

apps/sim/blocks/blocks/apify.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,32 @@ export const ApifyBlock: BlockConfig<RunActorResult> = {
4646
language: 'json',
4747
placeholder: '{\n "startUrl": "https://example.com",\n "maxPages": 10\n}',
4848
required: false,
49+
wandConfig: {
50+
enabled: true,
51+
prompt: `Generate a JSON configuration object for an Apify actor based on the user's description.
52+
Apify actors typically accept configuration for web scraping, automation, or data processing tasks.
53+
54+
Current input: {context}
55+
56+
Common Apify actor input patterns:
57+
- Web scrapers: startUrls, maxPages, proxyConfiguration
58+
- Crawlers: startUrls, maxRequestsPerCrawl, maxConcurrency
59+
- Data processors: inputData, outputFormat, filters
60+
61+
Examples:
62+
- "scrape 5 pages starting from example.com" ->
63+
{"startUrls": [{"url": "https://example.com"}], "maxPages": 5}
64+
65+
- "crawl the site with proxy and limit to 100 requests" ->
66+
{"startUrls": [{"url": "https://example.com"}], "maxRequestsPerCrawl": 100, "proxyConfiguration": {"useApifyProxy": true}}
67+
68+
- "extract product data with custom selectors" ->
69+
{"startUrls": [{"url": "https://shop.example.com"}], "selectors": {"title": "h1.product-title", "price": ".price"}}
70+
71+
Return ONLY the valid JSON object - no explanations, no markdown.`,
72+
placeholder: 'Describe the actor configuration you need...',
73+
generationType: 'json-object',
74+
},
4975
},
5076
{
5177
id: 'timeout',

apps/sim/blocks/blocks/clay.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ export const ClayBlock: BlockConfig<ClayPopulateResponse> = {
3030
JSON: Best for populating multiple columns.
3131
Plain Text: Best for populating a table in free-form style.
3232
`,
33+
wandConfig: {
34+
enabled: true,
35+
prompt:
36+
'Generate JSON data structure or plain text content based on the user description. For JSON, create a well-structured object or array with appropriate keys and sample values. Return ONLY the data content - no explanations, no extra formatting.',
37+
placeholder:
38+
'Describe the data structure you need (e.g., "array of contacts with name, email, and company")...',
39+
generationType: 'json-object',
40+
},
3341
},
3442
{
3543
id: 'authToken',

apps/sim/blocks/blocks/datadog.ts

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,19 @@ export const DatadogBlock: BlockConfig<DatadogResponse> = {
5454
]`,
5555
condition: { field: 'operation', value: 'datadog_submit_metrics' },
5656
required: true,
57+
wandConfig: {
58+
enabled: true,
59+
prompt: `Generate a JSON array of Datadog metrics based on the user's description.
60+
Each metric object should have:
61+
- "metric": The metric name (e.g., "custom.app.response_time")
62+
- "type": The metric type ("gauge", "count", or "rate")
63+
- "points": Array of {timestamp, value} objects
64+
- "tags": Array of tag strings (e.g., "env:production")
65+
66+
Return ONLY valid JSON - no explanations, no markdown code blocks.`,
67+
placeholder: 'Describe the metrics you want to submit...',
68+
generationType: 'json-object',
69+
},
5770
},
5871

5972
// ========================
@@ -66,6 +79,18 @@ export const DatadogBlock: BlockConfig<DatadogResponse> = {
6679
placeholder: 'avg:system.cpu.user{*}',
6780
condition: { field: 'operation', value: 'datadog_query_timeseries' },
6881
required: true,
82+
wandConfig: {
83+
enabled: true,
84+
prompt: `Generate a Datadog metrics query based on the user's description.
85+
The query format is: <aggregation>:<metric_name>{<tag_filters>}
86+
Examples:
87+
- "avg:system.cpu.user{*}" - Average CPU usage across all hosts
88+
- "sum:app.requests{env:production} by {service}" - Sum of requests grouped by service
89+
- "max:system.mem.used{host:webserver-1}" - Max memory on specific host
90+
91+
Return ONLY the query string - no explanations, no quotes around the entire query.`,
92+
placeholder: 'Describe what metrics you want to query...',
93+
},
6994
},
7095
{
7196
id: 'from',
@@ -120,6 +145,15 @@ Return ONLY the numeric timestamp - no explanations, no quotes, no extra text.`,
120145
placeholder: 'Deployment completed',
121146
condition: { field: 'operation', value: 'datadog_create_event' },
122147
required: true,
148+
wandConfig: {
149+
enabled: true,
150+
prompt: `Generate a concise, descriptive event title for Datadog based on the user's description.
151+
The title should be short (under 100 characters), clear, and action-oriented.
152+
Examples: "Deployment completed", "High CPU usage detected", "Service restart initiated"
153+
154+
Return ONLY the title text - no quotes, no extra formatting.`,
155+
placeholder: 'Describe the event you want to create...',
156+
},
123157
},
124158
{
125159
id: 'text',
@@ -128,6 +162,15 @@ Return ONLY the numeric timestamp - no explanations, no quotes, no extra text.`,
128162
placeholder: 'Describe the event...',
129163
condition: { field: 'operation', value: 'datadog_create_event' },
130164
required: true,
165+
wandConfig: {
166+
enabled: true,
167+
prompt: `Generate descriptive event text for a Datadog event based on the user's description.
168+
Include relevant details like what happened, when, and any important context.
169+
Can use Markdown formatting for readability.
170+
171+
Return the event description text directly - no extra formatting needed.`,
172+
placeholder: 'Describe the event details...',
173+
},
131174
},
132175
{
133176
id: 'alertType',
@@ -171,6 +214,15 @@ Return ONLY the numeric timestamp - no explanations, no quotes, no extra text.`,
171214
placeholder: 'High CPU Usage Alert',
172215
condition: { field: 'operation', value: 'datadog_create_monitor' },
173216
required: true,
217+
wandConfig: {
218+
enabled: true,
219+
prompt: `Generate a clear, descriptive monitor name for Datadog based on the user's description.
220+
The name should be concise but descriptive, indicating what is being monitored.
221+
Examples: "High CPU Usage Alert", "Database Connection Pool Low", "API Error Rate Spike"
222+
223+
Return ONLY the monitor name - no quotes, no extra formatting.`,
224+
placeholder: 'Describe what the monitor should track...',
225+
},
174226
},
175227
{
176228
id: 'type',
@@ -196,13 +248,36 @@ Return ONLY the numeric timestamp - no explanations, no quotes, no extra text.`,
196248
placeholder: 'avg(last_5m):avg:system.cpu.idle{*} < 20',
197249
condition: { field: 'operation', value: 'datadog_create_monitor' },
198250
required: true,
251+
wandConfig: {
252+
enabled: true,
253+
prompt: `Generate a Datadog monitor query based on the user's description.
254+
Monitor query format: <aggregation>(<time_window>):<metric_query> <comparator> <threshold>
255+
Examples:
256+
- "avg(last_5m):avg:system.cpu.idle{*} < 20" - Alert when average CPU idle is below 20%
257+
- "sum(last_1h):sum:app.errors{env:production} > 100" - Alert when errors exceed 100 in an hour
258+
- "max(last_15m):max:system.disk.used{*} by {host} > 90" - Alert when disk usage exceeds 90%
259+
260+
Return ONLY the monitor query string - no explanations.`,
261+
placeholder: 'Describe what condition should trigger the alert...',
262+
},
199263
},
200264
{
201265
id: 'message',
202266
title: 'Notification Message',
203267
type: 'long-input',
204268
placeholder: 'Alert! CPU usage is high. @slack-alerts',
205269
condition: { field: 'operation', value: 'datadog_create_monitor' },
270+
wandConfig: {
271+
enabled: true,
272+
prompt: `Generate a Datadog monitor notification message based on the user's description.
273+
The message should include:
274+
- A clear description of what triggered the alert
275+
- Relevant template variables like {{host.name}}, {{value}}
276+
- Optional: notification handles like @slack-channel or @pagerduty
277+
278+
Return the notification message text directly.`,
279+
placeholder: 'Describe what the notification should say...',
280+
},
206281
},
207282
{
208283
id: 'monitorTags',
@@ -224,6 +299,20 @@ Return ONLY the numeric timestamp - no explanations, no quotes, no extra text.`,
224299
type: 'code',
225300
placeholder: '{"notify_no_data": true, "thresholds": {"critical": 90}}',
226301
condition: { field: 'operation', value: 'datadog_create_monitor' },
302+
wandConfig: {
303+
enabled: true,
304+
prompt: `Generate Datadog monitor options JSON based on the user's description.
305+
Common options include:
306+
- "notify_no_data": boolean - Notify when data stops arriving
307+
- "thresholds": {"critical": number, "warning": number} - Alert thresholds
308+
- "renotify_interval": number - Minutes between re-notifications
309+
- "timeout_h": number - Hours before auto-resolving
310+
- "include_tags": boolean - Include trigger tags in notifications
311+
312+
Return ONLY valid JSON - no explanations, no markdown code blocks.`,
313+
placeholder: 'Describe the monitor options you need...',
314+
generationType: 'json-object',
315+
},
227316
},
228317

229318
// ========================
@@ -305,6 +394,18 @@ Return ONLY the numeric timestamp - no explanations, no quotes, no extra text.`,
305394
placeholder: 'service:web-app status:error',
306395
condition: { field: 'operation', value: 'datadog_query_logs' },
307396
required: true,
397+
wandConfig: {
398+
enabled: true,
399+
prompt: `Generate a Datadog log search query based on the user's description.
400+
The query uses facet syntax: facet:value
401+
Examples:
402+
- "service:web-app status:error" - Errors from web-app service
403+
- "source:nginx @http.status_code:>=500" - Nginx 5xx errors
404+
- "host:prod-* @duration:>1000" - Slow requests on prod hosts
405+
406+
Return ONLY the search query string - no explanations.`,
407+
placeholder: 'Describe what logs you want to find...',
408+
},
308409
},
309410
{
310411
id: 'logFrom',
@@ -374,6 +475,20 @@ Return ONLY the relative time string - no explanations, no quotes, no extra text
374475
]`,
375476
condition: { field: 'operation', value: 'datadog_send_logs' },
376477
required: true,
478+
wandConfig: {
479+
enabled: true,
480+
prompt: `Generate a JSON array of Datadog log entries based on the user's description.
481+
Each log object should have:
482+
- "message": The log message text
483+
- "service": The service name
484+
- "ddsource": The log source (e.g., "custom", "nodejs", "python")
485+
- "ddtags": Comma-separated tags (e.g., "env:production,version:1.0")
486+
- Optional: "hostname", "status" (info/warn/error)
487+
488+
Return ONLY valid JSON - no explanations, no markdown code blocks.`,
489+
placeholder: 'Describe the logs you want to send...',
490+
generationType: 'json-object',
491+
},
377492
},
378493

379494
// ========================
@@ -393,6 +508,15 @@ Return ONLY the relative time string - no explanations, no quotes, no extra text
393508
type: 'long-input',
394509
placeholder: 'Scheduled maintenance',
395510
condition: { field: 'operation', value: 'datadog_create_downtime' },
511+
wandConfig: {
512+
enabled: true,
513+
prompt: `Generate a downtime message for Datadog based on the user's description.
514+
The message should explain why monitoring is being muted.
515+
Examples: "Scheduled maintenance window", "Deploying new version", "Infrastructure upgrade in progress"
516+
517+
Return the message text directly - no extra formatting.`,
518+
placeholder: 'Describe the reason for the downtime...',
519+
},
396520
},
397521
{
398522
id: 'downtimeStart',

0 commit comments

Comments
 (0)