@mindstudio-ai/agent 0.0.14 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +230 -7
- package/dist/cli.js +2556 -0
- package/dist/index.d.ts +579 -89
- package/dist/index.js +1004 -523
- package/dist/index.js.map +1 -1
- package/llms.txt +178 -39
- package/package.json +4 -1
package/dist/cli.js
ADDED
|
@@ -0,0 +1,2556 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __esm = (fn, res) => function __init() {
|
|
5
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
6
|
+
};
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
// src/generated/metadata.ts
|
|
13
|
+
var metadata_exports = {};
|
|
14
|
+
__export(metadata_exports, {
|
|
15
|
+
stepMetadata: () => stepMetadata
|
|
16
|
+
});
|
|
17
|
+
var stepMetadata;
|
|
18
|
+
var init_metadata = __esm({
|
|
19
|
+
"src/generated/metadata.ts"() {
|
|
20
|
+
"use strict";
|
|
21
|
+
stepMetadata = {
|
|
22
|
+
"activeCampaignAddNote": {
|
|
23
|
+
stepType: "activeCampaignAddNote",
|
|
24
|
+
description: "Add a note to an existing contact in ActiveCampaign.",
|
|
25
|
+
usageNotes: "- Requires an ActiveCampaign OAuth connection (connectionId).\n- The contact must already exist \u2014 use the contact ID from a previous create or search step.",
|
|
26
|
+
inputSchema: { "type": "object", "properties": { "contactId": { "type": "string", "description": "ActiveCampaign contact ID to add the note to" }, "note": { "type": "string", "description": "Note text content" }, "connectionId": { "type": "string", "description": "ActiveCampaign OAuth connection ID" } }, "required": ["contactId", "note"] },
|
|
27
|
+
outputSchema: { "description": "This step does not produce output data." }
|
|
28
|
+
},
|
|
29
|
+
"activeCampaignCreateContact": {
|
|
30
|
+
stepType: "activeCampaignCreateContact",
|
|
31
|
+
description: "Create or sync a contact in ActiveCampaign.",
|
|
32
|
+
usageNotes: "- Requires an ActiveCampaign OAuth connection (connectionId).\n- If a contact with the email already exists, it may be updated depending on ActiveCampaign settings.\n- Custom fields are passed as a key-value map where keys are field IDs.",
|
|
33
|
+
inputSchema: { "type": "object", "properties": { "email": { "type": "string", "description": "Contact email address" }, "firstName": { "type": "string", "description": "Contact first name" }, "lastName": { "type": "string", "description": "Contact last name" }, "phone": { "type": "string", "description": "Contact phone number" }, "accountId": { "type": "string", "description": "ActiveCampaign account ID to associate the contact with" }, "customFields": { "type": "object", "description": "Custom field values keyed by field ID" }, "connectionId": { "type": "string", "description": "ActiveCampaign OAuth connection ID" } }, "required": ["email", "firstName", "lastName", "phone", "accountId", "customFields"] },
|
|
34
|
+
outputSchema: { "type": "object", "properties": { "contactId": { "type": "string", "description": "ActiveCampaign contact ID of the created contact" } }, "required": ["contactId"] }
|
|
35
|
+
},
|
|
36
|
+
"addSubtitlesToVideo": {
|
|
37
|
+
stepType: "addSubtitlesToVideo",
|
|
38
|
+
description: "Automatically add subtitles to a video",
|
|
39
|
+
usageNotes: "- Can control style of text and animation",
|
|
40
|
+
inputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "URL of the source video" }, "language": { "type": "string", "description": "ISO language code for subtitle transcription" }, "fontName": { "type": "string", "description": "Google Font name for subtitle text" }, "fontSize": { "type": "number", "description": "Font size in pixels. Default: 100." }, "fontWeight": { "enum": ["normal", "bold", "black"], "type": "string", "description": "Font weight for subtitle text" }, "fontColor": { "enum": ["white", "black", "red", "green", "blue", "yellow", "orange", "purple", "pink", "brown", "gray", "cyan", "magenta"], "type": "string", "description": "Color of the subtitle text" }, "highlightColor": { "enum": ["white", "black", "red", "green", "blue", "yellow", "orange", "purple", "pink", "brown", "gray", "cyan", "magenta"], "type": "string", "description": "Color used to highlight the currently spoken word" }, "strokeWidth": { "type": "number", "description": "Width of the text stroke outline in pixels" }, "strokeColor": { "enum": ["black", "white", "red", "green", "blue", "yellow", "orange", "purple", "pink", "brown", "gray", "cyan", "magenta"], "type": "string", "description": "Color of the text stroke outline" }, "backgroundColor": { "enum": ["black", "white", "red", "green", "blue", "yellow", "orange", "purple", "pink", "brown", "gray", "cyan", "magenta", "none"], "type": "string", "description": "Background color behind subtitle text. Use 'none' for transparent." }, "backgroundOpacity": { "type": "number", "description": "Opacity of the subtitle background. 0.0 = fully transparent, 1.0 = fully opaque." }, "position": { "enum": ["top", "center", "bottom"], "type": "string", "description": "Vertical position of subtitle text on screen" }, "yOffset": { "type": "number", "description": "Vertical offset in pixels from the position. Positive moves down, negative moves up. Default: 75." }, "wordsPerSubtitle": { "type": "number", "description": "Maximum number of words per subtitle segment. Use 1 for single-word display, 2-3 for short phrases, or 8-12 for full sentences. Default: 3." }, "enableAnimation": { "type": "boolean", "description": "When true, enables bounce-style entrance animation for subtitles. Default: true." }, "skipAssetCreation": { "type": "boolean", "description": "When true, the result will not appear in the user's asset history. Useful for intermediate compositing steps." } }, "required": ["videoUrl", "language", "fontName", "fontSize", "fontWeight", "fontColor", "highlightColor", "strokeWidth", "strokeColor", "backgroundColor", "backgroundOpacity", "position", "yOffset", "wordsPerSubtitle", "enableAnimation"] },
|
|
41
|
+
outputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "URL of the video with subtitles added" } }, "required": ["videoUrl"] }
|
|
42
|
+
},
|
|
43
|
+
"airtableCreateUpdateRecord": {
|
|
44
|
+
stepType: "airtableCreateUpdateRecord",
|
|
45
|
+
description: "Create a new record or update an existing record in an Airtable table.",
|
|
46
|
+
usageNotes: '- If recordId is provided, updates that record. Otherwise, creates a new one.\n- When updating with updateMode "onlySpecified", unspecified fields are left as-is. With "all", unspecified fields are cleared.\n- Array fields (e.g. multipleAttachments) accept arrays of values.',
|
|
47
|
+
inputSchema: { "type": "object", "properties": { "connectionId": { "type": "string", "description": "Airtable OAuth connection ID" }, "baseId": { "type": "string", "description": "Airtable base ID" }, "tableId": { "type": "string", "description": "Airtable table ID" }, "recordId": { "type": "string", "description": "Record ID to update. Omit to create a new record" }, "updateMode": { "enum": ["onlySpecified", "all"], "type": "string", "description": "How to handle unspecified fields on update. 'onlySpecified' leaves them as-is, 'all' clears them" }, "fields": { "description": "Field schema metadata used for type resolution" }, "recordData": { "type": "object", "description": "Field values to set, keyed by field ID" } }, "required": ["baseId", "tableId", "fields", "recordData"] },
|
|
48
|
+
outputSchema: { "type": "object", "properties": { "recordId": { "type": "string", "description": "The Airtable record ID of the created or updated record" } }, "required": ["recordId"] }
|
|
49
|
+
},
|
|
50
|
+
"airtableDeleteRecord": {
|
|
51
|
+
stepType: "airtableDeleteRecord",
|
|
52
|
+
description: "Delete a record from an Airtable table by its record ID.",
|
|
53
|
+
usageNotes: "- Requires an active Airtable OAuth connection (connectionId).\n- Silently succeeds if the record does not exist.",
|
|
54
|
+
inputSchema: { "type": "object", "properties": { "connectionId": { "type": "string", "description": "Airtable OAuth connection ID" }, "baseId": { "type": "string", "description": "Airtable base ID" }, "tableId": { "type": "string", "description": "Airtable table ID" }, "recordId": { "type": "string", "description": "Record ID to delete" } }, "required": ["baseId", "tableId", "recordId"] },
|
|
55
|
+
outputSchema: { "type": "object", "properties": { "deleted": { "type": "boolean", "description": "Whether the record was successfully deleted" } }, "required": ["deleted"] }
|
|
56
|
+
},
|
|
57
|
+
"airtableGetRecord": {
|
|
58
|
+
stepType: "airtableGetRecord",
|
|
59
|
+
description: "Fetch a single record from an Airtable table by its record ID.",
|
|
60
|
+
usageNotes: "- Requires an active Airtable OAuth connection (connectionId).\n- If the record is not found, returns a string message instead of a record object.",
|
|
61
|
+
inputSchema: { "type": "object", "properties": { "connectionId": { "type": "string", "description": "Airtable OAuth connection ID" }, "baseId": { "type": "string", "description": 'Airtable base ID (e.g. "appXXXXXX")' }, "tableId": { "type": "string", "description": 'Airtable table ID (e.g. "tblXXXXXX")' }, "recordId": { "type": "string", "description": 'Record ID to fetch (e.g. "recXXXXXX")' } }, "required": ["baseId", "tableId", "recordId"] },
|
|
62
|
+
outputSchema: { "type": "object", "properties": { "record": { "anyOf": [{ "type": "object", "properties": { "id": { "type": "string", "description": "Airtable record ID" }, "createdTime": { "type": "string", "description": "ISO 8601 timestamp when the record was created" }, "fields": { "type": "object", "description": "Field values keyed by field name" } }, "required": ["id", "createdTime", "fields"] }, { "type": "null" }] } }, "required": ["record"] }
|
|
63
|
+
},
|
|
64
|
+
"airtableGetTableRecords": {
|
|
65
|
+
stepType: "airtableGetTableRecords",
|
|
66
|
+
description: "Fetch multiple records from an Airtable table with optional pagination.",
|
|
67
|
+
usageNotes: "- Requires an active Airtable OAuth connection (connectionId).\n- Default limit is 100 records. Maximum is 1000.\n- When outputFormat is 'csv', the variable receives CSV text. The direct execution output always returns parsed records.",
|
|
68
|
+
inputSchema: { "type": "object", "properties": { "connectionId": { "type": "string", "description": "Airtable OAuth connection ID" }, "baseId": { "type": "string", "description": 'Airtable base ID (e.g. "appXXXXXX")' }, "tableId": { "type": "string", "description": 'Airtable table ID (e.g. "tblXXXXXX")' }, "outputFormat": { "enum": ["json", "csv"], "type": "string", "description": "Output format for the result. Defaults to 'json'" }, "limit": { "type": "number", "description": "Maximum number of records to return. Defaults to 100, max 1000" } }, "required": ["baseId", "tableId"] },
|
|
69
|
+
outputSchema: { "type": "object", "properties": { "records": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "Airtable record ID" }, "createdTime": { "type": "string", "description": "ISO 8601 timestamp when the record was created" }, "fields": { "type": "object", "description": "Field values keyed by field name" } }, "required": ["id", "createdTime", "fields"] }, "description": "The list of records retrieved from the Airtable table" } }, "required": ["records"] }
|
|
70
|
+
},
|
|
71
|
+
"analyzeImage": {
|
|
72
|
+
stepType: "analyzeImage",
|
|
73
|
+
description: "Analyze an image using a vision model based on a text prompt.",
|
|
74
|
+
usageNotes: "- Uses the configured vision model to generate a text analysis of the image.\n- The prompt should describe what to look for or extract from the image.",
|
|
75
|
+
inputSchema: { "type": "object", "properties": { "prompt": { "type": "string", "description": "Instructions describing what to look for or extract from the image" }, "imageUrl": { "type": "string", "description": "URL of the image to analyze" }, "visionModelOverride": { "anyOf": [{ "type": "object", "properties": { "model": { "type": "string" }, "config": { "type": "object" } }, "required": ["model"] }, { "type": "object", "properties": { "model": { "type": "string", "description": 'Model identifier (e.g. "gpt-4", "claude-3-opus")' }, "temperature": { "type": "number", "description": "Sampling temperature for the model (0-2)" }, "maxResponseTokens": { "type": "number", "description": "Maximum number of tokens in the model's response" }, "ignorePreamble": { "type": "boolean", "description": "Whether to skip the system preamble/instructions" }, "userMessagePreprocessor": { "type": "object", "properties": { "dataSource": { "type": "string", "description": "Data source identifier for the preprocessor" }, "messageTemplate": { "type": "string", "description": "Template string applied to user messages before sending to the model" }, "maxResults": { "type": "number", "description": "Maximum number of results to include from the data source" }, "enabled": { "type": "boolean", "description": "Whether the preprocessor is active" }, "shouldInherit": { "type": "boolean", "description": "Whether child steps should inherit this preprocessor configuration" } }, "description": "Preprocessor applied to user messages before sending to the model" }, "preamble": { "type": "string", "description": "System preamble/instructions for the model" }, "multiModelEnabled": { "type": "boolean", "description": "Whether multi-model candidate generation is enabled" }, "editResponseEnabled": { "type": "boolean", "description": "Whether the user can edit the model's response" }, "config": { "type": "object", "description": "Additional model-specific configuration" } }, "required": ["model", "temperature", "maxResponseTokens"] }] } }, "required": ["prompt", "imageUrl"] },
|
|
76
|
+
outputSchema: { "type": "object", "properties": { "analysis": { "type": "string", "description": "Text analysis of the image generated by the vision model" } }, "required": ["analysis"] }
|
|
77
|
+
},
|
|
78
|
+
"analyzeVideo": {
|
|
79
|
+
stepType: "analyzeVideo",
|
|
80
|
+
description: "Analyze a video using a video analysis model based on a text prompt.",
|
|
81
|
+
usageNotes: "- Uses the configured video analysis model to generate a text analysis of the video.\n- The prompt should describe what to look for or extract from the video.",
|
|
82
|
+
inputSchema: { "type": "object", "properties": { "prompt": { "type": "string", "description": "Instructions describing what to look for or extract from the video" }, "videoUrl": { "type": "string", "description": "URL of the video to analyze" }, "videoAnalysisModelOverride": { "anyOf": [{ "type": "object", "properties": { "model": { "type": "string" }, "config": { "type": "object" } }, "required": ["model"] }, { "type": "object", "properties": { "model": { "type": "string", "description": 'Model identifier (e.g. "gpt-4", "claude-3-opus")' }, "temperature": { "type": "number", "description": "Sampling temperature for the model (0-2)" }, "maxResponseTokens": { "type": "number", "description": "Maximum number of tokens in the model's response" }, "ignorePreamble": { "type": "boolean", "description": "Whether to skip the system preamble/instructions" }, "userMessagePreprocessor": { "type": "object", "properties": { "dataSource": { "type": "string", "description": "Data source identifier for the preprocessor" }, "messageTemplate": { "type": "string", "description": "Template string applied to user messages before sending to the model" }, "maxResults": { "type": "number", "description": "Maximum number of results to include from the data source" }, "enabled": { "type": "boolean", "description": "Whether the preprocessor is active" }, "shouldInherit": { "type": "boolean", "description": "Whether child steps should inherit this preprocessor configuration" } }, "description": "Preprocessor applied to user messages before sending to the model" }, "preamble": { "type": "string", "description": "System preamble/instructions for the model" }, "multiModelEnabled": { "type": "boolean", "description": "Whether multi-model candidate generation is enabled" }, "editResponseEnabled": { "type": "boolean", "description": "Whether the user can edit the model's response" }, "config": { "type": "object", "description": "Additional model-specific configuration" } }, "required": ["model", "temperature", "maxResponseTokens"] }] } }, "required": ["prompt", "videoUrl"] },
|
|
83
|
+
outputSchema: { "type": "object", "properties": { "analysis": { "type": "string", "description": "Text analysis of the video generated by the video analysis model" } }, "required": ["analysis"] }
|
|
84
|
+
},
|
|
85
|
+
"captureThumbnail": {
|
|
86
|
+
stepType: "captureThumbnail",
|
|
87
|
+
description: "Capture a thumbnail from a video at a specified timestamp",
|
|
88
|
+
usageNotes: "",
|
|
89
|
+
inputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "URL of the source video to capture a frame from" }, "at": { "anyOf": [{ "type": "number" }, { "type": "string" }] } }, "required": ["videoUrl", "at"] },
|
|
90
|
+
outputSchema: { "type": "object", "properties": { "thumbnailUrl": { "type": "string", "description": "URL of the captured thumbnail image" } }, "required": ["thumbnailUrl"] }
|
|
91
|
+
},
|
|
92
|
+
"codaCreateUpdatePage": {
|
|
93
|
+
stepType: "codaCreateUpdatePage",
|
|
94
|
+
description: "Create a new page or update an existing page in a Coda document.",
|
|
95
|
+
usageNotes: "- Requires a Coda OAuth connection (connectionId).\n- If pageData.pageId is provided, updates that page. Otherwise, creates a new one.\n- Page content is provided as markdown and converted to Coda's canvas format.\n- When updating, insertionMode controls how content is applied (default: 'append').",
|
|
96
|
+
inputSchema: { "type": "object", "properties": { "connectionId": { "type": "string", "description": "Coda OAuth connection ID" }, "pageData": { "type": "object", "properties": { "docId": { "type": "string", "description": "Coda document ID" }, "pageId": { "type": "string", "description": "Page ID to update. Omit to create a new page" }, "name": { "type": "string", "description": "Page title" }, "subtitle": { "type": "string", "description": "Page subtitle" }, "iconName": { "type": "string", "description": "Page icon name" }, "imageUrl": { "type": "string", "description": "Page cover image URL" }, "parentPageId": { "type": "string", "description": "Parent page ID for nesting under another page" }, "pageContent": { "anyOf": [{ "type": "string" }, {}] }, "contentUpdate": { "description": "Content update payload for partial updates" }, "insertionMode": { "type": "string", "description": 'How to insert content on update: "append" or "replace"' } }, "required": ["docId", "name", "subtitle", "iconName", "imageUrl", "pageContent"], "description": "Page configuration including document ID, title, content, and optional parent page" } }, "required": ["pageData"] },
|
|
97
|
+
outputSchema: { "type": "object", "properties": { "pageId": { "type": "string", "description": "The Coda page ID of the created or updated page" } }, "required": ["pageId"] }
|
|
98
|
+
},
|
|
99
|
+
"codaCreateUpdateRow": {
|
|
100
|
+
stepType: "codaCreateUpdateRow",
|
|
101
|
+
description: "Create a new row or update an existing row in a Coda table.",
|
|
102
|
+
usageNotes: "- Requires a Coda OAuth connection (connectionId).\n- If rowId is provided, updates that row. Otherwise, creates a new one.\n- Row data keys are column IDs. Empty values are excluded.",
|
|
103
|
+
inputSchema: { "type": "object", "properties": { "connectionId": { "type": "string", "description": "Coda OAuth connection ID" }, "docId": { "type": "string", "description": "Coda document ID" }, "tableId": { "type": "string", "description": "Table ID within the document" }, "rowId": { "type": "string", "description": "Row ID to update. Omit to create a new row" }, "rowData": { "type": "object", "description": "Column values to set, keyed by column ID" } }, "required": ["docId", "tableId", "rowData"] },
|
|
104
|
+
outputSchema: { "type": "object", "properties": { "rowId": { "type": "string", "description": "The Coda row ID of the created or updated row" } }, "required": ["rowId"] }
|
|
105
|
+
},
|
|
106
|
+
"codaFindRow": {
|
|
107
|
+
stepType: "codaFindRow",
|
|
108
|
+
description: "Search for a row in a Coda table by matching column values.",
|
|
109
|
+
usageNotes: "- Requires a Coda OAuth connection (connectionId).\n- Returns the first row matching all specified column values, or null if no match.\n- Search criteria in rowData are ANDed together.",
|
|
110
|
+
inputSchema: { "type": "object", "properties": { "connectionId": { "type": "string", "description": "Coda OAuth connection ID" }, "docId": { "type": "string", "description": "Coda document ID" }, "tableId": { "type": "string", "description": "Table ID to search within" }, "rowData": { "type": "object", "description": "Column values to match against, keyed by column ID. All criteria are ANDed together" } }, "required": ["docId", "tableId", "rowData"] },
|
|
111
|
+
outputSchema: { "type": "object", "properties": { "row": { "anyOf": [{ "type": "object", "properties": { "id": { "type": "string", "description": "Coda row ID" }, "values": { "type": "object", "description": "Column values keyed by column name" } }, "required": ["id", "values"] }, { "type": "null" }] } }, "required": ["row"] }
|
|
112
|
+
},
|
|
113
|
+
"codaGetPage": {
|
|
114
|
+
stepType: "codaGetPage",
|
|
115
|
+
description: "Export and read the contents of a page from a Coda document.",
|
|
116
|
+
usageNotes: "- Requires a Coda OAuth connection (connectionId).\n- Page export is asynchronous on Coda's side \u2014 there may be a brief delay while it processes.\n- If a page was just created in a prior step, there is an automatic 20-second retry if the first export attempt fails.",
|
|
117
|
+
inputSchema: { "type": "object", "properties": { "connectionId": { "type": "string", "description": "Coda OAuth connection ID" }, "docId": { "type": "string", "description": "Coda document ID" }, "pageId": { "type": "string", "description": "Page ID within the document" }, "outputFormat": { "enum": ["html", "markdown"], "type": "string", "description": "Export format for the page content. Defaults to 'html'" } }, "required": ["docId", "pageId"] },
|
|
118
|
+
outputSchema: { "type": "object", "properties": { "content": { "type": "string", "description": "Page content in the requested format (HTML or Markdown)" } }, "required": ["content"] }
|
|
119
|
+
},
|
|
120
|
+
"codaGetTableRows": {
|
|
121
|
+
stepType: "codaGetTableRows",
|
|
122
|
+
description: "Fetch rows from a Coda table with optional pagination.",
|
|
123
|
+
usageNotes: "- Requires a Coda OAuth connection (connectionId).\n- Default limit is 10000 rows. Rows are fetched in pages of 500.\n- When outputFormat is 'csv', the variable receives CSV text. The direct execution output always returns parsed rows.",
|
|
124
|
+
inputSchema: { "type": "object", "properties": { "connectionId": { "type": "string", "description": "Coda OAuth connection ID" }, "docId": { "type": "string", "description": "Coda document ID" }, "tableId": { "type": "string", "description": "Table ID within the document" }, "limit": { "type": ["number", "string"] }, "outputFormat": { "enum": ["json", "csv"], "type": "string", "description": "Output format for the result. Defaults to 'json'" } }, "required": ["docId", "tableId"] },
|
|
125
|
+
outputSchema: { "type": "object", "properties": { "rows": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "Coda row ID" }, "values": { "type": "object", "description": "Column values keyed by column name" } }, "required": ["id", "values"] }, "description": "The list of rows retrieved from the Coda table" } }, "required": ["rows"] }
|
|
126
|
+
},
|
|
127
|
+
"convertPdfToImages": {
|
|
128
|
+
stepType: "convertPdfToImages",
|
|
129
|
+
description: "Convert each page of a PDF document into a PNG image.",
|
|
130
|
+
usageNotes: "- Each page is converted to a separate PNG and re-hosted on the CDN.\n- Returns an array of image URLs, one per page.",
|
|
131
|
+
inputSchema: { "type": "object", "properties": { "pdfUrl": { "type": "string", "description": "URL of the PDF document to convert" } }, "required": ["pdfUrl"] },
|
|
132
|
+
outputSchema: { "type": "object", "properties": { "imageUrls": { "type": "array", "items": { "type": "string" }, "description": "CDN URLs of the generated page images, one per page of the PDF" } }, "required": ["imageUrls"] }
|
|
133
|
+
},
|
|
134
|
+
"createDataSource": {
|
|
135
|
+
stepType: "createDataSource",
|
|
136
|
+
description: "Create a new empty vector data source for the current app.",
|
|
137
|
+
usageNotes: '- Creates a new data source (vector database) associated with the current app version.\n- The data source is created empty \u2014 use the "Upload Data Source Document" block to add documents.\n- Returns the new data source ID which can be used in subsequent blocks.',
|
|
138
|
+
inputSchema: { "type": "object", "properties": { "name": { "type": "string", "description": "Name for the new data source (supports variable interpolation)" } }, "required": ["name"] },
|
|
139
|
+
outputSchema: { "description": "This step does not produce output data." }
|
|
140
|
+
},
|
|
141
|
+
"createGoogleCalendarEvent": {
|
|
142
|
+
stepType: "createGoogleCalendarEvent",
|
|
143
|
+
description: "Create a new event on a Google Calendar.",
|
|
144
|
+
usageNotes: '- Requires a Google OAuth connection with Calendar events scope.\n- Date/time values must be ISO 8601 format (e.g. "2025-07-02T10:00:00-07:00").\n- Attendees are specified as one email address per line in a single string.\n- Set addMeetLink to true to automatically attach a Google Meet video call.',
|
|
145
|
+
inputSchema: { "type": "object", "properties": { "connectionId": { "type": "string", "description": "Google OAuth connection ID" }, "summary": { "type": "string", "description": "Event title" }, "description": { "type": "string", "description": "Event description" }, "location": { "type": "string", "description": "Event location" }, "startDateTime": { "type": "string", "description": "Start time in ISO 8601 format" }, "endDateTime": { "type": "string", "description": "End time in ISO 8601 format" }, "attendees": { "type": "string", "description": "Attendee email addresses, one per line" }, "addMeetLink": { "type": "boolean", "description": "Whether to attach a Google Meet video call link" }, "calendarId": { "type": "string", "description": 'Calendar ID (defaults to "primary" if omitted)' } }, "required": ["summary", "startDateTime", "endDateTime"] },
|
|
146
|
+
outputSchema: { "type": "object", "properties": { "eventId": { "type": "string", "description": "Google Calendar event ID" }, "htmlLink": { "type": "string", "description": "URL to view the event in Google Calendar" } }, "required": ["eventId", "htmlLink"] }
|
|
147
|
+
},
|
|
148
|
+
"createGoogleDoc": {
|
|
149
|
+
stepType: "createGoogleDoc",
|
|
150
|
+
description: "Create a new Google Document and optionally populate it with content.",
|
|
151
|
+
usageNotes: '- textType determines how the text field is interpreted: "plain" for plain text, "html" for HTML markup, "markdown" for Markdown.',
|
|
152
|
+
inputSchema: { "type": "object", "properties": { "title": { "type": "string", "description": "Title for the new document" }, "text": { "type": "string", "description": "Document body content" }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" }, "textType": { "enum": ["plain", "html", "markdown"], "type": "string", "description": 'Format of the text field: "plain", "html", or "markdown"' } }, "required": ["title", "text", "textType"] },
|
|
153
|
+
outputSchema: { "type": "object", "properties": { "documentUrl": { "type": "string", "description": "URL of the newly created Google Document" } }, "required": ["documentUrl"] }
|
|
154
|
+
},
|
|
155
|
+
"createGoogleSheet": {
|
|
156
|
+
stepType: "createGoogleSheet",
|
|
157
|
+
description: "Create a new Google Spreadsheet and populate it with CSV data.",
|
|
158
|
+
usageNotes: "",
|
|
159
|
+
inputSchema: { "type": "object", "properties": { "title": { "type": "string", "description": "Title for the new spreadsheet" }, "text": { "type": "string", "description": "CSV data to populate the sheet with" }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" } }, "required": ["title", "text"] },
|
|
160
|
+
outputSchema: { "type": "object", "properties": { "spreadsheetUrl": { "type": "string", "description": "URL of the newly created Google Spreadsheet" } }, "required": ["spreadsheetUrl"] }
|
|
161
|
+
},
|
|
162
|
+
"deleteDataSource": {
|
|
163
|
+
stepType: "deleteDataSource",
|
|
164
|
+
description: "Delete a vector data source from the current app.",
|
|
165
|
+
usageNotes: "- Soft-deletes a data source (vector database) by marking it as deleted.\n- The Milvus partition is cleaned up asynchronously by a background cron job.\n- The data source must belong to the current app version.",
|
|
166
|
+
inputSchema: { "type": "object", "properties": { "dataSourceId": { "type": "string", "description": "ID of the data source to delete (supports variable interpolation)" } }, "required": ["dataSourceId"] },
|
|
167
|
+
outputSchema: { "description": "This step does not produce output data." }
|
|
168
|
+
},
|
|
169
|
+
"deleteDataSourceDocument": {
|
|
170
|
+
stepType: "deleteDataSourceDocument",
|
|
171
|
+
description: "Delete a single document from a data source.",
|
|
172
|
+
usageNotes: "- Soft-deletes a document by marking it as deleted.\n- Requires both the data source ID and document ID.\n- After deletion, reloads vectors into Milvus so the data source reflects the change immediately.",
|
|
173
|
+
inputSchema: { "type": "object", "properties": { "dataSourceId": { "type": "string", "description": "ID of the data source containing the document (supports variable interpolation)" }, "documentId": { "type": "string", "description": "ID of the document to delete (supports variable interpolation)" } }, "required": ["dataSourceId", "documentId"] },
|
|
174
|
+
outputSchema: { "description": "This step does not produce output data." }
|
|
175
|
+
},
|
|
176
|
+
"deleteGmailEmail": {
|
|
177
|
+
stepType: "deleteGmailEmail",
|
|
178
|
+
description: "Move an email to trash in the connected Gmail account (recoverable delete).",
|
|
179
|
+
usageNotes: "- Requires a Google OAuth connection with Gmail modify scope.\n- Uses trash (recoverable) rather than permanent delete.",
|
|
180
|
+
inputSchema: { "type": "object", "properties": { "messageId": { "type": "string", "description": "Gmail message ID to delete (move to trash)" }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" } }, "required": ["messageId"] },
|
|
181
|
+
outputSchema: { "description": "This step does not produce output data." }
|
|
182
|
+
},
|
|
183
|
+
"deleteGoogleCalendarEvent": {
|
|
184
|
+
stepType: "deleteGoogleCalendarEvent",
|
|
185
|
+
description: "Retrieve a specific event from a Google Calendar by event ID.",
|
|
186
|
+
usageNotes: "- Requires a Google OAuth connection with Calendar events scope.\n- The variable receives JSON or XML-like text depending on exportType. The direct execution output always returns the structured event.",
|
|
187
|
+
inputSchema: { "type": "object", "properties": { "connectionId": { "type": "string", "description": "Google OAuth connection ID" }, "eventId": { "type": "string", "description": "Google Calendar event ID to delete" }, "calendarId": { "type": "string", "description": 'Calendar ID (defaults to "primary" if omitted)' } }, "required": ["eventId"] },
|
|
188
|
+
outputSchema: { "description": "This step does not produce output data." }
|
|
189
|
+
},
|
|
190
|
+
"deleteGoogleSheetRows": {
|
|
191
|
+
stepType: "deleteGoogleSheetRows",
|
|
192
|
+
description: "Delete a range of rows from a Google Spreadsheet.",
|
|
193
|
+
usageNotes: "- Requires a Google OAuth connection with Drive scope.\n- startRow and endRow are 1-based row numbers (inclusive).\n- If sheetName is omitted, operates on the first sheet.",
|
|
194
|
+
inputSchema: { "type": "object", "properties": { "documentId": { "type": "string", "description": "Google Spreadsheet ID or URL" }, "sheetName": { "type": "string", "description": "Sheet/tab name (defaults to first sheet)" }, "startRow": { "type": "string", "description": "First row to delete (1-based, inclusive)" }, "endRow": { "type": "string", "description": "Last row to delete (1-based, inclusive)" }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" } }, "required": ["documentId", "startRow", "endRow"] },
|
|
195
|
+
outputSchema: { "description": "This step does not produce output data." }
|
|
196
|
+
},
|
|
197
|
+
"detectPII": {
|
|
198
|
+
stepType: "detectPII",
|
|
199
|
+
description: "Scan text for personally identifiable information using Microsoft Presidio.",
|
|
200
|
+
usageNotes: "- In workflow mode, transitions to detectedStepId if PII is found, notDetectedStepId otherwise.\n- In direct execution, returns the detection results without transitioning.\n- If entities is empty, returns immediately with no detections.",
|
|
201
|
+
inputSchema: { "type": "object", "properties": { "input": { "type": "string", "description": "Text to scan for personally identifiable information" }, "language": { "type": "string", "description": 'Language code of the input text (e.g. "en")' }, "entities": { "type": "array", "items": { "type": "string" }, "description": 'PII entity types to scan for (e.g. ["PHONE_NUMBER", "EMAIL_ADDRESS"]). Empty array means nothing is scanned.' }, "detectedStepId": { "type": "string", "description": "Step to transition to if PII is detected (workflow mode)" }, "notDetectedStepId": { "type": "string", "description": "Step to transition to if no PII is detected (workflow mode)" }, "outputLogVariable": { "type": "string", "description": "Variable name to store the raw detection results" } }, "required": ["input", "language", "entities"] },
|
|
202
|
+
outputSchema: { "type": "object", "properties": { "detected": { "type": "boolean", "description": "Whether any PII was found in the input text" }, "detections": { "type": "array", "items": { "type": "object", "properties": { "entity_type": { "type": "string", "description": 'PII entity type (e.g. "PHONE_NUMBER", "EMAIL_ADDRESS", "PERSON")' }, "start": { "type": "number", "description": "Start character index in the input text" }, "end": { "type": "number", "description": "End character index in the input text" }, "score": { "type": "number", "description": "Confidence score between 0 and 1" } }, "required": ["entity_type", "start", "end", "score"] }, "description": "List of detected PII entities with type, location, and confidence" } }, "required": ["detected", "detections"] }
|
|
203
|
+
},
|
|
204
|
+
"downloadVideo": {
|
|
205
|
+
stepType: "downloadVideo",
|
|
206
|
+
description: "Download a video file",
|
|
207
|
+
usageNotes: "- Works with YouTube, TikTok, etc., by using ytdlp behind the scenes\n- Can save as mp4 or mp3",
|
|
208
|
+
inputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "URL of the video to download (supports YouTube, TikTok, etc. via yt-dlp)" }, "format": { "enum": ["mp4", "mp3"], "type": "string", "description": "Output format for the downloaded file" } }, "required": ["videoUrl", "format"] },
|
|
209
|
+
outputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "URL of the downloaded and re-hosted video file" } }, "required": ["videoUrl"] }
|
|
210
|
+
},
|
|
211
|
+
"enhanceImageGenerationPrompt": {
|
|
212
|
+
stepType: "enhanceImageGenerationPrompt",
|
|
213
|
+
description: "Generate or enhance an image generation prompt using a language model. Optionally generates a negative prompt.",
|
|
214
|
+
usageNotes: "- Rewrites the user's prompt with added detail about style, lighting, colors, and composition.\n- Also useful for initial generation, it doesn't always need to be enhancing an existing prompt\n- When includeNegativePrompt is true, a second model call generates a negative prompt.",
|
|
215
|
+
inputSchema: { "type": "object", "properties": { "initialPrompt": { "type": "string", "description": "The raw prompt to enhance" }, "includeNegativePrompt": { "type": "boolean", "description": "Whether to also generate a negative prompt" }, "negativePromptDestinationVariableName": { "type": "string", "description": "Variable name to save the negative prompt into" }, "systemPrompt": { "type": "string", "description": "Custom system prompt for the enhancement model. Uses a default prompt if not provided" }, "modelOverride": { "description": "Model override settings. Leave undefined to use the default model" } }, "required": ["initialPrompt", "includeNegativePrompt", "systemPrompt"] },
|
|
216
|
+
outputSchema: { "type": "object", "properties": { "prompt": { "type": "string", "description": "The enhanced image generation prompt" }, "negativePrompt": { "type": "string", "description": "The negative prompt, only present when includeNegativePrompt was true" } }, "required": ["prompt"] }
|
|
217
|
+
},
|
|
218
|
+
"enhanceVideoGenerationPrompt": {
|
|
219
|
+
stepType: "enhanceVideoGenerationPrompt",
|
|
220
|
+
description: "Generate or enhance a video generation prompt using a language model. Optionally generates a negative prompt.",
|
|
221
|
+
usageNotes: "- Rewrites the user's prompt with added detail about style, camera movement, lighting, and composition.\n- Also useful for initial generation, it doesn't always need to be enhancing an existing prompt\n- When includeNegativePrompt is true, a second model call generates a negative prompt.",
|
|
222
|
+
inputSchema: { "type": "object", "properties": { "initialPrompt": { "type": "string", "description": "The raw prompt to enhance" }, "includeNegativePrompt": { "type": "boolean", "description": "Whether to also generate a negative prompt" }, "negativePromptDestinationVariableName": { "type": "string", "description": "Variable name to save the negative prompt into" }, "systemPrompt": { "type": "string", "description": "Custom system prompt for the enhancement model. Uses a default prompt if not provided" }, "modelOverride": { "description": "Model override settings. Leave undefined to use the default model" } }, "required": ["initialPrompt", "includeNegativePrompt", "systemPrompt"] },
|
|
223
|
+
outputSchema: { "type": "object", "properties": { "prompt": { "type": "string", "description": "The enhanced video generation prompt" }, "negativePrompt": { "type": "string", "description": "The negative prompt, only present when includeNegativePrompt was true" } }, "required": ["prompt"] }
|
|
224
|
+
},
|
|
225
|
+
"enrichPerson": {
|
|
226
|
+
stepType: "enrichPerson",
|
|
227
|
+
description: "Look up professional information about a person using Apollo.io. Search by ID, name, LinkedIn URL, email, or domain.",
|
|
228
|
+
usageNotes: "- At least one search parameter must be provided.\n- Returns enriched data from Apollo including contact details, employment info, and social profiles.",
|
|
229
|
+
inputSchema: { "type": "object", "properties": { "params": { "type": "object", "properties": { "id": { "type": "string", "description": "Apollo person ID" }, "name": { "type": "string", "description": "Person's full name" }, "linkedinUrl": { "type": "string", "description": "LinkedIn profile URL" }, "email": { "type": "string", "description": "Email address" }, "domain": { "type": "string", "description": "Company domain" } }, "required": ["id", "name", "linkedinUrl", "email", "domain"], "description": "Search parameters to identify the person (ID, name, LinkedIn URL, email, or domain)" } }, "required": ["params"] },
|
|
230
|
+
outputSchema: { "type": "object", "properties": { "data": { "description": "Apollo enrichment result with contact details, employment history, and social profiles" } }, "required": ["data"] }
|
|
231
|
+
},
|
|
232
|
+
"extractAudioFromVideo": {
|
|
233
|
+
stepType: "extractAudioFromVideo",
|
|
234
|
+
description: "Extract audio MP3 from a video file",
|
|
235
|
+
usageNotes: "",
|
|
236
|
+
inputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "URL of the source video to extract audio from" } }, "required": ["videoUrl"] },
|
|
237
|
+
outputSchema: { "type": "object", "properties": { "audioUrl": { "type": "string", "description": "URL of the extracted audio MP3 file" } }, "required": ["audioUrl"] }
|
|
238
|
+
},
|
|
239
|
+
"extractText": {
|
|
240
|
+
stepType: "extractText",
|
|
241
|
+
description: "Download a file from a URL and extract its text content. Supports PDFs, plain text files, and other document formats.",
|
|
242
|
+
usageNotes: "- Best suited for PDFs and raw text/document files. For web pages, use the scrapeUrl step instead.\n- Accepts a single URL, a comma-separated list of URLs, or a JSON array of URLs.\n- Files are rehosted on the MindStudio CDN before extraction.\n- Maximum file size is 50MB per URL.",
|
|
243
|
+
inputSchema: { "type": "object", "properties": { "url": { "anyOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }] } }, "required": ["url"] },
|
|
244
|
+
outputSchema: { "type": "object", "properties": { "text": { "anyOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }] } }, "required": ["text"] }
|
|
245
|
+
},
|
|
246
|
+
"fetchDataSourceDocument": {
|
|
247
|
+
stepType: "fetchDataSourceDocument",
|
|
248
|
+
description: "Fetch the full extracted text contents of a document in a data source.",
|
|
249
|
+
usageNotes: '- Loads a document by ID and returns its full extracted text content.\n- The document must have been successfully processed (status "done").\n- Also returns document metadata (name, summary, word count).',
|
|
250
|
+
inputSchema: { "type": "object", "properties": { "dataSourceId": { "type": "string", "description": "ID of the data source containing the document (supports variable interpolation)" }, "documentId": { "type": "string", "description": "ID of the document to fetch (supports variable interpolation)" } }, "required": ["dataSourceId", "documentId"] },
|
|
251
|
+
outputSchema: { "description": "This step does not produce output data." }
|
|
252
|
+
},
|
|
253
|
+
"fetchGoogleDoc": {
|
|
254
|
+
stepType: "fetchGoogleDoc",
|
|
255
|
+
description: "Fetch the contents of an existing Google Document.",
|
|
256
|
+
usageNotes: '- exportType controls the output format: "html" for HTML markup, "markdown" for Markdown, "json" for structured JSON, "plain" for plain text.',
|
|
257
|
+
inputSchema: { "type": "object", "properties": { "documentId": { "type": "string", "description": "Google Document ID (from the document URL)" }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" }, "exportType": { "enum": ["html", "markdown", "json", "plain"], "type": "string", "description": 'Output format: "html", "markdown", "json", or "plain"' } }, "required": ["documentId", "exportType"] },
|
|
258
|
+
outputSchema: { "type": "object", "properties": { "content": { "type": "string", "description": "Document contents in the requested export format" } }, "required": ["content"] }
|
|
259
|
+
},
|
|
260
|
+
"fetchGoogleSheet": {
|
|
261
|
+
stepType: "fetchGoogleSheet",
|
|
262
|
+
description: "Fetch contents of a Google Spreadsheet range.",
|
|
263
|
+
usageNotes: '- range uses A1 notation (e.g. "Sheet1!A1:C10"). Omit to fetch the entire first sheet.\n- exportType controls the output format: "csv" for comma-separated values, "json" for structured JSON.',
|
|
264
|
+
inputSchema: { "type": "object", "properties": { "spreadsheetId": { "type": "string", "description": "Google Spreadsheet ID (from the spreadsheet URL)" }, "range": { "type": "string", "description": 'Cell range in A1 notation (e.g. "Sheet1!A1:C10")' }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" }, "exportType": { "enum": ["csv", "json"], "type": "string", "description": 'Output format: "csv" or "json"' } }, "required": ["spreadsheetId", "range", "exportType"] },
|
|
265
|
+
outputSchema: { "type": "object", "properties": { "content": { "type": "string", "description": "Spreadsheet data in the requested export format" } }, "required": ["content"] }
|
|
266
|
+
},
|
|
267
|
+
"fetchSlackChannelHistory": {
|
|
268
|
+
stepType: "fetchSlackChannelHistory",
|
|
269
|
+
description: "Fetch recent message history from a Slack channel.",
|
|
270
|
+
usageNotes: "- The user is responsible for connecting their Slack workspace and selecting the channel",
|
|
271
|
+
inputSchema: { "type": "object", "properties": { "connectionId": { "type": "string", "description": "Slack OAuth connection ID (leave empty to allow user to select)" }, "channelId": { "type": "string", "description": "Slack channel ID (leave empty to allow user to select a channel)" }, "limit": { "type": "number", "description": "Maximum number of messages to return (1-15)" }, "startDate": { "type": "string", "description": "Earliest date to include messages from" }, "endDate": { "type": "string", "description": "Latest date to include messages up to" }, "includeImages": { "type": "boolean", "description": "Whether to include images in the output" }, "includeRawMessage": { "type": "boolean", "description": "Whether to include the raw Slack message object (useful for bot messages with complex attachments)" } }, "required": ["channelId"] },
|
|
272
|
+
outputSchema: { "type": "object", "properties": { "messages": { "type": "array", "items": { "type": "object", "properties": { "from": { "type": "string" }, "content": { "type": "string" }, "timestamp": { "type": "string" }, "images": { "type": "array", "items": { "type": "string" } }, "rawMessage": { "type": "object", "properties": { "app_id": { "type": "string" }, "assistant_app_thread": { "type": "object", "properties": { "first_user_thread_reply": { "type": "string" }, "title": { "type": "string" }, "title_blocks": { "type": "array", "items": { "type": "string" } } } }, "attachments": { "type": "array", "items": { "type": "object", "properties": { "actions": { "type": "array", "items": { "type": "string" } }, "app_id": { "type": "string" }, "app_unfurl_url": { "type": "string" }, "author_icon": { "type": "string" }, "author_id": { "type": "string" }, "author_link": { "type": "string" }, "author_name": { "type": "string" }, "author_subname": { "type": "string" }, "blocks": { "type": "array", "items": { "type": "string" } }, "bot_id": { "type": "string" }, "bot_team_id": { "type": "string" }, "callback_id": { "type": "string" }, "channel_id": { "type": "string" }, "channel_name": { "type": "string" }, "channel_team": { "type": "string" }, "color": { "type": "string" }, "fallback": { "type": "string" }, "fields": { "type": "array", "items": { "type": "string" } }, "file_id": { "type": "string" }, "filename": { "type": "string" }, "files": { "type": "array", "items": { "type": "string" } }, "footer": { "type": "string" }, "footer_icon": { "type": "string" }, "from_url": { "type": "string" }, "hide_border": { "type": "boolean" }, "hide_color": { "type": "boolean" }, "id": { "type": "number" }, "image_bytes": { "type": "number" }, "image_height": { "type": "number" }, "image_url": { "type": "string" }, "image_width": { "type": "number" }, "indent": { "type": "boolean" }, "is_app_unfurl": { "type": "boolean" }, "is_file_attachment": { "type": "boolean" }, "is_msg_unfurl": { "type": "boolean" }, "is_reply_unfurl": { "type": "boolean" }, "is_thread_root_unfurl": { "type": "boolean" }, "list": { "type": "string" }, "list_record": { "type": "string" }, "list_record_id": { "type": "string" }, "list_records": { "type": "array", "items": { "type": "string" } }, "list_schema": { "type": "array", "items": { "type": "string" } }, "list_view": { "type": "string" }, "list_view_id": { "type": "string" }, "message_blocks": { "type": "array", "items": { "type": "string" } }, "metadata": { "type": "string" }, "mimetype": { "type": "string" }, "mrkdwn_in": { "type": "array", "items": { "type": "string" } }, "msg_subtype": { "type": "string" }, "original_url": { "type": "string" }, "pretext": { "type": "string" }, "preview": { "type": "string" }, "service_icon": { "type": "string" }, "service_name": { "type": "string" }, "service_url": { "type": "string" }, "size": { "type": "number" }, "text": { "type": "string" }, "thumb_height": { "type": "number" }, "thumb_url": { "type": "string" }, "thumb_width": { "type": "number" }, "title": { "type": "string" }, "title_link": { "type": "string" }, "ts": { "type": "string" }, "url": { "type": "string" }, "video_html": { "type": "string" }, "video_html_height": { "type": "number" }, "video_html_width": { "type": "number" }, "video_url": { "type": "string" } } } }, "blocks": { "type": "array", "items": { "type": "object", "properties": { "accessory": { "type": "string" }, "alt_text": { "type": "string" }, "api_decoration_available": { "type": "boolean" }, "app_collaborators": { "type": "array", "items": { "type": "string" } }, "app_id": { "type": "string" }, "author_name": { "type": "string" }, "block_id": { "type": "string" }, "bot_user_id": { "type": "string" }, "button_label": { "type": "string" }, "call": { "type": "string" }, "call_id": { "type": "string" }, "description": { "type": "string" }, "developer_trace_id": { "type": "string" }, "dispatch_action": { "type": "boolean" }, "element": { "type": "string" }, "elements": { "type": "array", "items": { "type": "string" } }, "expand": { "type": "boolean" }, "external_id": { "type": "string" }, "fallback": { "type": "string" }, "fields": { "type": "array", "items": { "type": "string" } }, "file": { "type": "string" }, "file_id": { "type": "string" }, "function_trigger_id": { "type": "string" }, "hint": { "type": "string" }, "image_bytes": { "type": "number" }, "image_height": { "type": "number" }, "image_url": { "type": "string" }, "image_width": { "type": "number" }, "is_animated": { "type": "boolean" }, "is_workflow_app": { "type": "boolean" }, "label": { "type": "string" }, "optional": { "type": "boolean" }, "owning_team_id": { "type": "string" }, "provider_icon_url": { "type": "string" }, "provider_name": { "type": "string" }, "sales_home_workflow_app_type": { "type": "number" }, "share_url": { "type": "string" }, "slack_file": { "type": "string" }, "source": { "type": "string" }, "text": { "type": "string" }, "thumbnail_url": { "type": "string" }, "title": { "type": "string" }, "title_url": { "type": "string" }, "trigger_subtype": { "type": "string" }, "trigger_type": { "type": "string" }, "type": { "type": "string" }, "url": { "type": "string" }, "video_url": { "type": "string" }, "workflow_id": { "type": "string" } } } }, "bot_id": { "type": "string" }, "bot_profile": { "type": "object", "properties": { "app_id": { "type": "string" }, "deleted": { "type": "boolean" }, "icons": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "team_id": { "type": "string" }, "updated": { "type": "number" } } }, "client_msg_id": { "type": "string" }, "display_as_bot": { "type": "boolean" }, "edited": { "type": "object", "properties": { "ts": { "type": "string" }, "user": { "type": "string" } } }, "files": { "type": "array", "items": { "type": "object", "properties": { "access": { "type": "string" }, "alt_txt": { "type": "string" }, "app_id": { "type": "string" }, "app_name": { "type": "string" }, "attachments": { "type": "array", "items": {} }, "blocks": { "type": "array", "items": { "type": "string" } }, "bot_id": { "type": "string" }, "can_toggle_canvas_lock": { "type": "boolean" }, "canvas_printing_enabled": { "type": "boolean" }, "canvas_template_mode": { "type": "string" }, "cc": { "type": "array", "items": { "type": "string" } }, "channel_actions_count": { "type": "number" }, "channel_actions_ts": { "type": "string" }, "channels": { "type": "array", "items": { "type": "string" } }, "comments_count": { "type": "number" }, "converted_pdf": { "type": "string" }, "created": { "type": "number" }, "deanimate": { "type": "string" }, "deanimate_gif": { "type": "string" }, "display_as_bot": { "type": "boolean" }, "dm_mpdm_users_with_file_access": { "type": "array", "items": { "type": "string" } }, "duration_ms": { "type": "number" }, "edit_link": { "type": "string" }, "edit_timestamp": { "type": "number" }, "editable": { "type": "boolean" }, "editor": { "type": "string" }, "editors": { "type": "array", "items": { "type": "string" } }, "external_id": { "type": "string" }, "external_type": { "type": "string" }, "external_url": { "type": "string" }, "favorites": { "type": "array", "items": { "type": "string" } }, "file_access": { "type": "string" }, "filetype": { "type": "string" }, "from": { "type": "array", "items": { "type": "string" } }, "groups": { "type": "array", "items": { "type": "string" } }, "has_more": { "type": "boolean" }, "has_more_shares": { "type": "boolean" }, "has_rich_preview": { "type": "boolean" }, "headers": { "type": "string" }, "hls": { "type": "string" }, "hls_embed": { "type": "string" }, "id": { "type": "string" }, "image_exif_rotation": { "type": "number" }, "ims": { "type": "array", "items": { "type": "string" } }, "initial_comment": { "type": "string" }, "is_channel_space": { "type": "boolean" }, "is_external": { "type": "boolean" }, "is_public": { "type": "boolean" }, "is_restricted_sharing_enabled": { "type": "boolean" }, "is_starred": { "type": "boolean" }, "last_editor": { "type": "string" }, "last_read": { "type": "number" }, "lines": { "type": "number" }, "lines_more": { "type": "number" }, "linked_channel_id": { "type": "string" }, "list_csv_download_url": { "type": "string" }, "list_limits": { "type": "string" }, "list_metadata": { "type": "string" }, "media_display_type": { "type": "string" }, "media_progress": { "type": "string" }, "mimetype": { "type": "string" }, "mode": { "type": "string" }, "mp4": { "type": "string" }, "mp4_low": { "type": "string" }, "name": { "type": "string" }, "non_owner_editable": { "type": "boolean" }, "num_stars": { "type": "number" }, "org_or_workspace_access": { "type": "string" }, "original_attachment_count": { "type": "number" }, "original_h": { "type": "string" }, "original_w": { "type": "string" }, "permalink": { "type": "string" }, "permalink_public": { "type": "string" }, "pinned_to": { "type": "array", "items": { "type": "string" } }, "pjpeg": { "type": "string" }, "plain_text": { "type": "string" }, "pretty_type": { "type": "string" }, "preview": { "type": "string" }, "preview_highlight": { "type": "string" }, "preview_is_truncated": { "type": "boolean" }, "preview_plain_text": { "type": "string" }, "private_channels_with_file_access_count": { "type": "number" }, "private_file_with_access_count": { "type": "number" }, "public_url_shared": { "type": "boolean" }, "quip_thread_id": { "type": "string" }, "reactions": { "type": "array", "items": { "type": "string" } }, "saved": { "type": "string" }, "sent_to_self": { "type": "boolean" }, "shares": { "type": "string" }, "show_badge": { "type": "boolean" }, "simplified_html": { "type": "string" }, "size": { "type": "number" }, "source_team": { "type": "string" }, "subject": { "type": "string" }, "subtype": { "type": "string" }, "team_pref_version_history_enabled": { "type": "boolean" }, "teams_shared_with": { "type": "array", "items": {} }, "template_conversion_ts": { "type": "number" }, "template_description": { "type": "string" }, "template_icon": { "type": "string" }, "template_name": { "type": "string" }, "template_title": { "type": "string" }, "thumb_1024": { "type": "string" }, "thumb_1024_gif": { "type": "string" }, "thumb_1024_h": { "type": "string" }, "thumb_1024_w": { "type": "string" }, "thumb_160": { "type": "string" }, "thumb_160_gif": { "type": "string" }, "thumb_160_h": { "type": "string" }, "thumb_160_w": { "type": "string" }, "thumb_360": { "type": "string" }, "thumb_360_gif": { "type": "string" }, "thumb_360_h": { "type": "string" }, "thumb_360_w": { "type": "string" }, "thumb_480": { "type": "string" }, "thumb_480_gif": { "type": "string" }, "thumb_480_h": { "type": "string" }, "thumb_480_w": { "type": "string" }, "thumb_64": { "type": "string" }, "thumb_64_gif": { "type": "string" }, "thumb_64_h": { "type": "string" }, "thumb_64_w": { "type": "string" }, "thumb_720": { "type": "string" }, "thumb_720_gif": { "type": "string" }, "thumb_720_h": { "type": "string" }, "thumb_720_w": { "type": "string" }, "thumb_80": { "type": "string" }, "thumb_800": { "type": "string" }, "thumb_800_gif": { "type": "string" }, "thumb_800_h": { "type": "string" }, "thumb_800_w": { "type": "string" }, "thumb_80_gif": { "type": "string" }, "thumb_80_h": { "type": "string" }, "thumb_80_w": { "type": "string" }, "thumb_960": { "type": "string" }, "thumb_960_gif": { "type": "string" }, "thumb_960_h": { "type": "string" }, "thumb_960_w": { "type": "string" }, "thumb_gif": { "type": "string" }, "thumb_pdf": { "type": "string" }, "thumb_pdf_h": { "type": "string" }, "thumb_pdf_w": { "type": "string" }, "thumb_tiny": { "type": "string" }, "thumb_video": { "type": "string" }, "thumb_video_h": { "type": "number" }, "thumb_video_w": { "type": "number" }, "timestamp": { "type": "number" }, "title": { "type": "string" }, "title_blocks": { "type": "array", "items": { "type": "string" } }, "to": { "type": "array", "items": { "type": "string" } }, "transcription": { "type": "string" }, "update_notification": { "type": "number" }, "updated": { "type": "number" }, "url_private": { "type": "string" }, "url_private_download": { "type": "string" }, "url_static_preview": { "type": "string" }, "user": { "type": "string" }, "user_team": { "type": "string" }, "username": { "type": "string" }, "vtt": { "type": "string" } } } }, "icons": { "type": "object", "properties": { "emoji": { "type": "string" }, "image_36": { "type": "string" }, "image_48": { "type": "string" }, "image_64": { "type": "string" }, "image_72": { "type": "string" } } }, "inviter": { "type": "string" }, "is_locked": { "type": "boolean" }, "latest_reply": { "type": "string" }, "metadata": { "type": "object", "properties": { "event_payload": { "type": "string" }, "event_type": { "type": "string" } } }, "parent_user_id": { "type": "string" }, "purpose": { "type": "string" }, "reactions": { "type": "array", "items": { "type": "object", "properties": { "count": { "type": "number" }, "name": { "type": "string" }, "url": { "type": "string" }, "users": { "type": "array", "items": { "type": "string" } } } } }, "reply_count": { "type": "number" }, "reply_users": { "type": "array", "items": { "type": "string" } }, "reply_users_count": { "type": "number" }, "root": { "type": "object", "properties": { "bot_id": { "type": "string" }, "icons": { "type": "string" }, "latest_reply": { "type": "string" }, "parent_user_id": { "type": "string" }, "reply_count": { "type": "number" }, "reply_users": { "type": "array", "items": { "type": "string" } }, "reply_users_count": { "type": "number" }, "subscribed": { "type": "boolean" }, "subtype": { "type": "string" }, "text": { "type": "string" }, "thread_ts": { "type": "string" }, "ts": { "type": "string" }, "type": { "type": "string" }, "username": { "type": "string" } } }, "subscribed": { "type": "boolean" }, "subtype": { "type": "string" }, "team": { "type": "string" }, "text": { "type": "string" }, "thread_ts": { "type": "string" }, "topic": { "type": "string" }, "ts": { "type": "string" }, "type": { "type": "string" }, "upload": { "type": "boolean" }, "user": { "type": "string" }, "username": { "type": "string" }, "x_files": { "type": "array", "items": { "type": "string" } } } } }, "required": ["from", "content"] }, "description": "List of messages from the channel history" } }, "required": ["messages"] }
|
|
273
|
+
},
|
|
274
|
+
"fetchYoutubeCaptions": {
|
|
275
|
+
stepType: "fetchYoutubeCaptions",
|
|
276
|
+
description: "Retrieve the captions/transcript for a YouTube video.",
|
|
277
|
+
usageNotes: '- Supports multiple languages via the language parameter.\n- "text" export produces timestamped plain text; "json" export produces structured transcript data.',
|
|
278
|
+
inputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "YouTube video URL to fetch captions for" }, "exportType": { "enum": ["text", "json"], "type": "string", "description": 'Output format: "text" for timestamped plain text, "json" for structured transcript data' }, "language": { "type": "string", "description": 'Language code for the captions (e.g. "en")' } }, "required": ["videoUrl", "exportType", "language"] },
|
|
279
|
+
outputSchema: { "type": "object", "properties": { "transcripts": { "type": "array", "items": { "type": "object", "properties": { "text": { "type": "string", "description": "Transcript text segment" }, "start": { "type": "number", "description": "Start time of the segment in seconds" } }, "required": ["text", "start"] }, "description": "Parsed transcript segments with text and start timestamps" } }, "required": ["transcripts"] }
|
|
280
|
+
},
|
|
281
|
+
"fetchYoutubeChannel": {
|
|
282
|
+
stepType: "fetchYoutubeChannel",
|
|
283
|
+
description: "Retrieve metadata and recent videos for a YouTube channel.",
|
|
284
|
+
usageNotes: "- Accepts a YouTube channel URL (e.g. https://www.youtube.com/@ChannelName or /channel/ID).\n- Returns channel info and video listings as a JSON object.",
|
|
285
|
+
inputSchema: { "type": "object", "properties": { "channelUrl": { "type": "string", "description": "YouTube channel URL (e.g. https://www.youtube.com/@ChannelName or /channel/ID)" } }, "required": ["channelUrl"] },
|
|
286
|
+
outputSchema: { "type": "object", "properties": { "channel": { "type": "object", "description": "Channel metadata and video listings" } }, "required": ["channel"] }
|
|
287
|
+
},
|
|
288
|
+
"fetchYoutubeComments": {
|
|
289
|
+
stepType: "fetchYoutubeComments",
|
|
290
|
+
description: "Retrieve comments for a YouTube video.",
|
|
291
|
+
usageNotes: '- Paginates through comments (up to 5 pages).\n- "text" export produces markdown-formatted text; "json" export produces structured comment data.',
|
|
292
|
+
inputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "YouTube video URL to fetch comments for" }, "exportType": { "enum": ["text", "json"], "type": "string", "description": 'Output format: "text" for markdown-formatted text, "json" for structured comment data' }, "limitPages": { "type": "string", "description": "Maximum number of comment pages to fetch (1-5)" } }, "required": ["videoUrl", "exportType", "limitPages"] },
|
|
293
|
+
outputSchema: { "type": "object", "properties": { "comments": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique comment identifier" }, "link": { "type": "string", "description": "Direct URL to the comment" }, "publishedDate": { "type": "string", "description": "Date the comment was published" }, "text": { "type": "string", "description": "Text content of the comment" }, "likes": { "type": "number", "description": "Number of likes on the comment" }, "replies": { "type": "number", "description": "Number of replies to the comment" }, "author": { "type": "string", "description": "Display name of the comment author" }, "authorLink": { "type": "string", "description": "URL to the author's YouTube channel" }, "authorImg": { "type": "string", "description": "URL of the author's profile image" } }, "required": ["id", "link", "publishedDate", "text", "likes", "replies", "author", "authorLink", "authorImg"] }, "description": "List of comments retrieved from the video" } }, "required": ["comments"] }
|
|
294
|
+
},
|
|
295
|
+
"fetchYoutubeVideo": {
|
|
296
|
+
stepType: "fetchYoutubeVideo",
|
|
297
|
+
description: "Retrieve metadata for a YouTube video (title, description, stats, channel info).",
|
|
298
|
+
usageNotes: "- Returns video metadata, channel info, and engagement stats.\n- Video format data is excluded from the response.",
|
|
299
|
+
inputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "YouTube video URL to fetch metadata for" } }, "required": ["videoUrl"] },
|
|
300
|
+
outputSchema: { "type": "object", "properties": { "video": { "type": "object", "description": "Video metadata including title, description, stats, and channel info" } }, "required": ["video"] }
|
|
301
|
+
},
|
|
302
|
+
"generateAsset": {
|
|
303
|
+
stepType: "generatePdf",
|
|
304
|
+
description: "Generate an HTML asset and export it as a webpage, PDF, or image",
|
|
305
|
+
usageNotes: '- Agents can generate HTML documents and export as webpage, PDFs, images, or videos. They do this by using the "generatePdf" block, which defines an HTML page with variables, and then the generation process renders the page to create the output and save its URL at the specified variable.\n- The template for the HTML page is generated by a separate process, and it can only use variables that have already been defined in the workflow at the time of its execution. It has full access to handlebars to render the HTML template, including a handlebars helper to render a markdown variable string as HTML (which can be useful for creating templates that render long strings). The template can also create its own simple JavaScript to do things like format dates and strings.\n- If PDF or composited image generation are part of the workflow, assistant adds the block and leaves the "source" empty. In a separate step, assistant generates a detailed request for the developer who will write the HTML.\n- Can also auto-generate HTML from a prompt (like a generate text block to generate HTML). In these cases, create a prompt with variables in the dynamicPrompt variable describing, in detail, the document to generate\n- Can either display output directly to user (foreground mode) or save the URL of the asset to a variable (background mode)',
|
|
306
|
+
inputSchema: { "type": "object", "properties": { "source": { "type": "string", "description": "The HTML or Markdown source template for the asset" }, "sourceType": { "enum": ["html", "markdown", "spa", "raw", "dynamic", "customInterface"], "type": "string", "description": "Source type: html, markdown (auto-formatted), spa (single page app), raw (pre-generated HTML in a variable), dynamic (AI-generated from prompt), or customInterface" }, "outputFormat": { "enum": ["pdf", "png", "html", "mp4", "openGraph"], "type": "string", "description": "The output format for the generated asset" }, "pageSize": { "enum": ["full", "letter", "A4", "custom"], "type": "string", "description": "Page size for PDF, PNG, or MP4 output" }, "testData": { "type": "object", "description": "Test data used for previewing the template with sample variable values" }, "options": { "type": "object", "properties": { "pageWidthPx": { "type": "number", "description": "Custom page width in pixels (for custom pageSize)" }, "pageHeightPx": { "type": "number", "description": "Custom page height in pixels (for custom pageSize)" }, "pageOrientation": { "enum": ["portrait", "landscape"], "type": "string", "description": "Page orientation for the rendered output" }, "rehostMedia": { "type": "boolean", "description": "Whether to re-host third-party images on the MindStudio CDN" }, "videoDurationSeconds": { "type": "number", "description": "Duration in seconds for MP4 video output" } }, "description": "Additional rendering options" }, "spaSource": { "type": "object", "properties": { "source": { "type": "string", "description": "Source code of the SPA (legacy, use files instead)" }, "lastCompiledSource": { "type": "string", "description": "Last compiled source (cached)" }, "files": { "type": "object", "description": "Multi-file SPA source" }, "paths": { "type": "array", "items": { "type": "string" }, "description": "Available route paths in the SPA" }, "root": { "type": "string", "description": "Root URL of the SPA bundle" }, "zipUrl": { "type": "string", "description": "URL of the zipped SPA bundle" } }, "required": ["paths", "root", "zipUrl"], "description": "Single page app source configuration (advanced)" }, "rawSource": { "type": "string", "description": "Raw HTML source stored in a variable, using handlebars syntax (e.g. {{myHtmlVariable}})" }, "dynamicPrompt": { "type": "string", "description": 'Prompt to generate the HTML dynamically when sourceType is "dynamic"' }, "dynamicSourceModelOverride": { "type": "object", "properties": { "model": { "type": "string", "description": 'Model identifier (e.g. "gpt-4", "claude-3-opus")' }, "temperature": { "type": "number", "description": "Sampling temperature for the model (0-2)" }, "maxResponseTokens": { "type": "number", "description": "Maximum number of tokens in the model's response" }, "ignorePreamble": { "type": "boolean", "description": "Whether to skip the system preamble/instructions" }, "userMessagePreprocessor": { "type": "object", "properties": { "dataSource": { "type": "string", "description": "Data source identifier for the preprocessor" }, "messageTemplate": { "type": "string", "description": "Template string applied to user messages before sending to the model" }, "maxResults": { "type": "number", "description": "Maximum number of results to include from the data source" }, "enabled": { "type": "boolean", "description": "Whether the preprocessor is active" }, "shouldInherit": { "type": "boolean", "description": "Whether child steps should inherit this preprocessor configuration" } }, "description": "Preprocessor applied to user messages before sending to the model" }, "preamble": { "type": "string", "description": "System preamble/instructions for the model" }, "multiModelEnabled": { "type": "boolean", "description": "Whether multi-model candidate generation is enabled" }, "editResponseEnabled": { "type": "boolean", "description": "Whether the user can edit the model's response" }, "config": { "type": "object", "description": "Additional model-specific configuration" } }, "required": ["model", "temperature", "maxResponseTokens"], "description": "Model override for dynamic HTML generation. Leave undefined to use the default model" }, "transitionControl": { "enum": ["default", "native"], "type": "string", "description": "Controls how the step transitions after displaying in foreground mode" }, "shareControl": { "enum": ["default", "hidden"], "type": "string", "description": "Controls visibility of the share button on displayed assets" }, "shareImageUrl": { "type": "string", "description": "URL of a custom Open Graph share image" }, "skipAssetCreation": { "type": "boolean", "description": "If true, the asset will not appear in the user's asset history" } }, "required": ["source", "sourceType", "outputFormat", "pageSize", "testData"] },
|
|
307
|
+
outputSchema: { "type": "object", "properties": { "url": { "type": "string", "description": "CDN URL of the generated asset (PDF, PNG, HTML, or MP4 depending on outputFormat)" } }, "required": ["url"] }
|
|
308
|
+
},
|
|
309
|
+
"generateChart": {
|
|
310
|
+
stepType: "generateChart",
|
|
311
|
+
description: "Create a chart image using QuickChart (Chart.js) and return the URL.",
|
|
312
|
+
usageNotes: "- The data field must be a Chart.js-compatible JSON object serialized as a string.\n- Supported chart types: bar, line, pie.",
|
|
313
|
+
inputSchema: { "type": "object", "properties": { "chart": { "type": "object", "properties": { "chartType": { "enum": ["bar", "line", "pie"], "type": "string", "description": "The type of chart to generate" }, "data": { "type": "string", "description": "Chart.js-compatible JSON data serialized as a string" }, "options": { "type": "object", "properties": { "width": { "type": "string", "description": 'Image width in pixels (e.g. "500")' }, "height": { "type": "string", "description": 'Image height in pixels (e.g. "300")' } }, "required": ["width", "height"], "description": "Image rendering options" } }, "required": ["chartType", "data", "options"], "description": "Chart configuration including type, data, and rendering options" } }, "required": ["chart"] },
|
|
314
|
+
outputSchema: { "type": "object", "properties": { "chartUrl": { "type": "string", "description": "URL of the generated chart image" } }, "required": ["chartUrl"] }
|
|
315
|
+
},
|
|
316
|
+
"generateImage": {
|
|
317
|
+
stepType: "generateImage",
|
|
318
|
+
description: "Generate an image from a text prompt using an AI model.",
|
|
319
|
+
usageNotes: "- Prompts should be descriptive but concise (roughly 3\u20136 sentences).\n- Images are automatically hosted on a CDN.\n- In foreground mode, the image is displayed to the user. In background mode, the URL is saved to a variable.\n- When generateVariants is true with numVariants > 1, multiple images are generated in parallel.\n- In direct execution, foreground mode behaves as background, and userSelect variant behavior behaves as saveAll.",
|
|
320
|
+
inputSchema: { "type": "object", "properties": { "prompt": { "type": "string", "description": "Text prompt describing the image to generate" }, "skipAssetCreation": { "type": "boolean", "description": "If true, the image will not appear in the user's asset history" }, "imageModelOverride": { "type": "object", "properties": { "model": { "type": "string", "description": "Image generation model identifier" }, "config": { "type": "object", "description": "Additional model-specific configuration" } }, "required": ["model"], "description": "Optional model configuration override. Uses the workflow's default image model if not specified" }, "generateVariants": { "type": "boolean", "description": "Whether to generate multiple image variants in parallel" }, "numVariants": { "type": "number", "description": "Number of variants to generate (max 10)" }, "addWatermark": { "type": "boolean", "description": "Whether to add a MindStudio watermark to the generated image" } }, "required": ["prompt"] },
|
|
321
|
+
outputSchema: { "type": "object", "properties": { "imageUrl": { "anyOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }] } }, "required": ["imageUrl"] }
|
|
322
|
+
},
|
|
323
|
+
"generateLipsync": {
|
|
324
|
+
stepType: "generateLipsync",
|
|
325
|
+
description: "Generate a lip sync video from provided audio and image.",
|
|
326
|
+
usageNotes: "- In foreground mode, the video is displayed to the user. In background mode, the URL is saved to a variable.",
|
|
327
|
+
inputSchema: { "type": "object", "properties": { "skipAssetCreation": { "type": "boolean", "description": "If true, the generated video will not appear in the user's asset history" }, "addWatermark": { "type": "boolean", "description": "Whether to add a MindStudio watermark to the generated video" }, "lipsyncModelOverride": { "type": "object", "properties": { "model": { "type": "string" }, "config": { "type": "object" } }, "required": ["model"], "description": "Optional model configuration override. Uses the workflow's default lipsync model if not specified" } } },
|
|
328
|
+
outputSchema: { "description": "This step does not produce output data." }
|
|
329
|
+
},
|
|
330
|
+
"generateMusic": {
|
|
331
|
+
stepType: "generateMusic",
|
|
332
|
+
description: "Generate an audio file from provided instructions (text) using a music model.",
|
|
333
|
+
usageNotes: "- The text field contains the instructions (prompt) for the music generation.\n- In foreground mode, the audio is displayed to the user. In background mode, the URL is saved to a variable.",
|
|
334
|
+
inputSchema: { "type": "object", "properties": { "text": { "type": "string", "description": "The instructions (prompt) for the music generation" }, "skipAssetCreation": { "type": "boolean", "description": "If true, the generated audio will not appear in the user's asset history" }, "musicModelOverride": { "type": "object", "properties": { "model": { "type": "string" }, "config": { "type": "object" } }, "required": ["model"], "description": "Optional model configuration override. Uses the workflow's default music model if not specified" } }, "required": ["text"] },
|
|
335
|
+
outputSchema: { "description": "This step does not produce output data." }
|
|
336
|
+
},
|
|
337
|
+
"generatePdf": {
|
|
338
|
+
stepType: "generatePdf",
|
|
339
|
+
description: "Generate an HTML asset and export it as a webpage, PDF, or image",
|
|
340
|
+
usageNotes: '- Agents can generate HTML documents and export as webpage, PDFs, images, or videos. They do this by using the "generatePdf" block, which defines an HTML page with variables, and then the generation process renders the page to create the output and save its URL at the specified variable.\n- The template for the HTML page is generated by a separate process, and it can only use variables that have already been defined in the workflow at the time of its execution. It has full access to handlebars to render the HTML template, including a handlebars helper to render a markdown variable string as HTML (which can be useful for creating templates that render long strings). The template can also create its own simple JavaScript to do things like format dates and strings.\n- If PDF or composited image generation are part of the workflow, assistant adds the block and leaves the "source" empty. In a separate step, assistant generates a detailed request for the developer who will write the HTML.\n- Can also auto-generate HTML from a prompt (like a generate text block to generate HTML). In these cases, create a prompt with variables in the dynamicPrompt variable describing, in detail, the document to generate\n- Can either display output directly to user (foreground mode) or save the URL of the asset to a variable (background mode)',
|
|
341
|
+
inputSchema: { "type": "object", "properties": { "source": { "type": "string", "description": "The HTML or Markdown source template for the asset" }, "sourceType": { "enum": ["html", "markdown", "spa", "raw", "dynamic", "customInterface"], "type": "string", "description": "Source type: html, markdown (auto-formatted), spa (single page app), raw (pre-generated HTML in a variable), dynamic (AI-generated from prompt), or customInterface" }, "outputFormat": { "enum": ["pdf", "png", "html", "mp4", "openGraph"], "type": "string", "description": "The output format for the generated asset" }, "pageSize": { "enum": ["full", "letter", "A4", "custom"], "type": "string", "description": "Page size for PDF, PNG, or MP4 output" }, "testData": { "type": "object", "description": "Test data used for previewing the template with sample variable values" }, "options": { "type": "object", "properties": { "pageWidthPx": { "type": "number", "description": "Custom page width in pixels (for custom pageSize)" }, "pageHeightPx": { "type": "number", "description": "Custom page height in pixels (for custom pageSize)" }, "pageOrientation": { "enum": ["portrait", "landscape"], "type": "string", "description": "Page orientation for the rendered output" }, "rehostMedia": { "type": "boolean", "description": "Whether to re-host third-party images on the MindStudio CDN" }, "videoDurationSeconds": { "type": "number", "description": "Duration in seconds for MP4 video output" } }, "description": "Additional rendering options" }, "spaSource": { "type": "object", "properties": { "source": { "type": "string", "description": "Source code of the SPA (legacy, use files instead)" }, "lastCompiledSource": { "type": "string", "description": "Last compiled source (cached)" }, "files": { "type": "object", "description": "Multi-file SPA source" }, "paths": { "type": "array", "items": { "type": "string" }, "description": "Available route paths in the SPA" }, "root": { "type": "string", "description": "Root URL of the SPA bundle" }, "zipUrl": { "type": "string", "description": "URL of the zipped SPA bundle" } }, "required": ["paths", "root", "zipUrl"], "description": "Single page app source configuration (advanced)" }, "rawSource": { "type": "string", "description": "Raw HTML source stored in a variable, using handlebars syntax (e.g. {{myHtmlVariable}})" }, "dynamicPrompt": { "type": "string", "description": 'Prompt to generate the HTML dynamically when sourceType is "dynamic"' }, "dynamicSourceModelOverride": { "type": "object", "properties": { "model": { "type": "string", "description": 'Model identifier (e.g. "gpt-4", "claude-3-opus")' }, "temperature": { "type": "number", "description": "Sampling temperature for the model (0-2)" }, "maxResponseTokens": { "type": "number", "description": "Maximum number of tokens in the model's response" }, "ignorePreamble": { "type": "boolean", "description": "Whether to skip the system preamble/instructions" }, "userMessagePreprocessor": { "type": "object", "properties": { "dataSource": { "type": "string", "description": "Data source identifier for the preprocessor" }, "messageTemplate": { "type": "string", "description": "Template string applied to user messages before sending to the model" }, "maxResults": { "type": "number", "description": "Maximum number of results to include from the data source" }, "enabled": { "type": "boolean", "description": "Whether the preprocessor is active" }, "shouldInherit": { "type": "boolean", "description": "Whether child steps should inherit this preprocessor configuration" } }, "description": "Preprocessor applied to user messages before sending to the model" }, "preamble": { "type": "string", "description": "System preamble/instructions for the model" }, "multiModelEnabled": { "type": "boolean", "description": "Whether multi-model candidate generation is enabled" }, "editResponseEnabled": { "type": "boolean", "description": "Whether the user can edit the model's response" }, "config": { "type": "object", "description": "Additional model-specific configuration" } }, "required": ["model", "temperature", "maxResponseTokens"], "description": "Model override for dynamic HTML generation. Leave undefined to use the default model" }, "transitionControl": { "enum": ["default", "native"], "type": "string", "description": "Controls how the step transitions after displaying in foreground mode" }, "shareControl": { "enum": ["default", "hidden"], "type": "string", "description": "Controls visibility of the share button on displayed assets" }, "shareImageUrl": { "type": "string", "description": "URL of a custom Open Graph share image" }, "skipAssetCreation": { "type": "boolean", "description": "If true, the asset will not appear in the user's asset history" } }, "required": ["source", "sourceType", "outputFormat", "pageSize", "testData"] },
|
|
342
|
+
outputSchema: { "type": "object", "properties": { "url": { "type": "string", "description": "CDN URL of the generated asset (PDF, PNG, HTML, or MP4 depending on outputFormat)" } }, "required": ["url"] }
|
|
343
|
+
},
|
|
344
|
+
"generateStaticVideoFromImage": {
|
|
345
|
+
stepType: "generateStaticVideoFromImage",
|
|
346
|
+
description: "Convert a static image to an MP4",
|
|
347
|
+
usageNotes: "- Can use to create slides/intertitles/slates for video composition",
|
|
348
|
+
inputSchema: { "type": "object", "properties": { "imageUrl": { "type": "string", "description": "URL of the source image to convert to video" }, "duration": { "type": "string", "description": "Duration of the output video in seconds" } }, "required": ["imageUrl", "duration"] },
|
|
349
|
+
outputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "URL of the generated static video" } }, "required": ["videoUrl"] }
|
|
350
|
+
},
|
|
351
|
+
"generateText": {
|
|
352
|
+
stepType: "userMessage",
|
|
353
|
+
description: "Send a message to an AI model and return the response, or echo a system message.",
|
|
354
|
+
usageNotes: `- Source "user" sends the message to an LLM and returns the model's response.
|
|
355
|
+
- Source "system" echoes the message content directly (no AI call).
|
|
356
|
+
- Mode "background" saves the result to a variable. Mode "foreground" streams it to the user (not available in direct execution).
|
|
357
|
+
- Structured output (JSON/CSV) can be enforced via structuredOutputType and structuredOutputExample.`,
|
|
358
|
+
inputSchema: { "type": "object", "properties": { "message": { "type": "string", "description": "The message to send (prompt for AI, or text for system echo)" }, "source": { "enum": ["user", "system"], "type": "string", "description": 'Message source: "user" sends to AI model, "system" echoes message content directly. Defaults to "user"' }, "modelOverride": { "type": "object", "properties": { "model": { "type": "string", "description": 'Model identifier (e.g. "gpt-4", "claude-3-opus")' }, "temperature": { "type": "number", "description": "Sampling temperature for the model (0-2)" }, "maxResponseTokens": { "type": "number", "description": "Maximum number of tokens in the model's response" }, "ignorePreamble": { "type": "boolean", "description": "Whether to skip the system preamble/instructions" }, "userMessagePreprocessor": { "type": "object", "properties": { "dataSource": { "type": "string", "description": "Data source identifier for the preprocessor" }, "messageTemplate": { "type": "string", "description": "Template string applied to user messages before sending to the model" }, "maxResults": { "type": "number", "description": "Maximum number of results to include from the data source" }, "enabled": { "type": "boolean", "description": "Whether the preprocessor is active" }, "shouldInherit": { "type": "boolean", "description": "Whether child steps should inherit this preprocessor configuration" } }, "description": "Preprocessor applied to user messages before sending to the model" }, "preamble": { "type": "string", "description": "System preamble/instructions for the model" }, "multiModelEnabled": { "type": "boolean", "description": "Whether multi-model candidate generation is enabled" }, "editResponseEnabled": { "type": "boolean", "description": "Whether the user can edit the model's response" }, "config": { "type": "object", "description": "Additional model-specific configuration" } }, "required": ["model", "temperature", "maxResponseTokens"], "description": "Model configuration override. Optional; uses the workflow's default model if not specified" }, "structuredOutputType": { "enum": ["text", "json", "csv"], "type": "string", "description": "Output format constraint for structured responses" }, "structuredOutputExample": { "type": "string", "description": "Sample showing the desired output shape (for JSON/CSV formats). A TypeScript interface is also useful here for more complex types." }, "chatHistoryMode": { "enum": ["include", "exclude"], "type": "string", "description": "Whether to include or exclude prior chat history in the AI context" } }, "required": ["message"], "description": "Configuration for the user message step" },
|
|
359
|
+
outputSchema: { "type": "object", "properties": { "content": { "type": "string", "description": "The AI model's response or echoed system message content" } }, "required": ["content"] }
|
|
360
|
+
},
|
|
361
|
+
"generateVideo": {
|
|
362
|
+
stepType: "generateVideo",
|
|
363
|
+
description: "Generate a video from a text prompt using an AI model.",
|
|
364
|
+
usageNotes: "- Prompts should be descriptive but concise (roughly 3\u20136 sentences).\n- Videos are automatically hosted on a CDN.\n- In foreground mode, the video is displayed to the user. In background mode, the URL is saved to a variable.\n- When generateVariants is true with numVariants > 1, multiple videos are generated in parallel.\n- In direct execution, foreground mode behaves as background, and userSelect variant behavior behaves as saveAll.",
|
|
365
|
+
inputSchema: { "type": "object", "properties": { "prompt": { "type": "string", "description": "Text prompt describing the video to generate" }, "skipAssetCreation": { "type": "boolean", "description": "If true, the video will not appear in the user's asset history" }, "videoModelOverride": { "type": "object", "properties": { "model": { "type": "string", "description": "Video generation model identifier" }, "config": { "type": "object", "description": "Additional model-specific configuration" } }, "required": ["model"], "description": "Optional model configuration override. Uses the workflow's default video model if not specified" }, "generateVariants": { "type": "boolean", "description": "Whether to generate multiple video variants in parallel" }, "numVariants": { "type": "number", "description": "Number of variants to generate (max 10)" }, "addWatermark": { "type": "boolean", "description": "Whether to add a MindStudio watermark to the generated video" } }, "required": ["prompt"] },
|
|
366
|
+
outputSchema: { "type": "object", "properties": { "videoUrl": { "anyOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }] } }, "required": ["videoUrl"] }
|
|
367
|
+
},
|
|
368
|
+
"getGmailDraft": {
|
|
369
|
+
stepType: "getGmailDraft",
|
|
370
|
+
description: "Retrieve a specific draft from Gmail by draft ID.",
|
|
371
|
+
usageNotes: "- Requires a Google OAuth connection with Gmail readonly scope.\n- Returns the draft content including subject, recipients, sender, and body.",
|
|
372
|
+
inputSchema: { "type": "object", "properties": { "draftId": { "type": "string", "description": "Gmail draft ID to retrieve" }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" } }, "required": ["draftId"] },
|
|
373
|
+
outputSchema: { "type": "object", "properties": { "draftId": { "type": "string", "description": "Gmail draft ID" }, "messageId": { "type": "string", "description": "Gmail message ID" }, "subject": { "type": "string", "description": "Email subject" }, "to": { "type": "string", "description": "Recipient email" }, "from": { "type": "string", "description": "Sender email" }, "body": { "type": "string", "description": "Draft body content" } }, "required": ["draftId", "messageId", "subject", "to", "from", "body"] }
|
|
374
|
+
},
|
|
375
|
+
"getGmailEmail": {
|
|
376
|
+
stepType: "getGmailEmail",
|
|
377
|
+
description: "Retrieve a specific email from Gmail by message ID.",
|
|
378
|
+
usageNotes: "- Requires a Google OAuth connection with Gmail readonly scope.\n- Returns the email subject, sender, recipient, date, body (plain text preferred, falls back to HTML), and labels.",
|
|
379
|
+
inputSchema: { "type": "object", "properties": { "messageId": { "type": "string", "description": "Gmail message ID to retrieve" }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" } }, "required": ["messageId"] },
|
|
380
|
+
outputSchema: { "type": "object", "properties": { "messageId": { "type": "string", "description": "Gmail message ID" }, "subject": { "type": "string", "description": "Email subject" }, "from": { "type": "string", "description": "Sender email" }, "to": { "type": "string", "description": "Recipient email" }, "date": { "type": "string", "description": "Email date" }, "body": { "type": "string", "description": "Email body content" }, "labels": { "type": "string", "description": "Comma-separated label IDs" } }, "required": ["messageId", "subject", "from", "to", "date", "body", "labels"] }
|
|
381
|
+
},
|
|
382
|
+
"getGoogleCalendarEvent": {
|
|
383
|
+
stepType: "getGoogleCalendarEvent",
|
|
384
|
+
description: "Retrieve a specific event from a Google Calendar by event ID.",
|
|
385
|
+
usageNotes: "- Requires a Google OAuth connection with Calendar events scope.\n- The variable receives JSON or XML-like text depending on exportType. The direct execution output always returns the structured event.",
|
|
386
|
+
inputSchema: { "type": "object", "properties": { "connectionId": { "type": "string", "description": "Google OAuth connection ID" }, "eventId": { "type": "string", "description": "Google Calendar event ID to retrieve" }, "exportType": { "enum": ["json", "text"], "type": "string", "description": 'Format for the variable output: "json" or "text"' }, "calendarId": { "type": "string", "description": 'Calendar ID (defaults to "primary" if omitted)' } }, "required": ["eventId", "exportType"] },
|
|
387
|
+
outputSchema: { "type": "object", "properties": { "event": { "type": "object", "properties": { "id": { "type": "string", "description": "Google Calendar event ID" }, "status": { "type": "string", "description": 'Event status (e.g. "confirmed", "tentative", "cancelled")' }, "htmlLink": { "type": "string", "description": "URL to view the event in Google Calendar" }, "created": { "type": "string", "description": "Timestamp when the event was created" }, "updated": { "type": "string", "description": "Timestamp when the event was last updated" }, "summary": { "type": "string", "description": "Event title" }, "description": { "type": "string", "description": "Event description" }, "location": { "type": "string", "description": "Event location" }, "organizer": { "anyOf": [{ "type": "object", "properties": { "displayName": { "type": "string" }, "email": { "type": "string" } } }, { "type": "null" }] }, "start": { "anyOf": [{ "type": "object", "properties": { "dateTime": { "type": "string" }, "timeZone": { "type": "string" } } }, { "type": "null" }] }, "end": { "anyOf": [{ "type": "object", "properties": { "dateTime": { "type": "string" }, "timeZone": { "type": "string" } } }, { "type": "null" }] }, "attendees": { "anyOf": [{ "type": "array", "items": { "type": "object", "properties": { "displayName": { "type": "string" }, "email": { "type": "string" }, "responseStatus": { "type": "string" } } } }, { "type": "null" }] } }, "description": "The retrieved calendar event" } }, "required": ["event"] }
|
|
388
|
+
},
|
|
389
|
+
"getGoogleDriveFile": {
|
|
390
|
+
stepType: "getGoogleDriveFile",
|
|
391
|
+
description: "Download a file from Google Drive and rehost it on the CDN. Returns a public CDN URL.",
|
|
392
|
+
usageNotes: "- Requires a Google OAuth connection with Drive scope.\n- Google-native files (Docs, Sheets, Slides) cannot be downloaded \u2014 use dedicated steps instead.\n- Maximum file size: 200MB.\n- The file is downloaded and re-uploaded to the CDN; the returned URL is publicly accessible.",
|
|
393
|
+
inputSchema: { "type": "object", "properties": { "fileId": { "type": "string", "description": "Google Drive file ID" }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" } }, "required": ["fileId"] },
|
|
394
|
+
outputSchema: { "type": "object", "properties": { "url": { "type": "string", "description": "CDN URL of the downloaded file" }, "name": { "type": "string", "description": "Original file name" }, "mimeType": { "type": "string", "description": "File MIME type" }, "size": { "type": "number", "description": "File size in bytes" } }, "required": ["url", "name", "mimeType", "size"] }
|
|
395
|
+
},
|
|
396
|
+
"getGoogleSheetInfo": {
|
|
397
|
+
stepType: "getGoogleSheetInfo",
|
|
398
|
+
description: "Get metadata about a Google Spreadsheet including sheet names, row counts, and column counts.",
|
|
399
|
+
usageNotes: "- Requires a Google OAuth connection with Drive scope.\n- Returns the spreadsheet title and a list of all sheets with their dimensions.",
|
|
400
|
+
inputSchema: { "type": "object", "properties": { "documentId": { "type": "string", "description": "Google Spreadsheet ID or URL" }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" } }, "required": ["documentId"] },
|
|
401
|
+
outputSchema: { "type": "object", "properties": { "title": { "type": "string", "description": "Spreadsheet title" }, "sheets": { "type": "array", "items": { "type": "object", "properties": { "sheetId": { "type": "number" }, "title": { "type": "string" }, "rowCount": { "type": "number" }, "columnCount": { "type": "number" } }, "required": ["sheetId", "title", "rowCount", "columnCount"] }, "description": "List of sheets with their properties" } }, "required": ["title", "sheets"] }
|
|
402
|
+
},
|
|
403
|
+
"getMediaMetadata": {
|
|
404
|
+
stepType: "getMediaMetadata",
|
|
405
|
+
description: "Get info about a media file",
|
|
406
|
+
usageNotes: "",
|
|
407
|
+
inputSchema: { "type": "object", "properties": { "mediaUrl": { "type": "string", "description": "URL of the audio or video file to analyze" } }, "required": ["mediaUrl"] },
|
|
408
|
+
outputSchema: { "type": "object", "properties": { "metadata": { "type": "string", "description": "JSON string containing the media file metadata" } }, "required": ["metadata"] }
|
|
409
|
+
},
|
|
410
|
+
"httpRequest": {
|
|
411
|
+
stepType: "httpRequest",
|
|
412
|
+
description: "Make an HTTP request to an external endpoint and return the response.",
|
|
413
|
+
usageNotes: "- Supports GET, POST, PATCH, DELETE, and PUT methods.\n- Body can be raw JSON/text, URL-encoded form data, or multipart form data.",
|
|
414
|
+
inputSchema: { "type": "object", "properties": { "url": { "type": "string", "description": "The request URL" }, "method": { "type": "string", "description": "HTTP method (GET, POST, PATCH, DELETE, or PUT)" }, "headers": { "type": "object", "description": "Custom request headers as key-value pairs" }, "queryParams": { "type": "object", "description": "Query string parameters as key-value pairs" }, "body": { "type": "string", "description": "Raw request body (used for JSON or custom content types)" }, "bodyItems": { "type": "object", "description": "Key-value body items (used for form data or URL-encoded content types)" }, "contentType": { "enum": ["none", "application/json", "application/x-www-form-urlencoded", "multipart/form-data", "custom"], "type": "string", "description": "The content type for the request body" }, "customContentType": { "type": "string", "description": 'Custom Content-Type header value (used when contentType is "custom")' }, "testData": { "type": "object", "description": "Test data for debug/preview mode" } }, "required": ["url", "method", "headers", "queryParams", "body", "bodyItems", "contentType", "customContentType"], "description": "HTTP request configuration" },
|
|
415
|
+
outputSchema: { "type": "object", "properties": { "ok": { "type": "boolean", "description": "Whether the HTTP response status code is in the 2xx range" }, "status": { "type": "number", "description": "HTTP response status code" }, "statusText": { "type": "string", "description": "HTTP response status text" }, "response": { "type": "string", "description": "Response body as a string" } }, "required": ["ok", "status", "statusText", "response"] }
|
|
416
|
+
},
|
|
417
|
+
"hubspotCreateCompany": {
|
|
418
|
+
stepType: "hubspotCreateCompany",
|
|
419
|
+
description: "Create a new company or update an existing one in HubSpot. Matches by domain.",
|
|
420
|
+
usageNotes: "- Requires a HubSpot OAuth connection (connectionId).\n- If a company with the given domain already exists, it is updated. Otherwise, a new one is created.\n- Property values are type-checked against enabledProperties before being sent to HubSpot.",
|
|
421
|
+
inputSchema: { "type": "object", "properties": { "connectionId": { "type": "string", "description": "HubSpot OAuth connection ID" }, "company": { "type": "object", "properties": { "domain": { "type": "string", "description": "Company domain, used for matching existing companies" }, "name": { "type": "string", "description": "Company name" } }, "required": ["domain", "name"], "description": "Company data including domain, name, and additional properties" }, "enabledProperties": { "type": "array", "items": { "type": "object", "properties": { "label": { "type": "string", "description": "Display label for the HubSpot property" }, "value": { "type": "string", "description": "HubSpot property internal name" }, "type": { "enum": ["string", "number", "bool"], "type": "string", "description": "Data type of the property value" } }, "required": ["label", "value", "type"] }, "description": "HubSpot properties enabled for this step, used for type validation" } }, "required": ["company", "enabledProperties"] },
|
|
422
|
+
outputSchema: { "type": "object", "properties": { "companyId": { "type": "string", "description": "HubSpot company ID of the created or updated company" } }, "required": ["companyId"] }
|
|
423
|
+
},
|
|
424
|
+
"hubspotCreateContact": {
|
|
425
|
+
stepType: "hubspotCreateContact",
|
|
426
|
+
description: "Create a new contact or update an existing one in HubSpot. Matches by email address.",
|
|
427
|
+
usageNotes: "- Requires a HubSpot OAuth connection (connectionId).\n- If a contact with the given email already exists, it is updated. Otherwise, a new one is created.\n- If companyDomain is provided, the contact is associated with that company (creating the company if needed).\n- Property values are type-checked against enabledProperties before being sent to HubSpot.",
|
|
428
|
+
inputSchema: { "type": "object", "properties": { "connectionId": { "type": "string", "description": "HubSpot OAuth connection ID" }, "contact": { "type": "object", "properties": { "email": { "type": "string", "description": "Contact email address, used for matching existing contacts" }, "firstname": { "type": "string", "description": "Contact first name" }, "lastname": { "type": "string", "description": "Contact last name" } }, "required": ["email", "firstname", "lastname"], "description": "Contact data including email, first name, last name, and additional properties" }, "enabledProperties": { "type": "array", "items": { "type": "object", "properties": { "label": { "type": "string", "description": "Display label for the HubSpot property" }, "value": { "type": "string", "description": "HubSpot property internal name" }, "type": { "enum": ["string", "number", "bool"], "type": "string", "description": "Data type of the property value" } }, "required": ["label", "value", "type"] }, "description": "HubSpot properties enabled for this step, used for type validation" }, "companyDomain": { "type": "string", "description": "Company domain to associate the contact with. Creates the company if it does not exist" } }, "required": ["contact", "enabledProperties", "companyDomain"] },
|
|
429
|
+
outputSchema: { "type": "object", "properties": { "contactId": { "type": "string", "description": "HubSpot contact ID of the created or updated contact" } }, "required": ["contactId"] }
|
|
430
|
+
},
|
|
431
|
+
"hubspotGetCompany": {
|
|
432
|
+
stepType: "hubspotGetCompany",
|
|
433
|
+
description: "Look up a HubSpot company by domain name or company ID.",
|
|
434
|
+
usageNotes: "- Requires a HubSpot OAuth connection (connectionId).\n- Returns null if the company is not found.\n- When searching by domain, performs a search query then fetches the full company record.\n- Use additionalProperties to request specific HubSpot properties beyond the defaults.",
|
|
435
|
+
inputSchema: { "type": "object", "properties": { "connectionId": { "type": "string", "description": "HubSpot OAuth connection ID" }, "searchBy": { "enum": ["domain", "id"], "type": "string", "description": "How to look up the company: by domain name or HubSpot company ID" }, "companyDomain": { "type": "string", "description": "Domain to search by (used when searchBy is 'domain')" }, "companyId": { "type": "string", "description": "HubSpot company ID (used when searchBy is 'id')" }, "additionalProperties": { "type": "array", "items": { "type": "string" }, "description": "Extra HubSpot property names to include in the response beyond the defaults" } }, "required": ["searchBy", "companyDomain", "companyId", "additionalProperties"] },
|
|
436
|
+
outputSchema: { "type": "object", "properties": { "company": { "anyOf": [{ "type": "object", "properties": { "id": { "type": "string" }, "properties": { "type": "object" }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "archived": { "type": "boolean" } }, "required": ["id", "properties", "createdAt", "updatedAt", "archived"] }, { "type": "null" }] } }, "required": ["company"] }
|
|
437
|
+
},
|
|
438
|
+
"hubspotGetContact": {
|
|
439
|
+
stepType: "hubspotGetContact",
|
|
440
|
+
description: "Look up a HubSpot contact by email address or contact ID.",
|
|
441
|
+
usageNotes: "- Requires a HubSpot OAuth connection (connectionId).\n- Returns null if the contact is not found.\n- Use additionalProperties to request specific HubSpot properties beyond the defaults.",
|
|
442
|
+
inputSchema: { "type": "object", "properties": { "connectionId": { "type": "string", "description": "HubSpot OAuth connection ID" }, "searchBy": { "enum": ["email", "id"], "type": "string", "description": "How to look up the contact: by email address or HubSpot contact ID" }, "contactEmail": { "type": "string", "description": "Email address to search by (used when searchBy is 'email')" }, "contactId": { "type": "string", "description": "HubSpot contact ID (used when searchBy is 'id')" }, "additionalProperties": { "type": "array", "items": { "type": "string" }, "description": "Extra HubSpot property names to include in the response beyond the defaults" } }, "required": ["searchBy", "contactEmail", "contactId", "additionalProperties"] },
|
|
443
|
+
outputSchema: { "type": "object", "properties": { "contact": { "anyOf": [{ "type": "object", "properties": { "id": { "type": "string" }, "properties": { "type": "object" }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "archived": { "type": "boolean" } }, "required": ["id", "properties", "createdAt", "updatedAt", "archived"] }, { "type": "null" }] } }, "required": ["contact"] }
|
|
444
|
+
},
|
|
445
|
+
"hunterApiCompanyEnrichment": {
|
|
446
|
+
stepType: "hunterApiCompanyEnrichment",
|
|
447
|
+
description: "Look up company information by domain using Hunter.io.",
|
|
448
|
+
usageNotes: "- Returns company name, description, location, industry, size, technologies, and more.\n- If the domain input is a full URL, the hostname is automatically extracted.\n- Returns null if the company is not found.",
|
|
449
|
+
inputSchema: { "type": "object", "properties": { "domain": { "type": "string", "description": 'Domain or URL to look up (e.g. "example.com")' } }, "required": ["domain"] },
|
|
450
|
+
outputSchema: { "type": "object", "properties": { "data": { "anyOf": [{ "type": "object", "properties": { "name": { "type": "string" }, "domain": { "type": "string" }, "description": { "type": "string" }, "country": { "type": "string" }, "state": { "type": "string" }, "city": { "type": "string" }, "industry": { "type": "string" }, "employees_range": { "type": "string" }, "logo_url": { "type": "string" }, "technologies": { "type": "array", "items": { "type": "string" } } }, "required": ["name", "domain", "description", "country", "state", "city", "industry", "employees_range", "logo_url", "technologies"] }, { "type": "null" }] } }, "required": ["data"] }
|
|
451
|
+
},
|
|
452
|
+
"hunterApiDomainSearch": {
|
|
453
|
+
stepType: "hunterApiDomainSearch",
|
|
454
|
+
description: "Search for email addresses associated with a domain using Hunter.io.",
|
|
455
|
+
usageNotes: "- If the domain input is a full URL, the hostname is automatically extracted.\n- Returns a list of email addresses found for the domain along with organization info.",
|
|
456
|
+
inputSchema: { "type": "object", "properties": { "domain": { "type": "string", "description": 'Domain or URL to search for email addresses (e.g. "example.com")' } }, "required": ["domain"] },
|
|
457
|
+
outputSchema: { "type": "object", "properties": { "data": { "type": "object", "properties": { "domain": { "type": "string", "description": "The searched domain" }, "disposable": { "type": "boolean", "description": "Whether the domain uses disposable email addresses" }, "webmail": { "type": "boolean", "description": "Whether the domain is a webmail provider" }, "accept_all": { "type": "boolean", "description": "Whether the domain accepts all email addresses" }, "pattern": { "type": "string", "description": 'Common email pattern for the domain (e.g. "{first}.{last}")' }, "organization": { "type": "string", "description": "Organization name associated with the domain" }, "country": { "type": "string", "description": "Country of the organization" }, "state": { "type": "string", "description": "State or region of the organization" }, "emails": { "type": "array", "items": { "type": "object", "properties": { "value": { "type": "string", "description": "Email address" }, "type": { "type": "string", "description": 'Email type (e.g. "personal", "generic")' }, "confidence": { "type": "number", "description": "Confidence score (0-100)" }, "first_name": { "type": "string", "description": "Contact first name" }, "last_name": { "type": "string", "description": "Contact last name" }, "position": { "type": "string", "description": "Job title or position" }, "seniority": { "type": "string", "description": "Seniority level" }, "department": { "type": "string", "description": "Department within the organization" }, "linkedin": { "type": "string", "description": "LinkedIn profile URL" }, "twitter": { "type": "string", "description": "Twitter handle" }, "phone_number": { "type": "string", "description": "Phone number" } }, "required": ["value", "type", "confidence", "first_name", "last_name", "position", "seniority", "department", "linkedin", "twitter", "phone_number"] }, "description": "List of email addresses found for the domain" }, "linked_domains": { "type": "array", "items": { "type": "string" }, "description": "Other domains linked to this organization" } }, "required": ["domain", "disposable", "webmail", "accept_all", "pattern", "organization", "country", "state", "emails", "linked_domains"], "description": "Domain search results including emails and organization info" } }, "required": ["data"] }
|
|
458
|
+
},
|
|
459
|
+
"hunterApiEmailFinder": {
|
|
460
|
+
stepType: "hunterApiEmailFinder",
|
|
461
|
+
description: "Find an email address for a specific person at a domain using Hunter.io.",
|
|
462
|
+
usageNotes: "- Requires a first name, last name, and domain.\n- If the domain input is a full URL, the hostname is automatically extracted.\n- Returns the most likely email address with a confidence score.",
|
|
463
|
+
inputSchema: { "type": "object", "properties": { "domain": { "type": "string", "description": 'Domain to search (e.g. "example.com"). Full URLs are also accepted' }, "firstName": { "type": "string", "description": "Person's first name" }, "lastName": { "type": "string", "description": "Person's last name" } }, "required": ["domain", "firstName", "lastName"] },
|
|
464
|
+
outputSchema: { "type": "object", "properties": { "data": { "type": "object", "properties": { "first_name": { "type": "string", "description": "Person's first name" }, "last_name": { "type": "string", "description": "Person's last name" }, "email": { "type": "string", "description": "The found email address" }, "score": { "type": "number", "description": "Confidence score (0-100)" }, "domain": { "type": "string", "description": "Domain searched" }, "accept_all": { "type": "boolean", "description": "Whether the domain accepts all email addresses" }, "position": { "type": "string", "description": "Job title or position" }, "twitter": { "type": "string", "description": "Twitter handle" }, "linkedin_url": { "type": "string", "description": "LinkedIn profile URL" }, "phone_number": { "type": "string", "description": "Phone number" }, "company": { "type": "string", "description": "Company name" }, "sources": { "type": "array", "items": { "type": "object", "properties": { "domain": { "type": "string", "description": "Domain where the email was found" }, "uri": { "type": "string", "description": "URI of the page where the email was found" }, "extracted_on": { "type": "string", "description": "Date when the email was extracted" } }, "required": ["domain", "uri", "extracted_on"] }, "description": "Sources where the email was found" } }, "required": ["first_name", "last_name", "email", "score", "domain", "accept_all", "position", "twitter", "linkedin_url", "phone_number", "company", "sources"], "description": "Email finder results including the found email and confidence score" } }, "required": ["data"] }
|
|
465
|
+
},
|
|
466
|
+
"hunterApiEmailVerification": {
|
|
467
|
+
stepType: "hunterApiEmailVerification",
|
|
468
|
+
description: "Verify whether an email address is valid and deliverable using Hunter.io.",
|
|
469
|
+
usageNotes: '- Checks email format, MX records, SMTP server, and mailbox deliverability.\n- Returns a status ("valid", "invalid", "accept_all", "webmail", "disposable", "unknown") and a score.',
|
|
470
|
+
inputSchema: { "type": "object", "properties": { "email": { "type": "string", "description": "Email address to verify" } }, "required": ["email"] },
|
|
471
|
+
outputSchema: { "type": "object", "properties": { "data": { "type": "object", "properties": { "status": { "type": "string", "description": 'Verification status (e.g. "valid", "invalid", "accept_all", "webmail", "disposable", "unknown")' }, "result": { "type": "string", "description": "Deliverability result" }, "score": { "type": "number", "description": "Confidence score (0-100)" }, "email": { "type": "string", "description": "The verified email address" }, "regexp": { "type": "boolean", "description": "Whether the email matches a valid format" }, "gibberish": { "type": "boolean", "description": "Whether the email appears to be gibberish" }, "disposable": { "type": "boolean", "description": "Whether the email uses a disposable email service" }, "webmail": { "type": "boolean", "description": "Whether the email is from a webmail provider" }, "mx_records": { "type": "boolean", "description": "Whether MX records exist for the domain" }, "smtp_server": { "type": "boolean", "description": "Whether the SMTP server is reachable" }, "smtp_check": { "type": "boolean", "description": "Whether the SMTP mailbox check passed" }, "accept_all": { "type": "boolean", "description": "Whether the domain accepts all email addresses" }, "block": { "type": "boolean", "description": "Whether the email is blocked" }, "sources": { "type": "array", "items": { "type": "object", "properties": { "domain": { "type": "string", "description": "Domain where the email was found" }, "uri": { "type": "string", "description": "URI of the page where the email was found" }, "extracted_on": { "type": "string", "description": "Date when the email was extracted" } }, "required": ["domain", "uri", "extracted_on"] }, "description": "Sources where the email was found" } }, "required": ["status", "result", "score", "email", "regexp", "gibberish", "disposable", "webmail", "mx_records", "smtp_server", "smtp_check", "accept_all", "block", "sources"], "description": "Email verification results including status, deliverability, and confidence score" } }, "required": ["data"] }
|
|
472
|
+
},
|
|
473
|
+
"hunterApiPersonEnrichment": {
|
|
474
|
+
stepType: "hunterApiPersonEnrichment",
|
|
475
|
+
description: "Look up professional information about a person by their email address using Hunter.io.",
|
|
476
|
+
usageNotes: "- Returns name, job title, social profiles, and company information.\n- If the person is not found, returns an object with an error message instead of throwing.",
|
|
477
|
+
inputSchema: { "type": "object", "properties": { "email": { "type": "string", "description": "Email address to look up" } }, "required": ["email"] },
|
|
478
|
+
outputSchema: { "type": "object", "properties": { "data": { "anyOf": [{ "type": "object", "properties": { "first_name": { "type": "string" }, "last_name": { "type": "string" }, "email": { "type": "string" }, "position": { "type": "string" }, "seniority": { "type": "string" }, "department": { "type": "string" }, "linkedin_url": { "type": "string" }, "twitter": { "type": "string" }, "phone_number": { "type": "string" }, "company": { "anyOf": [{ "type": "object", "properties": { "name": { "type": "string" }, "domain": { "type": "string" }, "industry": { "type": "string" } }, "required": ["name", "domain", "industry"] }, { "type": "null" }] } }, "required": ["first_name", "last_name", "email", "position", "seniority", "department", "linkedin_url", "twitter", "phone_number", "company"] }, { "type": "object", "properties": { "error": { "type": "string" } }, "required": ["error"] }] } }, "required": ["data"] }
|
|
479
|
+
},
|
|
480
|
+
"imageFaceSwap": {
|
|
481
|
+
stepType: "imageFaceSwap",
|
|
482
|
+
description: "Replace a face in an image with a face from another image using AI.",
|
|
483
|
+
usageNotes: "- Requires both a target image and a face source image.\n- Output is re-hosted on the CDN as a PNG.",
|
|
484
|
+
inputSchema: { "type": "object", "properties": { "imageUrl": { "type": "string", "description": "URL of the target image containing the face to replace" }, "faceImageUrl": { "type": "string", "description": "URL of the image containing the replacement face" }, "engine": { "type": "string", "description": "Face swap engine to use" } }, "required": ["imageUrl", "faceImageUrl", "engine"] },
|
|
485
|
+
outputSchema: { "type": "object", "properties": { "imageUrl": { "type": "string", "description": "CDN URL of the face-swapped image (PNG)" } }, "required": ["imageUrl"] }
|
|
486
|
+
},
|
|
487
|
+
"imageRemoveWatermark": {
|
|
488
|
+
stepType: "imageRemoveWatermark",
|
|
489
|
+
description: "Remove watermarks from an image using AI.",
|
|
490
|
+
usageNotes: "- Output is re-hosted on the CDN as a PNG.",
|
|
491
|
+
inputSchema: { "type": "object", "properties": { "imageUrl": { "type": "string", "description": "URL of the image to remove the watermark from" }, "engine": { "type": "string", "description": "Watermark removal engine to use" }, "skipAssetCreation": { "type": "boolean", "description": "When true, the result will not appear in the user's asset history" } }, "required": ["imageUrl", "engine"] },
|
|
492
|
+
outputSchema: { "type": "object", "properties": { "imageUrl": { "type": "string", "description": "CDN URL of the processed image with watermark removed (PNG)" } }, "required": ["imageUrl"] }
|
|
493
|
+
},
|
|
494
|
+
"insertVideoClips": {
|
|
495
|
+
stepType: "insertVideoClips",
|
|
496
|
+
description: "Insert b-roll clips into a base video at a timecode, optionally with an xfade transition.",
|
|
497
|
+
usageNotes: "",
|
|
498
|
+
inputSchema: { "type": "object", "properties": { "baseVideoUrl": { "type": "string", "description": "URL of the base video to insert clips into" }, "overlayVideos": { "type": "array", "items": { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "URL of the overlay video clip" }, "startTimeSec": { "type": "number", "description": "Timecode in seconds at which to insert this clip" } }, "required": ["videoUrl", "startTimeSec"] }, "description": "Array of overlay clips to insert at specified timecodes" }, "transition": { "type": "string", "description": "Optional xfade transition effect name between clips" }, "transitionDuration": { "type": "number", "description": "Duration of the transition in seconds" }, "useOverlayAudio": { "type": "boolean", "description": "When true, uses audio from the overlay clips instead of the base video audio during inserts" }, "skipAssetCreation": { "type": "boolean", "description": "When true, the result will not appear in the user's asset history. Useful for intermediate compositing steps." } }, "required": ["baseVideoUrl", "overlayVideos"] },
|
|
499
|
+
outputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "URL of the video with clips inserted" } }, "required": ["videoUrl"] }
|
|
500
|
+
},
|
|
501
|
+
"listDataSources": {
|
|
502
|
+
stepType: "listDataSources",
|
|
503
|
+
description: "List all data sources for the current app.",
|
|
504
|
+
usageNotes: "- Returns metadata for every data source associated with the current app version.\n- Each entry includes the data source ID, name, description, status, and document list.",
|
|
505
|
+
inputSchema: { "type": "object" },
|
|
506
|
+
outputSchema: { "description": "This step does not produce output data." }
|
|
507
|
+
},
|
|
508
|
+
"listGmailDrafts": {
|
|
509
|
+
stepType: "listGmailDrafts",
|
|
510
|
+
description: "List drafts in the connected Gmail account.",
|
|
511
|
+
usageNotes: "- Requires a Google OAuth connection with Gmail readonly scope.\n- Returns up to 50 drafts (default 10).\n- The variable receives text or JSON depending on exportType.",
|
|
512
|
+
inputSchema: { "type": "object", "properties": { "connectionId": { "type": "string", "description": "Google OAuth connection ID" }, "limit": { "type": "string", "description": "Max drafts to return (default: 10, max: 50)" }, "exportType": { "enum": ["json", "text"], "type": "string", "description": 'Format for the variable output: "json" or "text"' } }, "required": ["exportType"] },
|
|
513
|
+
outputSchema: { "type": "object", "properties": { "drafts": { "type": "array", "items": { "type": "object", "properties": { "draftId": { "type": "string", "description": "Gmail draft ID" }, "messageId": { "type": "string", "description": "Gmail message ID" }, "subject": { "type": "string", "description": "Email subject" }, "to": { "type": "string", "description": "Recipient email" }, "snippet": { "type": "string", "description": "Short preview text" } }, "required": ["draftId", "messageId", "subject", "to", "snippet"] }, "description": "List of draft summaries" } }, "required": ["drafts"] }
|
|
514
|
+
},
|
|
515
|
+
"listGoogleCalendarEvents": {
|
|
516
|
+
stepType: "listGoogleCalendarEvents",
|
|
517
|
+
description: "List upcoming events from a Google Calendar, ordered by start time.",
|
|
518
|
+
usageNotes: "- Requires a Google OAuth connection with Calendar events scope.\n- Only returns future events (timeMin = now).\n- The variable receives JSON or XML-like text depending on exportType. The direct execution output always returns structured events.",
|
|
519
|
+
inputSchema: { "type": "object", "properties": { "connectionId": { "type": "string", "description": "Google OAuth connection ID" }, "limit": { "type": "number", "description": "Maximum number of events to return (default: 10)" }, "exportType": { "enum": ["json", "text"], "type": "string", "description": 'Format for the variable output: "json" or "text"' }, "calendarId": { "type": "string", "description": 'Calendar ID (defaults to "primary" if omitted)' } }, "required": ["limit", "exportType"] },
|
|
520
|
+
outputSchema: { "type": "object", "properties": { "events": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "Google Calendar event ID" }, "status": { "type": "string", "description": 'Event status (e.g. "confirmed", "tentative", "cancelled")' }, "htmlLink": { "type": "string", "description": "URL to view the event in Google Calendar" }, "created": { "type": "string", "description": "Timestamp when the event was created" }, "updated": { "type": "string", "description": "Timestamp when the event was last updated" }, "summary": { "type": "string", "description": "Event title" }, "description": { "type": "string", "description": "Event description" }, "location": { "type": "string", "description": "Event location" }, "organizer": { "anyOf": [{ "type": "object", "properties": { "displayName": { "type": "string" }, "email": { "type": "string" } } }, { "type": "null" }] }, "start": { "anyOf": [{ "type": "object", "properties": { "dateTime": { "type": "string" }, "timeZone": { "type": "string" } } }, { "type": "null" }] }, "end": { "anyOf": [{ "type": "object", "properties": { "dateTime": { "type": "string" }, "timeZone": { "type": "string" } } }, { "type": "null" }] }, "attendees": { "anyOf": [{ "type": "array", "items": { "type": "object", "properties": { "displayName": { "type": "string" }, "email": { "type": "string" }, "responseStatus": { "type": "string" } } } }, { "type": "null" }] } } }, "description": "List of upcoming calendar events ordered by start time" } }, "required": ["events"] }
|
|
521
|
+
},
|
|
522
|
+
"listGoogleDriveFiles": {
|
|
523
|
+
stepType: "listGoogleDriveFiles",
|
|
524
|
+
description: "List files in a Google Drive folder.",
|
|
525
|
+
usageNotes: "- Requires a Google OAuth connection with Drive scope.\n- If folderId is omitted, lists files in the root folder.\n- Returns file metadata including name, type, size, and links.",
|
|
526
|
+
inputSchema: { "type": "object", "properties": { "folderId": { "type": "string", "description": "Google Drive folder ID (defaults to root)" }, "limit": { "type": "number", "description": "Max files to return (default: 20)" }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" }, "exportType": { "enum": ["json", "text"], "type": "string", "description": 'Format for the variable output: "json" or "text"' } }, "required": ["exportType"] },
|
|
527
|
+
outputSchema: { "type": "object", "properties": { "files": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "mimeType": { "type": "string" }, "size": { "type": "string" }, "webViewLink": { "type": "string" }, "createdTime": { "type": "string" }, "modifiedTime": { "type": "string" } }, "required": ["id", "name", "mimeType", "size", "webViewLink", "createdTime", "modifiedTime"] }, "description": "List of files in the folder" } }, "required": ["files"] }
|
|
528
|
+
},
|
|
529
|
+
"logic": {
|
|
530
|
+
stepType: "logic",
|
|
531
|
+
description: "Use an AI model to evaluate which condition from a list is most true, given a context prompt.",
|
|
532
|
+
usageNotes: '- This is "fuzzy" logic evaluated by an AI model, not computational logic. The model picks the most accurate statement.\n- All possible cases must be specified \u2014 there is no default/fallback case.\n- Requires at least two cases.\n- In workflow mode, transitions to the destinationStepId of the winning case. In direct execution, returns the winning case ID and condition.',
|
|
533
|
+
inputSchema: { "type": "object", "properties": { "context": { "type": "string", "description": "Prompt text providing context for the AI evaluation" }, "cases": { "type": "array", "items": { "anyOf": [{ "type": "object", "properties": { "id": { "type": "string", "description": "Unique case identifier" }, "condition": { "type": "string", "description": 'The statement to evaluate (e.g., "User selected a dog")' }, "destinationStepId": { "type": "string", "description": "Step to transition to if this case wins (workflow mode only)" } }, "required": ["id", "condition"] }, { "type": "string" }] }, "description": "List of conditions to evaluate (objects for managed UIs, strings for code)" } }, "required": ["context", "cases"], "description": "Configuration for the logic evaluation step" },
|
|
534
|
+
outputSchema: { "type": "object", "properties": { "selectedCase": { "type": "number", "description": "The index of the winning case" } }, "required": ["selectedCase"] }
|
|
535
|
+
},
|
|
536
|
+
"makeDotComRunScenario": {
|
|
537
|
+
stepType: "makeDotComRunScenario",
|
|
538
|
+
description: "Trigger a Make.com (formerly Integromat) scenario via webhook and return the response.",
|
|
539
|
+
usageNotes: "- The webhook URL must be configured in your Make.com scenario.\n- Input key-value pairs are sent as JSON in the POST body.\n- Response format depends on the Make.com scenario configuration.",
|
|
540
|
+
inputSchema: { "type": "object", "properties": { "webhookUrl": { "type": "string", "description": "Make.com webhook URL for the scenario" }, "input": { "type": "object", "description": "Key-value pairs to send as the JSON POST body" } }, "required": ["webhookUrl", "input"] },
|
|
541
|
+
outputSchema: { "type": "object", "properties": { "data": { "description": "Response from the Make.com scenario (JSON or string depending on scenario configuration)" } }, "required": ["data"] }
|
|
542
|
+
},
|
|
543
|
+
"mergeAudio": {
|
|
544
|
+
stepType: "mergeAudio",
|
|
545
|
+
description: "Merge one or more clips into a single audio file.",
|
|
546
|
+
usageNotes: "",
|
|
547
|
+
inputSchema: { "type": "object", "properties": { "mp3Urls": { "type": "array", "items": { "type": "string" }, "description": "URLs of the MP3 audio clips to merge in order" }, "fileMetadata": { "type": "object", "description": "FFmpeg MP3 metadata key-value pairs to embed in the output file" }, "albumArtUrl": { "type": "string", "description": "URL of an image to embed as album art in the output file" }, "skipAssetCreation": { "type": "boolean", "description": "When true, the result will not appear in the user's asset history. Useful for intermediate compositing steps." } }, "required": ["mp3Urls"] },
|
|
548
|
+
outputSchema: { "type": "object", "properties": { "audioUrl": { "type": "string", "description": "URL of the merged audio file" } }, "required": ["audioUrl"] }
|
|
549
|
+
},
|
|
550
|
+
"mergeVideos": {
|
|
551
|
+
stepType: "mergeVideos",
|
|
552
|
+
description: "Merge one or more clips into a single video.",
|
|
553
|
+
usageNotes: "",
|
|
554
|
+
inputSchema: { "type": "object", "properties": { "videoUrls": { "type": "array", "items": { "type": "string" }, "description": "URLs of the video clips to merge in order" }, "transition": { "type": "string", "description": "Optional xfade transition effect name" }, "transitionDuration": { "type": "number", "description": "Duration of the transition in seconds" }, "skipAssetCreation": { "type": "boolean", "description": "When true, the result will not appear in the user's asset history. Useful for intermediate compositing steps." } }, "required": ["videoUrls"] },
|
|
555
|
+
outputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "URL of the merged video" } }, "required": ["videoUrl"] }
|
|
556
|
+
},
|
|
557
|
+
"mixAudioIntoVideo": {
|
|
558
|
+
stepType: "mixAudioIntoVideo",
|
|
559
|
+
description: "Mix an audio track into a video",
|
|
560
|
+
usageNotes: "",
|
|
561
|
+
inputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "URL of the source video" }, "audioUrl": { "type": "string", "description": "URL of the audio track to mix into the video" }, "options": { "type": "object", "properties": { "keepVideoAudio": { "type": "boolean", "description": "When true, preserves the original video audio alongside the new track. Defaults to false." }, "audioGainDb": { "type": "number", "description": "Volume adjustment for the new audio track in decibels. Defaults to 0." }, "videoGainDb": { "type": "number", "description": "Volume adjustment for the existing video audio in decibels. Defaults to 0." }, "loopAudio": { "type": "boolean", "description": "When true, loops the audio track to match the video duration. Defaults to false." } }, "description": "Audio mixing options" }, "skipAssetCreation": { "type": "boolean", "description": "When true, the result will not appear in the user's asset history. Useful for intermediate compositing steps." } }, "required": ["videoUrl", "audioUrl", "options"] },
|
|
562
|
+
outputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "URL of the video with the mixed audio track" } }, "required": ["videoUrl"] }
|
|
563
|
+
},
|
|
564
|
+
"muteVideo": {
|
|
565
|
+
stepType: "muteVideo",
|
|
566
|
+
description: "Mute a video file",
|
|
567
|
+
usageNotes: "",
|
|
568
|
+
inputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "URL of the source video to mute" }, "skipAssetCreation": { "type": "boolean", "description": "When true, the result will not appear in the user's asset history. Useful for intermediate compositing steps." } }, "required": ["videoUrl"] },
|
|
569
|
+
outputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "URL of the muted video" } }, "required": ["videoUrl"] }
|
|
570
|
+
},
|
|
571
|
+
"n8nRunNode": {
|
|
572
|
+
stepType: "n8nRunNode",
|
|
573
|
+
description: "Trigger an n8n workflow node via webhook and return the response.",
|
|
574
|
+
usageNotes: "- The webhook URL must be configured in your n8n workflow.\n- Supports GET and POST methods with optional Basic authentication.\n- For GET requests, input values are sent as query parameters. For POST, they are sent as JSON body.",
|
|
575
|
+
inputSchema: { "type": "object", "properties": { "method": { "type": "string", "description": "HTTP method to use (GET or POST)" }, "authentication": { "enum": ["none", "basic", "string"], "type": "string", "description": "Authentication type for the webhook request" }, "user": { "type": "string", "description": "Username for Basic authentication" }, "password": { "type": "string", "description": "Password for Basic authentication" }, "webhookUrl": { "type": "string", "description": "n8n webhook URL for the workflow node" }, "input": { "type": "object", "description": "Key-value pairs sent as query params (GET) or JSON body (POST)" } }, "required": ["method", "authentication", "user", "password", "webhookUrl", "input"] },
|
|
576
|
+
outputSchema: { "type": "object", "properties": { "data": { "description": "Response from the n8n node (JSON or string depending on node configuration)" } }, "required": ["data"] }
|
|
577
|
+
},
|
|
578
|
+
"notionCreatePage": {
|
|
579
|
+
stepType: "notionCreatePage",
|
|
580
|
+
description: "Create a new page in Notion as a child of an existing page.",
|
|
581
|
+
usageNotes: "- Requires a Notion OAuth connection (connectionId).\n- Content is provided as markdown and converted to Notion blocks (headings, paragraphs, lists, code, quotes).\n- The page is created as a child of the specified parent page (pageId).",
|
|
582
|
+
inputSchema: { "type": "object", "properties": { "pageId": { "type": "string", "description": "Parent page ID to create the new page under" }, "content": { "type": "string", "description": "Page content in markdown format" }, "title": { "type": "string", "description": "Page title" }, "connectionId": { "type": "string", "description": "Notion OAuth connection ID" } }, "required": ["pageId", "content", "title"] },
|
|
583
|
+
outputSchema: { "type": "object", "properties": { "pageId": { "type": "string", "description": "Notion page ID of the created page" }, "pageUrl": { "type": "string", "description": "URL to view the page in Notion" } }, "required": ["pageId", "pageUrl"] }
|
|
584
|
+
},
|
|
585
|
+
"notionUpdatePage": {
|
|
586
|
+
stepType: "notionUpdatePage",
|
|
587
|
+
description: "Update the content of an existing Notion page.",
|
|
588
|
+
usageNotes: '- Requires a Notion OAuth connection (connectionId).\n- Content is provided as markdown and converted to Notion blocks.\n- "append" mode adds content to the end of the page. "overwrite" mode deletes all existing blocks first.',
|
|
589
|
+
inputSchema: { "type": "object", "properties": { "pageId": { "type": "string", "description": "Notion page ID to update" }, "content": { "type": "string", "description": "New content in markdown format" }, "mode": { "enum": ["append", "overwrite"], "type": "string", "description": "How to apply the content: 'append' adds to end, 'overwrite' replaces all existing content" }, "connectionId": { "type": "string", "description": "Notion OAuth connection ID" } }, "required": ["pageId", "content", "mode"] },
|
|
590
|
+
outputSchema: { "type": "object", "properties": { "pageId": { "type": "string", "description": "Notion page ID of the updated page" }, "pageUrl": { "type": "string", "description": "URL to view the page in Notion" } }, "required": ["pageId", "pageUrl"] }
|
|
591
|
+
},
|
|
592
|
+
"peopleSearch": {
|
|
593
|
+
stepType: "peopleSearch",
|
|
594
|
+
description: "Search for people matching specific criteria using Apollo.io. Supports natural language queries and advanced filters.",
|
|
595
|
+
usageNotes: '- Can use a natural language "smartQuery" which is converted to Apollo search parameters by an AI model.\n- Advanced params can override or supplement the smart query results.\n- Optionally enriches returned people and/or their organizations for additional detail.\n- Results are paginated. Use limit and page to control the result window.',
|
|
596
|
+
inputSchema: { "type": "object", "properties": { "smartQuery": { "type": "string", "description": 'Natural language search query (e.g. "marketing directors at SaaS companies in NYC")' }, "enrichPeople": { "type": "boolean", "description": "Whether to enrich each result with full contact details" }, "enrichOrganizations": { "type": "boolean", "description": "Whether to enrich each result with full company details" }, "limit": { "type": "string", "description": "Maximum number of results to return" }, "page": { "type": "string", "description": "Page number for pagination" }, "params": { "type": "object", "properties": { "personTitles": { "type": "string", "description": "Job titles to search for (comma-separated)" }, "includeSimilarTitles": { "type": "string", "description": "Whether to include similar/related job titles" }, "qKeywords": { "type": "string", "description": "Keywords to search for in person profiles" }, "personLocations": { "type": "string", "description": "Geographic locations of people (comma-separated)" }, "personSeniorities": { "type": "string", "description": "Seniority levels to filter by (comma-separated)" }, "organizationLocations": { "type": "string", "description": "Geographic locations of organizations (comma-separated)" }, "qOrganizationDomainsList": { "type": "string", "description": "Organization domains to filter by (comma-separated)" }, "contactEmailStatus": { "type": "string", "description": "Email verification status filter" }, "organizationNumEmployeesRanges": { "type": "string", "description": 'Employee count ranges as semicolon-separated pairs (e.g. "1,10; 250,500")' }, "revenueRangeMin": { "type": "string", "description": "Minimum annual revenue filter" }, "revenueRangeMax": { "type": "string", "description": "Maximum annual revenue filter" }, "currentlyUsingAllOfTechnologyUids": { "type": "string", "description": "Technology UIDs the organization must use (all required)" }, "currentlyUsingAnyOfTechnologyUids": { "type": "string", "description": "Technology UIDs the organization uses (any match)" }, "currentlyNotUsingAnyOfTechnologyUids": { "type": "string", "description": "Technology UIDs the organization must not use" } }, "required": ["personTitles", "includeSimilarTitles", "qKeywords", "personLocations", "personSeniorities", "organizationLocations", "qOrganizationDomainsList", "contactEmailStatus", "organizationNumEmployeesRanges", "revenueRangeMin", "revenueRangeMax", "currentlyUsingAllOfTechnologyUids", "currentlyUsingAnyOfTechnologyUids", "currentlyNotUsingAnyOfTechnologyUids"], "description": "Advanced search filter parameters" } }, "required": ["smartQuery", "enrichPeople", "enrichOrganizations", "limit", "page", "params"] },
|
|
597
|
+
outputSchema: { "type": "object", "properties": { "results": { "description": "Apollo search results with matched people and optionally enriched data" } }, "required": ["results"] }
|
|
598
|
+
},
|
|
599
|
+
"postToLinkedIn": {
|
|
600
|
+
stepType: "postToLinkedIn",
|
|
601
|
+
description: "Create a post on LinkedIn from the connected account.",
|
|
602
|
+
usageNotes: "- Requires a LinkedIn OAuth connection (connectionId).\n- Supports text posts, image posts, and video posts.\n- Visibility controls who can see the post.",
|
|
603
|
+
inputSchema: { "type": "object", "properties": { "message": { "type": "string", "description": "The text content of the LinkedIn post" }, "visibility": { "enum": ["PUBLIC", "CONNECTIONS"], "type": "string", "description": 'Who can see the post: "PUBLIC" or "CONNECTIONS"' }, "videoUrl": { "type": "string", "description": "URL of a video to attach to the post" }, "descriptionText": { "type": "string", "description": "Description text for link/media attachments" }, "titleText": { "type": "string", "description": "Title text for link/media attachments" }, "imageUrl": { "type": "string", "description": "URL of an image to attach to the post" }, "connectionId": { "type": "string", "description": "LinkedIn OAuth connection ID" } }, "required": ["message", "visibility"] },
|
|
604
|
+
outputSchema: { "description": "This step does not produce output data." }
|
|
605
|
+
},
|
|
606
|
+
"postToSlackChannel": {
|
|
607
|
+
stepType: "postToSlackChannel",
|
|
608
|
+
description: "Send a message to a Slack channel via a connected bot.",
|
|
609
|
+
usageNotes: "- The user is responsible for connecting their Slack workspace and selecting the channel\n- Supports both simple text messages and slack blocks messages\n- Text messages can use limited markdown (slack-only fomatting\u2014e.g., headers are just rendered as bold)",
|
|
610
|
+
inputSchema: { "type": "object", "properties": { "channelId": { "type": "string", "description": "Slack channel ID (leave empty to allow user to select a channel)" }, "messageType": { "enum": ["string", "blocks"], "type": "string", "description": 'Message format: "string" for plain text/markdown, "blocks" for Slack Block Kit JSON' }, "message": { "type": "string", "description": 'Message content (plain text/markdown for "string" type, or JSON for "blocks" type)' }, "connectionId": { "type": "string", "description": "Slack OAuth connection ID (leave empty to allow user to select)" } }, "required": ["channelId", "messageType", "message"] },
|
|
611
|
+
outputSchema: { "description": "This step does not produce output data." }
|
|
612
|
+
},
|
|
613
|
+
"postToX": {
|
|
614
|
+
stepType: "postToX",
|
|
615
|
+
description: "Create a post on X (Twitter) from the connected account.",
|
|
616
|
+
usageNotes: "- Requires an X OAuth connection (connectionId).\n- Posts are plain text. Maximum 280 characters.",
|
|
617
|
+
inputSchema: { "type": "object", "properties": { "text": { "type": "string", "description": "The text content of the post (max 280 characters)" }, "connectionId": { "type": "string", "description": "X (Twitter) OAuth connection ID" } }, "required": ["text"] },
|
|
618
|
+
outputSchema: { "description": "This step does not produce output data." }
|
|
619
|
+
},
|
|
620
|
+
"postToZapier": {
|
|
621
|
+
stepType: "postToZapier",
|
|
622
|
+
description: "Send data to a Zapier Zap via webhook and return the response.",
|
|
623
|
+
usageNotes: "- The webhook URL must be configured in the Zapier Zap settings\n- Input keys and values are sent as the JSON body of the POST request\n- The webhook response (JSON or plain text) is returned as the output",
|
|
624
|
+
inputSchema: { "type": "object", "properties": { "webhookUrl": { "type": "string", "description": "Zapier webhook URL to send data to" }, "input": { "type": "object", "description": "Key-value pairs to send as the JSON POST body" } }, "required": ["webhookUrl", "input"] },
|
|
625
|
+
outputSchema: { "type": "object", "properties": { "data": { "description": "Parsed webhook response from Zapier (JSON object, array, or string)" } }, "required": ["data"] }
|
|
626
|
+
},
|
|
627
|
+
"queryDataSource": {
|
|
628
|
+
stepType: "queryDataSource",
|
|
629
|
+
description: "Search a vector data source (RAG) and return relevant document chunks.",
|
|
630
|
+
usageNotes: "- Queries a vectorized data source and returns the most relevant chunks.\n- Useful for retrieval-augmented generation (RAG) workflows.",
|
|
631
|
+
inputSchema: { "type": "object", "properties": { "dataSourceId": { "type": "string", "description": "ID of the vector data source to query" }, "query": { "type": "string", "description": "The search query to run against the data source" }, "maxResults": { "type": "number", "description": "Maximum number of chunks to return (recommended 1-3)" } }, "required": ["dataSourceId", "query", "maxResults"] },
|
|
632
|
+
outputSchema: { "type": "object", "properties": { "text": { "type": "string", "description": "All matching chunks joined with newlines" }, "chunks": { "type": "array", "items": { "type": "string" }, "description": "Individual matching text chunks from the data source" }, "query": { "type": "string", "description": "The resolved search query that was executed" }, "citations": { "type": "array", "items": {}, "description": "Source citations for the matched chunks" }, "latencyMs": { "type": "number", "description": "Query execution time in milliseconds" } }, "required": ["text", "chunks", "query", "citations", "latencyMs"] }
|
|
633
|
+
},
|
|
634
|
+
"queryExternalDatabase": {
|
|
635
|
+
stepType: "queryExternalDatabase",
|
|
636
|
+
description: "Execute a SQL query against an external database connected to the workspace.",
|
|
637
|
+
usageNotes: "- Requires a database connection configured in the workspace.\n- Supports PostgreSQL (including Supabase), MySQL, and MSSQL.\n- Results can be returned as JSON or CSV.",
|
|
638
|
+
inputSchema: { "type": "object", "properties": { "connectionId": { "type": "string", "description": "Database connection ID configured in the workspace" }, "query": { "type": "string", "description": "SQL query to execute (supports variable interpolation)" }, "outputFormat": { "enum": ["json", "csv"], "type": "string", "description": "Output format for the result variable" } }, "required": ["query", "outputFormat"], "description": "Configuration for the external database query step" },
|
|
639
|
+
outputSchema: { "type": "object", "properties": { "data": { "description": "Query result rows (array of objects for JSON, CSV string for CSV format)" } }, "required": ["data"] }
|
|
640
|
+
},
|
|
641
|
+
"redactPII": {
|
|
642
|
+
stepType: "redactPII",
|
|
643
|
+
description: "Replace personally identifiable information in text with placeholders using Microsoft Presidio.",
|
|
644
|
+
usageNotes: '- PII is replaced with entity type placeholders (e.g. "Call me at <PHONE_NUMBER>").\n- If entities is empty, returns empty text immediately without processing.',
|
|
645
|
+
inputSchema: { "type": "object", "properties": { "input": { "type": "string", "description": "Text to redact PII from" }, "language": { "type": "string", "description": 'Language code of the input text (e.g. "en")' }, "entities": { "type": "array", "items": { "type": "string" }, "description": 'PII entity types to redact (e.g. ["PHONE_NUMBER", "EMAIL_ADDRESS"]). Empty array means nothing is redacted.' } }, "required": ["input", "language", "entities"] },
|
|
646
|
+
outputSchema: { "type": "object", "properties": { "text": { "type": "string", "description": 'The input text with detected PII replaced by entity type placeholders (e.g. "<PHONE_NUMBER>")' } }, "required": ["text"] }
|
|
647
|
+
},
|
|
648
|
+
"removeBackgroundFromImage": {
|
|
649
|
+
stepType: "removeBackgroundFromImage",
|
|
650
|
+
description: "Remove the background from an image using AI, producing a transparent PNG.",
|
|
651
|
+
usageNotes: "- Uses the Bria background removal model via fal.ai.\n- Output is re-hosted on the CDN as a PNG with transparency.",
|
|
652
|
+
inputSchema: { "type": "object", "properties": { "imageUrl": { "type": "string", "description": "URL of the source image to remove the background from" } }, "required": ["imageUrl"] },
|
|
653
|
+
outputSchema: { "type": "object", "properties": { "imageUrl": { "type": "string", "description": "CDN URL of the image with background removed (transparent PNG)" } }, "required": ["imageUrl"] }
|
|
654
|
+
},
|
|
655
|
+
"replyToGmailEmail": {
|
|
656
|
+
stepType: "replyToGmailEmail",
|
|
657
|
+
description: "Reply to an existing email in Gmail. The reply is threaded under the original message.",
|
|
658
|
+
usageNotes: '- Requires a Google OAuth connection with Gmail compose and readonly scopes.\n- The reply is sent to the original sender and threaded under the original message.\n- messageType controls the body format: "plain", "html", or "markdown".',
|
|
659
|
+
inputSchema: { "type": "object", "properties": { "messageId": { "type": "string", "description": "Gmail message ID to reply to" }, "message": { "type": "string", "description": "Reply body content" }, "messageType": { "enum": ["plain", "html", "markdown"], "type": "string", "description": 'Body format: "plain", "html", or "markdown"' }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" } }, "required": ["messageId", "message", "messageType"] },
|
|
660
|
+
outputSchema: { "type": "object", "properties": { "messageId": { "type": "string", "description": "Gmail message ID of the sent reply" } }, "required": ["messageId"] }
|
|
661
|
+
},
|
|
662
|
+
"resizeVideo": {
|
|
663
|
+
stepType: "resizeVideo",
|
|
664
|
+
description: "Resize a video file",
|
|
665
|
+
usageNotes: "",
|
|
666
|
+
inputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "URL of the source video to resize" }, "mode": { "enum": ["fit", "exact"], "type": "string", "description": "Resize mode: 'fit' scales within max dimensions, 'exact' forces exact dimensions" }, "maxWidth": { "type": "number", "description": "Maximum width in pixels (used with 'fit' mode)" }, "maxHeight": { "type": "number", "description": "Maximum height in pixels (used with 'fit' mode)" }, "width": { "type": "number", "description": "Exact width in pixels (used with 'exact' mode)" }, "height": { "type": "number", "description": "Exact height in pixels (used with 'exact' mode)" }, "strategy": { "enum": ["pad", "crop"], "type": "string", "description": "Strategy for handling aspect ratio mismatch in 'exact' mode" }, "skipAssetCreation": { "type": "boolean", "description": "When true, the result will not appear in the user's asset history. Useful for intermediate compositing steps." } }, "required": ["videoUrl", "mode"] },
|
|
667
|
+
outputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "URL of the resized video" } }, "required": ["videoUrl"] }
|
|
668
|
+
},
|
|
669
|
+
"runPackagedWorkflow": {
|
|
670
|
+
stepType: "runPackagedWorkflow",
|
|
671
|
+
description: 'Run a packaged workflow ("custom block")',
|
|
672
|
+
usageNotes: `- From the user's perspective, packaged workflows are just ordinary blocks. Behind the scenes, they operate like packages/libraries in a programming language, letting the user execute custom functionality.
|
|
673
|
+
- Some of these packaged workflows are available as part of MindStudio's "Standard Library" and available to every user.
|
|
674
|
+
- Available packaged workflows are documented here as individual blocks, but the runPackagedWorkflow block is how they need to be wrapped in order to be executed correctly.`,
|
|
675
|
+
inputSchema: { "type": "object", "properties": { "appId": { "type": "string", "description": "The app ID of the packaged workflow source" }, "workflowId": { "type": "string", "description": "The source workflow ID to execute" }, "inputVariables": { "type": "object", "description": "Variables to pass as input to the packaged workflow" }, "outputVariables": { "type": "object", "description": "Variables to capture from the packaged workflow output" }, "name": { "type": "string", "description": "Display name of the packaged workflow" } }, "required": ["appId", "workflowId", "inputVariables", "outputVariables", "name"], "description": "Configuration for the packaged workflow step" },
|
|
676
|
+
outputSchema: { "type": "object", "properties": { "data": { "description": "The result data returned from the packaged workflow" } }, "required": ["data"] }
|
|
677
|
+
},
|
|
678
|
+
"scrapeFacebookPage": {
|
|
679
|
+
stepType: "scrapeFacebookPage",
|
|
680
|
+
description: "Scrape a Facebook page",
|
|
681
|
+
usageNotes: "",
|
|
682
|
+
inputSchema: { "type": "object", "properties": { "pageUrl": { "type": "string", "description": "Full URL to the Facebook page to scrape" } }, "required": ["pageUrl"] },
|
|
683
|
+
outputSchema: { "type": "object", "properties": { "data": { "description": "The result data returned from the Apify actor run" } }, "required": ["data"] }
|
|
684
|
+
},
|
|
685
|
+
"scrapeFacebookPosts": {
|
|
686
|
+
stepType: "scrapeFacebookPosts",
|
|
687
|
+
description: "Get all the posts for a Facebook page",
|
|
688
|
+
usageNotes: "",
|
|
689
|
+
inputSchema: { "type": "object", "properties": { "pageUrl": { "type": "string", "description": "Full URL to the Facebook page to scrape posts from" } }, "required": ["pageUrl"] },
|
|
690
|
+
outputSchema: { "type": "object", "properties": { "data": { "description": "The result data returned from the Apify actor run" } }, "required": ["data"] }
|
|
691
|
+
},
|
|
692
|
+
"scrapeInstagramComments": {
|
|
693
|
+
stepType: "scrapeInstagramComments",
|
|
694
|
+
description: "Get all the comments for an Instagram post",
|
|
695
|
+
usageNotes: "",
|
|
696
|
+
inputSchema: { "type": "object", "properties": { "postUrl": { "type": "string", "description": "Full URL to the Instagram post to scrape comments from" }, "resultsLimit": { "type": "string", "description": "Maximum number of comments to return" } }, "required": ["postUrl", "resultsLimit"] },
|
|
697
|
+
outputSchema: { "type": "object", "properties": { "data": { "description": "The result data returned from the Apify actor run" } }, "required": ["data"] }
|
|
698
|
+
},
|
|
699
|
+
"scrapeInstagramMentions": {
|
|
700
|
+
stepType: "scrapeInstagramMentions",
|
|
701
|
+
description: "Scrape an Instagram profile's mentions",
|
|
702
|
+
usageNotes: "",
|
|
703
|
+
inputSchema: { "type": "object", "properties": { "profileUrl": { "type": "string", "description": "Instagram profile URL or username to scrape mentions for" }, "resultsLimit": { "type": "string", "description": "Maximum number of mentions to return" } }, "required": ["profileUrl", "resultsLimit"] },
|
|
704
|
+
outputSchema: { "type": "object", "properties": { "data": { "description": "The result data returned from the Apify actor run" } }, "required": ["data"] }
|
|
705
|
+
},
|
|
706
|
+
"scrapeInstagramPosts": {
|
|
707
|
+
stepType: "scrapeInstagramPosts",
|
|
708
|
+
description: "Get all the posts for an Instagram profile",
|
|
709
|
+
usageNotes: "",
|
|
710
|
+
inputSchema: { "type": "object", "properties": { "profileUrl": { "type": "string", "description": "Instagram profile URL or username to scrape posts from" }, "resultsLimit": { "type": "string", "description": "Maximum number of posts to return" }, "onlyPostsNewerThan": { "type": "string", "description": "Only return posts newer than this date (ISO 8601 format)" } }, "required": ["profileUrl", "resultsLimit", "onlyPostsNewerThan"] },
|
|
711
|
+
outputSchema: { "type": "object", "properties": { "data": { "description": "The result data returned from the Apify actor run" } }, "required": ["data"] }
|
|
712
|
+
},
|
|
713
|
+
"scrapeInstagramProfile": {
|
|
714
|
+
stepType: "scrapeInstagramProfile",
|
|
715
|
+
description: "Scrape an Instagram profile",
|
|
716
|
+
usageNotes: "",
|
|
717
|
+
inputSchema: { "type": "object", "properties": { "profileUrl": { "type": "string", "description": "Instagram profile URL or username to scrape" } }, "required": ["profileUrl"] },
|
|
718
|
+
outputSchema: { "type": "object", "properties": { "data": { "description": "The result data returned from the Apify actor run" } }, "required": ["data"] }
|
|
719
|
+
},
|
|
720
|
+
"scrapeInstagramReels": {
|
|
721
|
+
stepType: "scrapeInstagramReels",
|
|
722
|
+
description: "Get all the reels for an Instagram profile",
|
|
723
|
+
usageNotes: "",
|
|
724
|
+
inputSchema: { "type": "object", "properties": { "profileUrl": { "type": "string", "description": "Instagram profile URL or username to scrape reels from" }, "resultsLimit": { "type": "string", "description": "Maximum number of reels to return" } }, "required": ["profileUrl", "resultsLimit"] },
|
|
725
|
+
outputSchema: { "type": "object", "properties": { "data": { "description": "The result data returned from the Apify actor run" } }, "required": ["data"] }
|
|
726
|
+
},
|
|
727
|
+
"scrapeLinkedInCompany": {
|
|
728
|
+
stepType: "scrapeLinkedInCompany",
|
|
729
|
+
description: "Scrape public company data from a LinkedIn company page.",
|
|
730
|
+
usageNotes: "- Requires a LinkedIn company URL (e.g. https://www.linkedin.com/company/mindstudioai).\n- Returns structured company data including description, employees, updates, and similar companies.",
|
|
731
|
+
inputSchema: { "type": "object", "properties": { "url": { "type": "string", "description": "LinkedIn company page URL (e.g. https://www.linkedin.com/company/mindstudioai)" } }, "required": ["url"] },
|
|
732
|
+
outputSchema: { "type": "object", "properties": { "company": { "description": "Scraped LinkedIn company data" } }, "required": ["company"] }
|
|
733
|
+
},
|
|
734
|
+
"scrapeLinkedInProfile": {
|
|
735
|
+
stepType: "scrapeLinkedInProfile",
|
|
736
|
+
description: "Scrape public profile data from a LinkedIn profile page.",
|
|
737
|
+
usageNotes: "- Requires a LinkedIn profile URL (e.g. https://www.linkedin.com/in/username).\n- Returns structured profile data including experience, education, articles, and activities.",
|
|
738
|
+
inputSchema: { "type": "object", "properties": { "url": { "type": "string", "description": "LinkedIn profile URL (e.g. https://www.linkedin.com/in/username)" } }, "required": ["url"] },
|
|
739
|
+
outputSchema: { "type": "object", "properties": { "profile": { "description": "Scraped LinkedIn profile data" } }, "required": ["profile"] }
|
|
740
|
+
},
|
|
741
|
+
"scrapeMetaThreadsProfile": {
|
|
742
|
+
stepType: "scrapeMetaThreadsProfile",
|
|
743
|
+
description: "Scrape a Meta Threads profile",
|
|
744
|
+
usageNotes: "",
|
|
745
|
+
inputSchema: { "type": "object", "properties": { "profileUrl": { "type": "string", "description": "Meta Threads profile URL or username to scrape" } }, "required": ["profileUrl"] },
|
|
746
|
+
outputSchema: { "type": "object", "properties": { "data": { "description": "The result data returned from the Apify actor run" } }, "required": ["data"] }
|
|
747
|
+
},
|
|
748
|
+
"scrapeUrl": {
|
|
749
|
+
stepType: "scrapeUrl",
|
|
750
|
+
description: "Extract text, HTML, or structured content from one or more web pages.",
|
|
751
|
+
usageNotes: '- Accepts a single URL or multiple URLs (as a JSON array, comma-separated, or newline-separated).\n- Output format controls the result shape: "text" returns markdown, "html" returns raw HTML, "json" returns structured scraper data.\n- Can optionally capture a screenshot of each page.',
|
|
752
|
+
inputSchema: { "type": "object", "properties": { "url": { "type": "string", "description": "URL(s) to scrape. Accepts a single URL, JSON array, or comma/newline-separated list" }, "service": { "enum": ["default", "firecrawl"], "type": "string", "description": "Scraping service to use" }, "autoEnhance": { "type": "boolean", "description": "Whether to enable enhanced scraping for social media URLs (e.g. Twitter, LinkedIn)" }, "pageOptions": { "type": "object", "properties": { "onlyMainContent": { "type": "boolean", "description": "Whether to extract only the main content of the page, excluding navigation, footers, etc." }, "screenshot": { "type": "boolean", "description": "Whether to capture a screenshot of the page" }, "waitFor": { "type": "number", "description": "Milliseconds to wait before scraping (0 for immediate)" }, "replaceAllPathsWithAbsolutePaths": { "type": "boolean", "description": "Whether to convert relative URLs to absolute URLs in the result" }, "headers": { "type": "object", "description": "Custom HTTP request headers as key-value pairs" }, "removeTags": { "type": "array", "items": { "type": "string" }, "description": "HTML tags to remove from the scraped result" }, "mobile": { "type": "boolean", "description": "Whether to scrape using a mobile user-agent" } }, "required": ["onlyMainContent", "screenshot", "waitFor", "replaceAllPathsWithAbsolutePaths", "headers", "removeTags", "mobile"], "description": "Page-level scraping options (content filtering, screenshots, headers, etc.)" } }, "required": ["url"] },
|
|
753
|
+
outputSchema: { "type": "object", "properties": { "content": { "anyOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }, { "type": "object", "properties": { "text": { "type": "string", "description": "Markdown/plain-text content of the scraped page" }, "html": { "type": "string", "description": "Raw HTML content of the scraped page" }, "json": { "type": "object", "description": "Structured data extracted from the page" }, "screenshotUrl": { "type": "string", "description": "Screenshot URL of the page (if requested)" }, "metadata": { "type": "object", "properties": { "title": { "type": "string", "description": "Page title" }, "description": { "type": "string", "description": "Page meta description" }, "url": { "type": "string", "description": "Canonical URL" }, "image": { "type": "string", "description": "Open Graph image URL" } }, "required": ["title", "description", "url", "image"], "description": "Page metadata (Open Graph / meta tags)" } }, "required": ["text", "html"] }, { "type": "array", "items": { "type": "object", "properties": { "text": { "type": "string", "description": "Markdown/plain-text content of the scraped page" }, "html": { "type": "string", "description": "Raw HTML content of the scraped page" }, "json": { "type": "object", "description": "Structured data extracted from the page" }, "screenshotUrl": { "type": "string", "description": "Screenshot URL of the page (if requested)" }, "metadata": { "type": "object", "properties": { "title": { "type": "string", "description": "Page title" }, "description": { "type": "string", "description": "Page meta description" }, "url": { "type": "string", "description": "Canonical URL" }, "image": { "type": "string", "description": "Open Graph image URL" } }, "required": ["title", "description", "url", "image"], "description": "Page metadata (Open Graph / meta tags)" } }, "required": ["text", "html"] } }] }, "screenshot": { "type": "string", "description": "Screenshot URL, only present when screenshot was requested via pageOptions" } }, "required": ["content"] }
|
|
754
|
+
},
|
|
755
|
+
"scrapeXPost": {
|
|
756
|
+
stepType: "scrapeXPost",
|
|
757
|
+
description: "Scrape data from a single X (Twitter) post by URL.",
|
|
758
|
+
usageNotes: "- Returns structured post data (text, html, optional json/screenshot/metadata).\n- Optionally saves the text content to a variable.",
|
|
759
|
+
inputSchema: { "type": "object", "properties": { "url": { "type": "string", "description": "Full URL to the X post (e.g. https://x.com/elonmusk/status/1655608985058267139)" } }, "required": ["url"] },
|
|
760
|
+
outputSchema: { "type": "object", "properties": { "post": { "type": "object", "properties": { "text": { "type": "string", "description": "Markdown/plain-text content of the scraped page" }, "html": { "type": "string", "description": "Raw HTML content of the scraped page" }, "json": { "type": "object", "description": "Structured data extracted from the page" }, "screenshotUrl": { "type": "string", "description": "Screenshot URL of the page (if requested)" }, "metadata": { "type": "object", "properties": { "title": { "type": "string", "description": "Page title" }, "description": { "type": "string", "description": "Page meta description" }, "url": { "type": "string", "description": "Canonical URL" }, "image": { "type": "string", "description": "Open Graph image URL" } }, "required": ["title", "description", "url", "image"], "description": "Page metadata (Open Graph / meta tags)" } }, "required": ["text", "html"], "description": "Scraped post data including text, HTML, and optional structured JSON" } }, "required": ["post"] }
|
|
761
|
+
},
|
|
762
|
+
"scrapeXProfile": {
|
|
763
|
+
stepType: "scrapeXProfile",
|
|
764
|
+
description: "Scrape public profile data from an X (Twitter) account by URL.",
|
|
765
|
+
usageNotes: "- Returns structured profile data.\n- Optionally saves the result to a variable.",
|
|
766
|
+
inputSchema: { "type": "object", "properties": { "url": { "type": "string", "description": "Full URL or username for the X profile (e.g. https://x.com/elonmusk)" } }, "required": ["url"] },
|
|
767
|
+
outputSchema: { "type": "object", "properties": { "profile": { "type": "object", "properties": { "text": { "type": "string", "description": "Markdown/plain-text content of the scraped page" }, "html": { "type": "string", "description": "Raw HTML content of the scraped page" }, "json": { "type": "object", "description": "Structured data extracted from the page" }, "screenshotUrl": { "type": "string", "description": "Screenshot URL of the page (if requested)" }, "metadata": { "type": "object", "properties": { "title": { "type": "string", "description": "Page title" }, "description": { "type": "string", "description": "Page meta description" }, "url": { "type": "string", "description": "Canonical URL" }, "image": { "type": "string", "description": "Open Graph image URL" } }, "required": ["title", "description", "url", "image"], "description": "Page metadata (Open Graph / meta tags)" } }, "required": ["text", "html"], "description": "Scraped profile data including text, HTML, and optional structured JSON" } }, "required": ["profile"] }
|
|
768
|
+
},
|
|
769
|
+
"searchGoogle": {
|
|
770
|
+
stepType: "searchGoogle",
|
|
771
|
+
description: "Search the web using Google and return structured results.",
|
|
772
|
+
usageNotes: "- Defaults to us/english, but can optionally specify country and/or language.\n- Defaults to any time, but can optionally specify last hour, last day, week, month, or year.\n- Defaults to top 30 results, but can specify 1 to 100 results to return.",
|
|
773
|
+
inputSchema: { "type": "object", "properties": { "query": { "type": "string", "description": "The search query to send to Google" }, "exportType": { "enum": ["text", "json"], "type": "string", "description": 'Format for the variable value: "text" or "json"' }, "countryCode": { "type": "string", "description": "Google gl country code (defaults to US)" }, "languageCode": { "type": "string", "description": 'Google hl language code (defaults to "en")' }, "dateRange": { "enum": ["hour", "day", "week", "month", "year", "any"], "type": "string", "description": 'Time range filter: "hour", "day", "week", "month", "year", or "any"' }, "numResults": { "type": "number", "description": "Number of results to return (1-100, default: 30)" } }, "required": ["query", "exportType"] },
|
|
774
|
+
outputSchema: { "type": "object", "properties": { "results": { "type": "array", "items": { "type": "object", "properties": { "title": { "type": "string", "description": "Title of the search result" }, "description": { "type": "string", "description": "Snippet/description of the search result" }, "url": { "type": "string", "description": "URL of the search result page" } }, "required": ["title", "description", "url"] }, "description": "List of search result entries" } }, "required": ["results"] }
|
|
775
|
+
},
|
|
776
|
+
"searchGoogleCalendarEvents": {
|
|
777
|
+
stepType: "searchGoogleCalendarEvents",
|
|
778
|
+
description: "Search for events in a Google Calendar by keyword, date range, or both.",
|
|
779
|
+
usageNotes: '- Requires a Google OAuth connection with Calendar events scope.\n- Supports keyword search via "query" and date filtering via "timeMin"/"timeMax" (ISO 8601 format).\n- Unlike "List Events" which only shows future events, this allows searching past events too.',
|
|
780
|
+
inputSchema: { "type": "object", "properties": { "query": { "type": "string", "description": "Text search term" }, "timeMin": { "type": "string", "description": "Start of time range (ISO 8601)" }, "timeMax": { "type": "string", "description": "End of time range (ISO 8601)" }, "calendarId": { "type": "string", "description": 'Calendar ID (defaults to "primary")' }, "limit": { "type": "number", "description": "Maximum number of events to return (default: 10)" }, "exportType": { "enum": ["json", "text"], "type": "string", "description": 'Format for the variable output: "json" or "text"' }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" } }, "required": ["exportType"] },
|
|
781
|
+
outputSchema: { "type": "object", "properties": { "events": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "Google Calendar event ID" }, "status": { "type": "string", "description": 'Event status (e.g. "confirmed", "tentative", "cancelled")' }, "htmlLink": { "type": "string", "description": "URL to view the event in Google Calendar" }, "created": { "type": "string", "description": "Timestamp when the event was created" }, "updated": { "type": "string", "description": "Timestamp when the event was last updated" }, "summary": { "type": "string", "description": "Event title" }, "description": { "type": "string", "description": "Event description" }, "location": { "type": "string", "description": "Event location" }, "organizer": { "anyOf": [{ "type": "object", "properties": { "displayName": { "type": "string" }, "email": { "type": "string" } } }, { "type": "null" }] }, "start": { "anyOf": [{ "type": "object", "properties": { "dateTime": { "type": "string" }, "timeZone": { "type": "string" } } }, { "type": "null" }] }, "end": { "anyOf": [{ "type": "object", "properties": { "dateTime": { "type": "string" }, "timeZone": { "type": "string" } } }, { "type": "null" }] }, "attendees": { "anyOf": [{ "type": "array", "items": { "type": "object", "properties": { "displayName": { "type": "string" }, "email": { "type": "string" }, "responseStatus": { "type": "string" } } } }, { "type": "null" }] } } }, "description": "List of matching calendar events" } }, "required": ["events"] }
|
|
782
|
+
},
|
|
783
|
+
"searchGoogleDrive": {
|
|
784
|
+
stepType: "searchGoogleDrive",
|
|
785
|
+
description: "Search for files in Google Drive by keyword.",
|
|
786
|
+
usageNotes: "- Requires a Google OAuth connection with Drive scope.\n- Searches file content and names using Google Drive's fullText search.",
|
|
787
|
+
inputSchema: { "type": "object", "properties": { "query": { "type": "string", "description": "Search keyword" }, "limit": { "type": "number", "description": "Max files to return (default: 20)" }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" }, "exportType": { "enum": ["json", "text"], "type": "string", "description": 'Format for the variable output: "json" or "text"' } }, "required": ["query", "exportType"] },
|
|
788
|
+
outputSchema: { "type": "object", "properties": { "files": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "mimeType": { "type": "string" }, "size": { "type": "string" }, "webViewLink": { "type": "string" }, "createdTime": { "type": "string" }, "modifiedTime": { "type": "string" } }, "required": ["id", "name", "mimeType", "size", "webViewLink", "createdTime", "modifiedTime"] }, "description": "List of matching files" } }, "required": ["files"] }
|
|
789
|
+
},
|
|
790
|
+
"searchGoogleImages": {
|
|
791
|
+
stepType: "searchGoogleImages",
|
|
792
|
+
description: "Search Google Images and return image results with URLs and metadata.",
|
|
793
|
+
usageNotes: "- Defaults to us/english, but can optionally specify country and/or language.\n- Defaults to any time, but can optionally specify last hour, last day, week, month, or year.\n- Defaults to top 30 results, but can specify 1 to 100 results to return.",
|
|
794
|
+
inputSchema: { "type": "object", "properties": { "query": { "type": "string", "description": "The image search query" }, "exportType": { "enum": ["text", "json"], "type": "string", "description": 'Format for the variable value: "text" or "json"' }, "countryCode": { "type": "string", "description": "Google gl country code (defaults to US)" }, "languageCode": { "type": "string", "description": 'Google hl language code (defaults to "en")' }, "dateRange": { "enum": ["hour", "day", "week", "month", "year", "any"], "type": "string", "description": 'Time range filter: "hour", "day", "week", "month", "year", or "any"' }, "numResults": { "type": "number", "description": "Number of results to return (1-100, default: 30)" } }, "required": ["query", "exportType"] },
|
|
795
|
+
outputSchema: { "type": "object", "properties": { "images": { "type": "array", "items": { "type": "object", "properties": { "title": { "type": "string", "description": "Title/alt text of the image" }, "imageUrl": { "type": "string", "description": "Direct URL of the full-size image" }, "imageWidth": { "type": "number", "description": "Width of the full-size image in pixels" }, "imageHeight": { "type": "number", "description": "Height of the full-size image in pixels" }, "thumbnailUrl": { "type": "string", "description": "URL of the thumbnail image" }, "thumbnailWidth": { "type": "number", "description": "Width of the thumbnail in pixels" }, "thumbnailHeight": { "type": "number", "description": "Height of the thumbnail in pixels" }, "source": { "type": "string", "description": "Source website name" }, "domain": { "type": "string", "description": "Domain of the source website" }, "link": { "type": "string", "description": "URL of the page containing the image" }, "googleUrl": { "type": "string", "description": "Google Images URL for this result" }, "position": { "type": "number", "description": "Position/rank of this result in the search results" } }, "required": ["title", "imageUrl", "imageWidth", "imageHeight", "thumbnailUrl", "thumbnailWidth", "thumbnailHeight", "source", "domain", "link", "googleUrl", "position"] }, "description": "List of image search results with URLs and metadata" } }, "required": ["images"] }
|
|
796
|
+
},
|
|
797
|
+
"searchGoogleNews": {
|
|
798
|
+
stepType: "searchGoogleNews",
|
|
799
|
+
description: "Search Google News for recent news articles matching a query.",
|
|
800
|
+
usageNotes: "- Defaults to top 30 results, but can specify 1 to 100 results to return.",
|
|
801
|
+
inputSchema: { "type": "object", "properties": { "text": { "type": "string", "description": "The news search query" }, "exportType": { "enum": ["text", "json"], "type": "string", "description": 'Format for the variable value: "text" or "json"' }, "numResults": { "type": "number", "description": "Number of results to return (1-100, default: 30)" } }, "required": ["text", "exportType"] },
|
|
802
|
+
outputSchema: { "type": "object", "properties": { "articles": { "type": "array", "items": { "type": "object", "properties": { "title": { "type": "string", "description": "Headline of the news article" }, "link": { "type": "string", "description": "URL to the full article" }, "date": { "type": "string", "description": "Publication date of the article" }, "source": { "type": "object", "properties": { "name": { "type": "string", "description": "Name of the news source" } }, "required": ["name"], "description": "Source publication" }, "snippet": { "type": "string", "description": "Brief excerpt or summary of the article" } }, "required": ["title", "link", "date", "source"] }, "description": "List of matching news articles" } }, "required": ["articles"] }
|
|
803
|
+
},
|
|
804
|
+
"searchGoogleTrends": {
|
|
805
|
+
stepType: "searchGoogleTrends",
|
|
806
|
+
description: "Fetch Google Trends data for a search term.",
|
|
807
|
+
usageNotes: '- date accepts shorthand ("now 1-H", "today 1-m", "today 5-y", etc.) or custom "yyyy-mm-dd yyyy-mm-dd" ranges.\n- data_type controls the shape of returned data: TIMESERIES, GEO_MAP, GEO_MAP_0, RELATED_TOPICS, or RELATED_QUERIES.',
|
|
808
|
+
inputSchema: { "type": "object", "properties": { "text": { "type": "string", "description": "The search term to look up on Google Trends" }, "hl": { "type": "string", "description": 'Language code (e.g. "en")' }, "geo": { "type": "string", "description": "Geographic region: empty string for worldwide, or a two-letter country code" }, "data_type": { "enum": ["TIMESERIES", "GEO_MAP", "GEO_MAP_0", "RELATED_TOPICS", "RELATED_QUERIES"], "type": "string", "description": "Type of trend data to return" }, "cat": { "type": "string", "description": 'Category filter ("0" for all categories)' }, "date": { "type": "string", "description": 'Date range for trend data. Available options: - "now 1-H" - Past hour - "now 4-H" - Past 4 hours - "now 1-d" - Past day - "now 7-d" - Past 7 days - "today 1-m" - Past 30 days - "today 3-m" - Past 90 days - "today 12-m" - Past 12 months - "today 5-y" - Past 5 years - "all - 2004" - present - You can also pass custom values: "yyyy-mm-dd yyyy-mm-dd"' }, "ts": { "type": "string", "description": "Timezone offset in minutes (-1439 to 1439, default: 420 for PDT)" } }, "required": ["text", "hl", "geo", "data_type", "cat", "date", "ts"] },
|
|
809
|
+
outputSchema: { "type": "object", "properties": { "trends": { "type": "object", "description": "Google Trends data for the searched term" } }, "required": ["trends"] }
|
|
810
|
+
},
|
|
811
|
+
"searchPerplexity": {
|
|
812
|
+
stepType: "searchPerplexity",
|
|
813
|
+
description: "Search the web using the Perplexity API and return structured results.",
|
|
814
|
+
usageNotes: "- Defaults to US results. Use countryCode (ISO code) to filter by country.\n- Returns 10 results by default, configurable from 1 to 20.\n- The variable receives text or JSON depending on exportType. The direct execution output always returns structured results.",
|
|
815
|
+
inputSchema: { "type": "object", "properties": { "query": { "type": "string", "description": "Search query to send to Perplexity" }, "exportType": { "enum": ["text", "json"], "type": "string", "description": "Output format for the variable: plain text or structured JSON" }, "countryCode": { "type": "string", "description": 'ISO country code to filter results by region (e.g. "us", "gb")' }, "numResults": { "type": "number", "description": "Number of results to return (1-20, default: 10)" } }, "required": ["query", "exportType"] },
|
|
816
|
+
outputSchema: { "type": "object", "properties": { "results": { "type": "array", "items": { "type": "object", "properties": { "title": { "type": "string", "description": "Page title of the search result" }, "description": { "type": "string", "description": "Snippet or description of the search result" }, "url": { "type": "string", "description": "URL of the search result page" } }, "required": ["title", "description", "url"] }, "description": "List of structured search results" } }, "required": ["results"] }
|
|
817
|
+
},
|
|
818
|
+
"searchXPosts": {
|
|
819
|
+
stepType: "searchXPosts",
|
|
820
|
+
description: "Search recent X (Twitter) posts matching a query.",
|
|
821
|
+
usageNotes: "- Searches only the past 7 days of posts.\n- Query supports X API v2 search operators (up to 512 characters).\n\nAvailable search operators in query:\n\n| Operator | Description |\n| -----------------| -------------------------------------------------|\n| from: | Posts from a specific user (e.g., from:elonmusk) |\n| to: | Posts sent to a specific user (e.g., to:NASA) |\n| @ | Mentions a user (e.g., @openai) |\n| # | Hashtag search (e.g., #AI) |\n| is:retweet | Filters retweets |\n| is:reply | Filters replies |\n| has:media | Posts containing media (images, videos, or GIFs) |\n| has:links | Posts containing URLs |\n| lang: | Filters by language (e.g., lang:en) |\n| - | Excludes specific terms (e.g., -spam) |\n| () | Groups terms or operators (e.g., (AI OR ML)) |\n| AND, OR, NOT | Boolean logic for combining or excluding terms |\n\nConjunction-Required Operators (must be combined with a standalone operator):\n\n| Operator | Description |\n| ------------ | -----------------------------------------------|\n| has:media | Posts containing media (images, videos, or GIFs) |\n| has:links | Posts containing URLs |\n| is:retweet | Filters retweets |\n| is:reply | Filters replies |\n\nFor example, has:media alone is invalid, but #AI has:media is valid.",
|
|
822
|
+
inputSchema: { "type": "object", "properties": { "query": { "type": "string", "description": "Search query (max 512 chars, supports X API v2 search operators)" }, "scope": { "enum": ["recent", "all"], "type": "string", "description": 'Search scope: "recent" for past 7 days or "all" for full archive' }, "options": { "type": "object", "properties": { "startTime": { "type": "string", "description": "ISO 8601 date; only return posts after this time" }, "endTime": { "type": "string", "description": "ISO 8601 date; only return posts before this time" }, "maxResults": { "type": "number", "description": "Number of results to return (default: 50, max: 100)" } }, "description": "Additional search options" } }, "required": ["query", "scope", "options"] },
|
|
823
|
+
outputSchema: { "type": "object", "properties": { "posts": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique post identifier" }, "authorId": { "type": "string", "description": "Author's X user ID" }, "dateCreated": { "type": "string", "description": "ISO 8601 timestamp when the post was created" }, "text": { "type": "string", "description": "Text content of the post" }, "stats": { "type": "object", "properties": { "retweets": { "type": "number", "description": "Number of retweets/reposts" }, "replies": { "type": "number", "description": "Number of replies" }, "likes": { "type": "number", "description": "Number of likes" } }, "required": ["retweets", "replies", "likes"], "description": "Engagement statistics for the post" } }, "required": ["id", "authorId", "dateCreated", "text", "stats"] }, "description": "List of matching X posts" } }, "required": ["posts"] }
|
|
824
|
+
},
|
|
825
|
+
"searchYoutube": {
|
|
826
|
+
stepType: "searchYoutube",
|
|
827
|
+
description: "Search for YouTube videos by keyword.",
|
|
828
|
+
usageNotes: "- Supports pagination (up to 5 pages) and country/language filters.\n- Use the filter/filterType fields for YouTube search parameter (sp) filters.",
|
|
829
|
+
inputSchema: { "type": "object", "properties": { "query": { "type": "string", "description": "Search query for YouTube videos" }, "limitPages": { "type": "string", "description": "Maximum number of pages to fetch (1-5)" }, "filter": { "type": "string", "description": "YouTube search parameter (sp) filter value" }, "filterType": { "type": "string", "description": "Filter type identifier" }, "countryCode": { "type": "string", "description": 'Google gl country code for regional results (default: "US")' }, "languageCode": { "type": "string", "description": 'Google hl language code for result language (default: "en")' } }, "required": ["query", "limitPages", "filter", "filterType"] },
|
|
830
|
+
outputSchema: { "type": "object", "properties": { "results": { "type": "object", "description": "YouTube search results including video_results, channel_results, etc." } }, "required": ["results"] }
|
|
831
|
+
},
|
|
832
|
+
"searchYoutubeTrends": {
|
|
833
|
+
stepType: "searchYoutubeTrends",
|
|
834
|
+
description: "Retrieve trending videos on YouTube by category and region.",
|
|
835
|
+
usageNotes: '- Categories: "now" (trending now), "music", "gaming", "films".\n- Supports country and language filtering.',
|
|
836
|
+
inputSchema: { "type": "object", "properties": { "bp": { "enum": ["now", "music", "gaming", "films"], "type": "string", "description": 'Trending category: "now" (trending now), "music", "gaming", or "films"' }, "hl": { "type": "string", "description": 'Language code (e.g. "en")' }, "gl": { "type": "string", "description": 'Country code (e.g. "US")' } }, "required": ["bp", "hl", "gl"] },
|
|
837
|
+
outputSchema: { "type": "object", "properties": { "trends": { "type": "object", "description": "Trending video data for the selected category and region" } }, "required": ["trends"] }
|
|
838
|
+
},
|
|
839
|
+
"sendEmail": {
|
|
840
|
+
stepType: "sendEmail",
|
|
841
|
+
description: "Send an email to one or more configured recipient addresses.",
|
|
842
|
+
usageNotes: '- Recipient email addresses are resolved from OAuth connections configured by the app creator. The user running the workflow does not specify the recipient directly.\n- If the body is a URL to a hosted HTML file on the CDN, the HTML is fetched and used as the email body.\n- When generateHtml is enabled, the body text is converted to a styled HTML email using an AI model.\n- connectionId can be a comma-separated list to send to multiple recipients.\n- The special connectionId "trigger_email" uses the email address that triggered the workflow.',
|
|
843
|
+
inputSchema: { "type": "object", "properties": { "subject": { "type": "string", "description": "Email subject line" }, "body": { "type": "string", "description": "Email body content (plain text, markdown, HTML, or a CDN URL to an HTML file)" }, "connectionId": { "type": "string", "description": "OAuth connection ID(s) for the recipient(s), comma-separated for multiple" }, "generateHtml": { "type": "boolean", "description": "When true, auto-convert the body text into a styled HTML email using AI" }, "generateHtmlInstructions": { "type": "string", "description": "Natural language instructions for the HTML generation style" }, "generateHtmlModelOverride": { "type": "object", "properties": { "model": { "type": "string", "description": 'Model identifier (e.g. "gpt-4", "claude-3-opus")' }, "temperature": { "type": "number", "description": "Sampling temperature for the model (0-2)" }, "maxResponseTokens": { "type": "number", "description": "Maximum number of tokens in the model's response" }, "ignorePreamble": { "type": "boolean", "description": "Whether to skip the system preamble/instructions" }, "userMessagePreprocessor": { "type": "object", "properties": { "dataSource": { "type": "string", "description": "Data source identifier for the preprocessor" }, "messageTemplate": { "type": "string", "description": "Template string applied to user messages before sending to the model" }, "maxResults": { "type": "number", "description": "Maximum number of results to include from the data source" }, "enabled": { "type": "boolean", "description": "Whether the preprocessor is active" }, "shouldInherit": { "type": "boolean", "description": "Whether child steps should inherit this preprocessor configuration" } }, "description": "Preprocessor applied to user messages before sending to the model" }, "preamble": { "type": "string", "description": "System preamble/instructions for the model" }, "multiModelEnabled": { "type": "boolean", "description": "Whether multi-model candidate generation is enabled" }, "editResponseEnabled": { "type": "boolean", "description": "Whether the user can edit the model's response" }, "config": { "type": "object", "description": "Additional model-specific configuration" } }, "required": ["model", "temperature", "maxResponseTokens"], "description": "Model settings override for HTML generation" }, "attachments": { "type": "array", "items": { "type": "string" }, "description": "URLs of files to attach to the email" } }, "required": ["subject", "body"] },
|
|
844
|
+
outputSchema: { "type": "object", "properties": { "recipients": { "type": "array", "items": { "type": "string" }, "description": "Email addresses the message was sent to" } }, "required": ["recipients"] }
|
|
845
|
+
},
|
|
846
|
+
"sendSMS": {
|
|
847
|
+
stepType: "sendSMS",
|
|
848
|
+
description: "Send an SMS text message to a phone number configured via OAuth connection.",
|
|
849
|
+
usageNotes: "- User is responsible for configuring the connection to the number (MindStudio requires double opt-in to prevent spam)",
|
|
850
|
+
inputSchema: { "type": "object", "properties": { "body": { "type": "string", "description": "SMS message body text" }, "connectionId": { "type": "string", "description": "OAuth connection ID for the recipient phone number" } }, "required": ["body"] },
|
|
851
|
+
outputSchema: { "description": "This step does not produce output data." }
|
|
852
|
+
},
|
|
853
|
+
"setRunTitle": {
|
|
854
|
+
stepType: "setRunTitle",
|
|
855
|
+
description: "Set the title of the agent run for the user's history",
|
|
856
|
+
usageNotes: "",
|
|
857
|
+
inputSchema: { "type": "object", "properties": { "title": { "type": "string", "description": "The title to assign to the agent run (supports variable interpolation)" } }, "required": ["title"], "description": "Configuration for the set run title step" },
|
|
858
|
+
outputSchema: { "description": "This step does not produce output data." }
|
|
859
|
+
},
|
|
860
|
+
"setVariable": {
|
|
861
|
+
stepType: "setVariable",
|
|
862
|
+
description: "Explicitly set a variable to a given value.",
|
|
863
|
+
usageNotes: "- Useful for bootstrapping global variables or setting constants.\n- The variable name and value both support variable interpolation.\n- The type field is a UI hint only (controls input widget in the editor).",
|
|
864
|
+
inputSchema: { "type": "object", "properties": { "value": { "anyOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }] } }, "required": ["value"], "description": "Configuration for the set variable step" },
|
|
865
|
+
outputSchema: { "type": "object" }
|
|
866
|
+
},
|
|
867
|
+
"telegramSendAudio": {
|
|
868
|
+
stepType: "telegramSendAudio",
|
|
869
|
+
description: "Send an audio file to a Telegram chat as music or a voice note via a bot.",
|
|
870
|
+
usageNotes: '- "audio" mode sends as a standard audio file. "voice" mode sends as a voice message (re-uploads the file for large file support).',
|
|
871
|
+
inputSchema: { "type": "object", "properties": { "botToken": { "type": "string", "description": 'Telegram bot token in "botId:token" format' }, "chatId": { "type": "string", "description": "Telegram chat ID to send the audio to" }, "audioUrl": { "type": "string", "description": "URL of the audio file to send" }, "mode": { "enum": ["audio", "voice"], "type": "string", "description": 'Send as a standard audio track ("audio") or as a voice note ("voice")' }, "caption": { "type": "string", "description": "Optional caption text for the audio" } }, "required": ["botToken", "chatId", "audioUrl", "mode"] },
|
|
872
|
+
outputSchema: { "description": "This step does not produce output data." }
|
|
873
|
+
},
|
|
874
|
+
"telegramSendFile": {
|
|
875
|
+
stepType: "telegramSendFile",
|
|
876
|
+
description: "Send a document/file to a Telegram chat via a bot.",
|
|
877
|
+
usageNotes: "",
|
|
878
|
+
inputSchema: { "type": "object", "properties": { "botToken": { "type": "string", "description": 'Telegram bot token in "botId:token" format' }, "chatId": { "type": "string", "description": "Telegram chat ID to send the file to" }, "fileUrl": { "type": "string", "description": "URL of the document/file to send" }, "caption": { "type": "string", "description": "Optional caption text for the file" } }, "required": ["botToken", "chatId", "fileUrl"] },
|
|
879
|
+
outputSchema: { "description": "This step does not produce output data." }
|
|
880
|
+
},
|
|
881
|
+
"telegramSendImage": {
|
|
882
|
+
stepType: "telegramSendImage",
|
|
883
|
+
description: "Send an image to a Telegram chat via a bot.",
|
|
884
|
+
usageNotes: "",
|
|
885
|
+
inputSchema: { "type": "object", "properties": { "botToken": { "type": "string", "description": 'Telegram bot token in "botId:token" format' }, "chatId": { "type": "string", "description": "Telegram chat ID to send the image to" }, "imageUrl": { "type": "string", "description": "URL of the image to send" }, "caption": { "type": "string", "description": "Optional caption text for the image" } }, "required": ["botToken", "chatId", "imageUrl"] },
|
|
886
|
+
outputSchema: { "description": "This step does not produce output data." }
|
|
887
|
+
},
|
|
888
|
+
"telegramSendMessage": {
|
|
889
|
+
stepType: "telegramSendMessage",
|
|
890
|
+
description: "Send a text message to a Telegram chat via a bot.",
|
|
891
|
+
usageNotes: '- Messages are sent using MarkdownV2 formatting. Special characters are auto-escaped.\n- botToken format is "botId:token" \u2014 both parts are required.',
|
|
892
|
+
inputSchema: { "type": "object", "properties": { "botToken": { "type": "string", "description": 'Telegram bot token in "botId:token" format' }, "chatId": { "type": "string", "description": "Telegram chat ID to send the message to" }, "text": { "type": "string", "description": "Message text to send (MarkdownV2 formatting supported)" } }, "required": ["botToken", "chatId", "text"] },
|
|
893
|
+
outputSchema: { "description": "This step does not produce output data." }
|
|
894
|
+
},
|
|
895
|
+
"telegramSendVideo": {
|
|
896
|
+
stepType: "telegramSendVideo",
|
|
897
|
+
description: "Send a video to a Telegram chat via a bot.",
|
|
898
|
+
usageNotes: "",
|
|
899
|
+
inputSchema: { "type": "object", "properties": { "botToken": { "type": "string", "description": 'Telegram bot token in "botId:token" format' }, "chatId": { "type": "string", "description": "Telegram chat ID to send the video to" }, "videoUrl": { "type": "string", "description": "URL of the video to send" }, "caption": { "type": "string", "description": "Optional caption text for the video" } }, "required": ["botToken", "chatId", "videoUrl"] },
|
|
900
|
+
outputSchema: { "description": "This step does not produce output data." }
|
|
901
|
+
},
|
|
902
|
+
"telegramSetTyping": {
|
|
903
|
+
stepType: "telegramSetTyping",
|
|
904
|
+
description: 'Show the "typing..." indicator in a Telegram chat via a bot.',
|
|
905
|
+
usageNotes: "- The typing indicator automatically expires after a few seconds. Use this right before sending a message for a natural feel.",
|
|
906
|
+
inputSchema: { "type": "object", "properties": { "botToken": { "type": "string", "description": 'Telegram bot token in "botId:token" format' }, "chatId": { "type": "string", "description": "Telegram chat ID to show the typing indicator in" } }, "required": ["botToken", "chatId"] },
|
|
907
|
+
outputSchema: { "description": "This step does not produce output data." }
|
|
908
|
+
},
|
|
909
|
+
"textToSpeech": {
|
|
910
|
+
stepType: "textToSpeech",
|
|
911
|
+
description: "Generate an audio file from provided text using a speech model.",
|
|
912
|
+
usageNotes: "- The text field contains the exact words to be spoken (not instructions).\n- In foreground mode, the audio is displayed to the user. In background mode, the URL is saved to a variable.",
|
|
913
|
+
inputSchema: { "type": "object", "properties": { "text": { "type": "string", "description": "The text to convert to speech" }, "skipAssetCreation": { "type": "boolean" }, "speechModelOverride": { "type": "object", "properties": { "model": { "type": "string", "description": "Speech synthesis model identifier" }, "config": { "type": "object", "description": "Additional model-specific configuration" } }, "required": ["model"], "description": "Optional model configuration override. Uses the workflow's default speech model if not specified" } }, "required": ["text"] },
|
|
914
|
+
outputSchema: { "type": "object", "properties": { "audioUrl": { "type": "string", "description": "URL of the generated audio file" } }, "required": ["audioUrl"] }
|
|
915
|
+
},
|
|
916
|
+
"transcribeAudio": {
|
|
917
|
+
stepType: "transcribeAudio",
|
|
918
|
+
description: "Convert an audio file to text using a transcription model.",
|
|
919
|
+
usageNotes: "- The prompt field provides optional context to improve transcription accuracy (e.g. language, speaker names, domain).",
|
|
920
|
+
inputSchema: { "type": "object", "properties": { "audioUrl": { "type": "string", "description": "URL of the audio file to transcribe" }, "prompt": { "type": "string", "description": "Optional context to improve transcription accuracy (e.g. language, speaker names, domain terms)" }, "transcriptionModelOverride": { "type": "object", "properties": { "model": { "type": "string", "description": "Audio transcription model identifier" }, "config": { "type": "object", "description": "Additional model-specific configuration" } }, "required": ["model"], "description": "Optional model configuration override. Uses the workflow's default transcription model if not specified" } }, "required": ["audioUrl", "prompt"] },
|
|
921
|
+
outputSchema: { "type": "object", "properties": { "text": { "type": "string", "description": "The transcribed text from the audio file" } }, "required": ["text"] }
|
|
922
|
+
},
|
|
923
|
+
"trimMedia": {
|
|
924
|
+
stepType: "trimMedia",
|
|
925
|
+
description: "Trim an audio or video clip",
|
|
926
|
+
usageNotes: "",
|
|
927
|
+
inputSchema: { "type": "object", "properties": { "inputUrl": { "type": "string", "description": "URL of the source audio or video file to trim" }, "start": { "type": ["number", "string"] }, "duration": { "type": ["string", "number"] }, "skipAssetCreation": { "type": "boolean", "description": "When true, the result will not appear in the user's asset history. Useful for intermediate compositing steps." } }, "required": ["inputUrl"] },
|
|
928
|
+
outputSchema: { "type": "object", "properties": { "mediaUrl": { "type": "string", "description": "URL of the trimmed media file" } }, "required": ["mediaUrl"] }
|
|
929
|
+
},
|
|
930
|
+
"updateGoogleCalendarEvent": {
|
|
931
|
+
stepType: "updateGoogleCalendarEvent",
|
|
932
|
+
description: "Update an existing event on a Google Calendar. Only specified fields are changed.",
|
|
933
|
+
usageNotes: "- Requires a Google OAuth connection with Calendar events scope.\n- Fetches the existing event first, then applies only the provided updates. Omitted fields are left unchanged.\n- Attendees are specified as one email address per line, and replace the entire attendee list.",
|
|
934
|
+
inputSchema: { "type": "object", "properties": { "connectionId": { "type": "string", "description": "Google OAuth connection ID" }, "eventId": { "type": "string", "description": "Google Calendar event ID to update" }, "summary": { "type": "string", "description": "Updated event title" }, "description": { "type": "string", "description": "Updated event description" }, "location": { "type": "string", "description": "Updated event location" }, "startDateTime": { "type": "string", "description": "Updated start time in ISO 8601 format" }, "endDateTime": { "type": "string", "description": "Updated end time in ISO 8601 format" }, "attendees": { "type": "string", "description": "Updated attendee email addresses (one per line, replaces all existing attendees)" }, "calendarId": { "type": "string", "description": 'Calendar ID (defaults to "primary" if omitted)' } }, "required": ["eventId"] },
|
|
935
|
+
outputSchema: { "type": "object", "properties": { "eventId": { "type": "string", "description": "Google Calendar event ID" }, "htmlLink": { "type": "string", "description": "URL to view the updated event in Google Calendar" } }, "required": ["eventId", "htmlLink"] }
|
|
936
|
+
},
|
|
937
|
+
"updateGoogleDoc": {
|
|
938
|
+
stepType: "updateGoogleDoc",
|
|
939
|
+
description: "Update the contents of an existing Google Document.",
|
|
940
|
+
usageNotes: '- operationType controls how content is applied: "addToTop" prepends, "addToBottom" appends, "overwrite" replaces all content.\n- textType determines how the text field is interpreted: "plain" for plain text, "html" for HTML markup, "markdown" for Markdown.',
|
|
941
|
+
inputSchema: { "type": "object", "properties": { "documentId": { "type": "string", "description": "Google Document ID to update" }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" }, "text": { "type": "string", "description": "New content to write to the document" }, "textType": { "enum": ["plain", "html", "markdown"], "type": "string", "description": 'Format of the text field: "plain", "html", or "markdown"' }, "operationType": { "enum": ["addToTop", "addToBottom", "overwrite"], "type": "string", "description": 'How to apply the content: "addToTop", "addToBottom", or "overwrite"' } }, "required": ["documentId", "text", "textType", "operationType"] },
|
|
942
|
+
outputSchema: { "type": "object", "properties": { "documentUrl": { "type": "string", "description": "URL of the updated Google Document" } }, "required": ["documentUrl"] }
|
|
943
|
+
},
|
|
944
|
+
"updateGoogleSheet": {
|
|
945
|
+
stepType: "updateGoogleSheet",
|
|
946
|
+
description: "Update a Google Spreadsheet with new data.",
|
|
947
|
+
usageNotes: '- operationType controls how data is written: "addToBottom" appends rows, "overwrite" replaces all data, "range" writes to a specific cell range.\n- Data should be provided as CSV in the text field.',
|
|
948
|
+
inputSchema: { "type": "object", "properties": { "text": { "type": "string", "description": "CSV data to write to the spreadsheet" }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" }, "spreadsheetId": { "type": "string", "description": "Google Spreadsheet ID to update" }, "range": { "type": "string", "description": 'Target cell range in A1 notation (used with "range" operationType)' }, "operationType": { "enum": ["addToBottom", "overwrite", "range"], "type": "string", "description": 'How to apply the data: "addToBottom", "overwrite", or "range"' } }, "required": ["text", "spreadsheetId", "range", "operationType"] },
|
|
949
|
+
outputSchema: { "type": "object", "properties": { "spreadsheetUrl": { "type": "string", "description": "URL of the updated Google Spreadsheet" } }, "required": ["spreadsheetUrl"] }
|
|
950
|
+
},
|
|
951
|
+
"uploadDataSourceDocument": {
|
|
952
|
+
stepType: "uploadDataSourceDocument",
|
|
953
|
+
description: "Upload a file into an existing data source from a URL or raw text content.",
|
|
954
|
+
usageNotes: '- If "file" is a single URL, the file is downloaded from that URL and uploaded.\n- If "file" is any other string, a .txt document is created from that content and uploaded.\n- The block waits (polls) for processing to complete before transitioning, up to 5 minutes.\n- Once processing finishes, vectors are loaded into Milvus so the data source is immediately queryable.\n- Supported file types (when using a URL) are the same as the data source upload UI (PDF, DOCX, TXT, etc.).',
|
|
955
|
+
inputSchema: { "type": "object", "properties": { "dataSourceId": { "type": "string", "description": "ID of the target data source (supports variable interpolation)" }, "file": { "type": "string", "description": "A URL to download, or raw text content to create a .txt document from (supports variable interpolation)" }, "fileName": { "type": "string", "description": "Display name for the document (supports variable interpolation)" } }, "required": ["dataSourceId", "file", "fileName"] },
|
|
956
|
+
outputSchema: { "description": "This step does not produce output data." }
|
|
957
|
+
},
|
|
958
|
+
"upscaleImage": {
|
|
959
|
+
stepType: "upscaleImage",
|
|
960
|
+
description: "Increase the resolution of an image using AI upscaling.",
|
|
961
|
+
usageNotes: "- Output is re-hosted on the CDN as a PNG.",
|
|
962
|
+
inputSchema: { "type": "object", "properties": { "imageUrl": { "type": "string", "description": "URL of the image to upscale" }, "targetResolution": { "enum": ["2k", "4k", "8k"], "type": "string", "description": "Target output resolution" }, "engine": { "enum": ["standard", "pro"], "type": "string", "description": "Upscaling engine quality tier" } }, "required": ["imageUrl", "targetResolution", "engine"] },
|
|
963
|
+
outputSchema: { "type": "object", "properties": { "imageUrl": { "type": "string", "description": "CDN URL of the upscaled image (PNG)" } }, "required": ["imageUrl"] }
|
|
964
|
+
},
|
|
965
|
+
"upscaleVideo": {
|
|
966
|
+
stepType: "upscaleVideo",
|
|
967
|
+
description: "Upscale a video file",
|
|
968
|
+
usageNotes: "",
|
|
969
|
+
inputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "URL of the source video to upscale" }, "targetResolution": { "enum": ["720p", "1080p", "2K", "4K"], "type": "string", "description": "Target output resolution for the upscaled video" }, "engine": { "enum": ["standard", "pro", "ultimate", "flashvsr", "seedance", "seedvr2", "runwayml/upscale-v1"], "type": "string", "description": "Upscaling engine to use. Higher tiers produce better quality at higher cost." }, "skipAssetCreation": { "type": "boolean", "description": "When true, the result will not appear in the user's asset history. Useful for intermediate compositing steps." } }, "required": ["videoUrl", "targetResolution", "engine"] },
|
|
970
|
+
outputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "URL of the upscaled video" } }, "required": ["videoUrl"] }
|
|
971
|
+
},
|
|
972
|
+
"userMessage": {
|
|
973
|
+
stepType: "userMessage",
|
|
974
|
+
description: "Send a message to an AI model and return the response, or echo a system message.",
|
|
975
|
+
usageNotes: `- Source "user" sends the message to an LLM and returns the model's response.
|
|
976
|
+
- Source "system" echoes the message content directly (no AI call).
|
|
977
|
+
- Mode "background" saves the result to a variable. Mode "foreground" streams it to the user (not available in direct execution).
|
|
978
|
+
- Structured output (JSON/CSV) can be enforced via structuredOutputType and structuredOutputExample.`,
|
|
979
|
+
inputSchema: { "type": "object", "properties": { "message": { "type": "string", "description": "The message to send (prompt for AI, or text for system echo)" }, "source": { "enum": ["user", "system"], "type": "string", "description": 'Message source: "user" sends to AI model, "system" echoes message content directly. Defaults to "user"' }, "modelOverride": { "type": "object", "properties": { "model": { "type": "string", "description": 'Model identifier (e.g. "gpt-4", "claude-3-opus")' }, "temperature": { "type": "number", "description": "Sampling temperature for the model (0-2)" }, "maxResponseTokens": { "type": "number", "description": "Maximum number of tokens in the model's response" }, "ignorePreamble": { "type": "boolean", "description": "Whether to skip the system preamble/instructions" }, "userMessagePreprocessor": { "type": "object", "properties": { "dataSource": { "type": "string", "description": "Data source identifier for the preprocessor" }, "messageTemplate": { "type": "string", "description": "Template string applied to user messages before sending to the model" }, "maxResults": { "type": "number", "description": "Maximum number of results to include from the data source" }, "enabled": { "type": "boolean", "description": "Whether the preprocessor is active" }, "shouldInherit": { "type": "boolean", "description": "Whether child steps should inherit this preprocessor configuration" } }, "description": "Preprocessor applied to user messages before sending to the model" }, "preamble": { "type": "string", "description": "System preamble/instructions for the model" }, "multiModelEnabled": { "type": "boolean", "description": "Whether multi-model candidate generation is enabled" }, "editResponseEnabled": { "type": "boolean", "description": "Whether the user can edit the model's response" }, "config": { "type": "object", "description": "Additional model-specific configuration" } }, "required": ["model", "temperature", "maxResponseTokens"], "description": "Model configuration override. Optional; uses the workflow's default model if not specified" }, "structuredOutputType": { "enum": ["text", "json", "csv"], "type": "string", "description": "Output format constraint for structured responses" }, "structuredOutputExample": { "type": "string", "description": "Sample showing the desired output shape (for JSON/CSV formats). A TypeScript interface is also useful here for more complex types." }, "chatHistoryMode": { "enum": ["include", "exclude"], "type": "string", "description": "Whether to include or exclude prior chat history in the AI context" } }, "required": ["message"], "description": "Configuration for the user message step" },
|
|
980
|
+
outputSchema: { "type": "object", "properties": { "content": { "type": "string", "description": "The AI model's response or echoed system message content" } }, "required": ["content"] }
|
|
981
|
+
},
|
|
982
|
+
"videoFaceSwap": {
|
|
983
|
+
stepType: "videoFaceSwap",
|
|
984
|
+
description: "Swap faces in a video file",
|
|
985
|
+
usageNotes: "",
|
|
986
|
+
inputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "URL of the source video containing faces to swap" }, "faceImageUrl": { "type": "string", "description": "URL of the image containing the replacement face" }, "targetIndex": { "type": "number", "description": "Zero-based index of the face to replace in the video" }, "engine": { "type": "string", "description": "Face swap engine to use" }, "skipAssetCreation": { "type": "boolean", "description": "When true, the result will not appear in the user's asset history. Useful for intermediate compositing steps." } }, "required": ["videoUrl", "faceImageUrl", "targetIndex", "engine"] },
|
|
987
|
+
outputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "URL of the face-swapped video" } }, "required": ["videoUrl"] }
|
|
988
|
+
},
|
|
989
|
+
"videoRemoveBackground": {
|
|
990
|
+
stepType: "videoRemoveBackground",
|
|
991
|
+
description: "Remove or replace background from a video",
|
|
992
|
+
usageNotes: "",
|
|
993
|
+
inputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "URL of the source video" }, "newBackground": { "enum": ["transparent", "image"], "type": "string", "description": "Whether to make the background transparent or replace it with an image" }, "newBackgroundImageUrl": { "type": "string", "description": "URL of a replacement background image. Required when newBackground is 'image'." }, "engine": { "type": "string", "description": "Background removal engine to use" }, "skipAssetCreation": { "type": "boolean", "description": "When true, the result will not appear in the user's asset history. Useful for intermediate compositing steps." } }, "required": ["videoUrl", "newBackground", "engine"] },
|
|
994
|
+
outputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "URL of the video with background removed or replaced" } }, "required": ["videoUrl"] }
|
|
995
|
+
},
|
|
996
|
+
"videoRemoveWatermark": {
|
|
997
|
+
stepType: "videoRemoveWatermark",
|
|
998
|
+
description: "Remove a watermark from a video",
|
|
999
|
+
usageNotes: "",
|
|
1000
|
+
inputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "URL of the source video containing a watermark" }, "engine": { "type": "string", "description": "Watermark removal engine to use" }, "skipAssetCreation": { "type": "boolean", "description": "When true, the result will not appear in the user's asset history. Useful for intermediate compositing steps." } }, "required": ["videoUrl", "engine"] },
|
|
1001
|
+
outputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "URL of the video with watermark removed" } }, "required": ["videoUrl"] }
|
|
1002
|
+
},
|
|
1003
|
+
"watermarkImage": {
|
|
1004
|
+
stepType: "watermarkImage",
|
|
1005
|
+
description: "Overlay a watermark image onto another image.",
|
|
1006
|
+
usageNotes: "- The watermark is placed at the specified corner with configurable padding and width.",
|
|
1007
|
+
inputSchema: { "type": "object", "properties": { "imageUrl": { "type": "string", "description": "URL of the base image" }, "watermarkImageUrl": { "type": "string", "description": "URL of the watermark image to overlay" }, "corner": { "enum": ["top-left", "top-right", "bottom-left", "bottom-right"], "type": "string", "description": "Corner position for the watermark placement" }, "paddingPx": { "type": "number", "description": "Padding from the corner in pixels" }, "widthPx": { "type": "number", "description": "Width of the watermark overlay in pixels" }, "skipAssetCreation": { "type": "boolean", "description": "When true, the result will not appear in the user's asset history" } }, "required": ["imageUrl", "watermarkImageUrl", "corner", "paddingPx", "widthPx"] },
|
|
1008
|
+
outputSchema: { "type": "object", "properties": { "imageUrl": { "type": "string", "description": "CDN URL of the watermarked image" } }, "required": ["imageUrl"] }
|
|
1009
|
+
},
|
|
1010
|
+
"watermarkVideo": {
|
|
1011
|
+
stepType: "watermarkVideo",
|
|
1012
|
+
description: "Add an image watermark to a video",
|
|
1013
|
+
usageNotes: "",
|
|
1014
|
+
inputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "URL of the source video" }, "imageUrl": { "type": "string", "description": "URL of the watermark image to overlay" }, "corner": { "enum": ["top-left", "top-right", "bottom-left", "bottom-right"], "type": "string", "description": "Corner position for the watermark placement" }, "paddingPx": { "type": "number", "description": "Padding from the corner in pixels" }, "widthPx": { "type": "number", "description": "Width of the watermark overlay in pixels" }, "skipAssetCreation": { "type": "boolean", "description": "When true, the result will not appear in the user's asset history. Useful for intermediate compositing steps." } }, "required": ["videoUrl", "imageUrl", "corner", "paddingPx", "widthPx"] },
|
|
1015
|
+
outputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "URL of the watermarked video" } }, "required": ["videoUrl"] }
|
|
1016
|
+
}
|
|
1017
|
+
};
|
|
1018
|
+
}
|
|
1019
|
+
});
|
|
1020
|
+
|
|
1021
|
+
// src/errors.ts
|
|
1022
|
+
var MindStudioError;
|
|
1023
|
+
var init_errors = __esm({
|
|
1024
|
+
"src/errors.ts"() {
|
|
1025
|
+
"use strict";
|
|
1026
|
+
MindStudioError = class extends Error {
|
|
1027
|
+
constructor(message, code, status, details) {
|
|
1028
|
+
super(message);
|
|
1029
|
+
this.code = code;
|
|
1030
|
+
this.status = status;
|
|
1031
|
+
this.details = details;
|
|
1032
|
+
}
|
|
1033
|
+
name = "MindStudioError";
|
|
1034
|
+
};
|
|
1035
|
+
}
|
|
1036
|
+
});
|
|
1037
|
+
|
|
1038
|
+
// src/http.ts
|
|
1039
|
+
async function request(config, method, path, body) {
|
|
1040
|
+
const url = `${config.baseUrl}/developer/v2${path}`;
|
|
1041
|
+
await config.rateLimiter.acquire();
|
|
1042
|
+
try {
|
|
1043
|
+
return await requestWithRetry(config, method, url, body, 0);
|
|
1044
|
+
} finally {
|
|
1045
|
+
config.rateLimiter.release();
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
async function requestWithRetry(config, method, url, body, attempt) {
|
|
1049
|
+
const res = await fetch(url, {
|
|
1050
|
+
method,
|
|
1051
|
+
headers: {
|
|
1052
|
+
Authorization: `Bearer ${config.token}`,
|
|
1053
|
+
"Content-Type": "application/json",
|
|
1054
|
+
"User-Agent": "@mindstudio-ai/agent"
|
|
1055
|
+
},
|
|
1056
|
+
body: body != null ? JSON.stringify(body) : void 0
|
|
1057
|
+
});
|
|
1058
|
+
config.rateLimiter.updateFromHeaders(res.headers);
|
|
1059
|
+
if (res.status === 429 && attempt < config.maxRetries) {
|
|
1060
|
+
const retryAfter = res.headers.get("retry-after");
|
|
1061
|
+
const waitMs = retryAfter ? parseFloat(retryAfter) * 1e3 : 1e3;
|
|
1062
|
+
await sleep(waitMs);
|
|
1063
|
+
return requestWithRetry(config, method, url, body, attempt + 1);
|
|
1064
|
+
}
|
|
1065
|
+
if (!res.ok) {
|
|
1066
|
+
const errorBody = await res.json().catch(() => ({}));
|
|
1067
|
+
throw new MindStudioError(
|
|
1068
|
+
errorBody.message || `${res.status} ${res.statusText}`,
|
|
1069
|
+
errorBody.code || "api_error",
|
|
1070
|
+
res.status,
|
|
1071
|
+
errorBody
|
|
1072
|
+
);
|
|
1073
|
+
}
|
|
1074
|
+
const data = await res.json();
|
|
1075
|
+
return { data, headers: res.headers };
|
|
1076
|
+
}
|
|
1077
|
+
function sleep(ms) {
|
|
1078
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
1079
|
+
}
|
|
1080
|
+
var init_http = __esm({
|
|
1081
|
+
"src/http.ts"() {
|
|
1082
|
+
"use strict";
|
|
1083
|
+
init_errors();
|
|
1084
|
+
}
|
|
1085
|
+
});
|
|
1086
|
+
|
|
1087
|
+
// src/rate-limit.ts
|
|
1088
|
+
var DEFAULTS, RateLimiter;
|
|
1089
|
+
var init_rate_limit = __esm({
|
|
1090
|
+
"src/rate-limit.ts"() {
|
|
1091
|
+
"use strict";
|
|
1092
|
+
init_errors();
|
|
1093
|
+
DEFAULTS = {
|
|
1094
|
+
internal: { concurrency: 10, callCap: 500 },
|
|
1095
|
+
apiKey: { concurrency: 20, callCap: Infinity }
|
|
1096
|
+
};
|
|
1097
|
+
RateLimiter = class {
|
|
1098
|
+
constructor(authType) {
|
|
1099
|
+
this.authType = authType;
|
|
1100
|
+
this.concurrencyLimit = DEFAULTS[authType].concurrency;
|
|
1101
|
+
this.callCap = DEFAULTS[authType].callCap;
|
|
1102
|
+
}
|
|
1103
|
+
inflight = 0;
|
|
1104
|
+
concurrencyLimit;
|
|
1105
|
+
callCount = 0;
|
|
1106
|
+
callCap;
|
|
1107
|
+
queue = [];
|
|
1108
|
+
/** Acquire a slot. Resolves when a concurrent slot is available. */
|
|
1109
|
+
async acquire() {
|
|
1110
|
+
if (this.callCount >= this.callCap) {
|
|
1111
|
+
throw new MindStudioError(
|
|
1112
|
+
`Call cap reached (${this.callCap} calls). Internal tokens are limited to 500 calls per execution.`,
|
|
1113
|
+
"call_cap_exceeded",
|
|
1114
|
+
429
|
|
1115
|
+
);
|
|
1116
|
+
}
|
|
1117
|
+
if (this.inflight < this.concurrencyLimit) {
|
|
1118
|
+
this.inflight++;
|
|
1119
|
+
this.callCount++;
|
|
1120
|
+
return;
|
|
1121
|
+
}
|
|
1122
|
+
return new Promise((resolve) => {
|
|
1123
|
+
this.queue.push(() => {
|
|
1124
|
+
this.inflight++;
|
|
1125
|
+
this.callCount++;
|
|
1126
|
+
resolve();
|
|
1127
|
+
});
|
|
1128
|
+
});
|
|
1129
|
+
}
|
|
1130
|
+
/** Release a slot and let the next queued request proceed. */
|
|
1131
|
+
release() {
|
|
1132
|
+
this.inflight--;
|
|
1133
|
+
const next = this.queue.shift();
|
|
1134
|
+
if (next) next();
|
|
1135
|
+
}
|
|
1136
|
+
/** Update limits from response headers. */
|
|
1137
|
+
updateFromHeaders(headers) {
|
|
1138
|
+
const concurrency = headers.get("x-ratelimit-concurrency-limit");
|
|
1139
|
+
if (concurrency) {
|
|
1140
|
+
this.concurrencyLimit = parseInt(concurrency, 10);
|
|
1141
|
+
}
|
|
1142
|
+
const limit = headers.get("x-ratelimit-limit");
|
|
1143
|
+
if (limit && this.authType === "internal") {
|
|
1144
|
+
this.callCap = parseInt(limit, 10);
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
/** Read current rate limit state from response headers. */
|
|
1148
|
+
static parseHeaders(headers) {
|
|
1149
|
+
const remaining = headers.get("x-ratelimit-remaining");
|
|
1150
|
+
const concurrencyRemaining = headers.get(
|
|
1151
|
+
"x-ratelimit-concurrency-remaining"
|
|
1152
|
+
);
|
|
1153
|
+
return {
|
|
1154
|
+
remaining: remaining != null ? parseInt(remaining, 10) : void 0,
|
|
1155
|
+
concurrencyRemaining: concurrencyRemaining != null ? parseInt(concurrencyRemaining, 10) : void 0
|
|
1156
|
+
};
|
|
1157
|
+
}
|
|
1158
|
+
};
|
|
1159
|
+
}
|
|
1160
|
+
});
|
|
1161
|
+
|
|
1162
|
+
// src/generated/steps.ts
|
|
1163
|
+
var steps_exports = {};
|
|
1164
|
+
__export(steps_exports, {
|
|
1165
|
+
applyStepMethods: () => applyStepMethods
|
|
1166
|
+
});
|
|
1167
|
+
function applyStepMethods(AgentClass) {
|
|
1168
|
+
const proto = AgentClass.prototype;
|
|
1169
|
+
proto.activeCampaignAddNote = function(step, options) {
|
|
1170
|
+
return this.executeStep("activeCampaignAddNote", step, options);
|
|
1171
|
+
};
|
|
1172
|
+
proto.activeCampaignCreateContact = function(step, options) {
|
|
1173
|
+
return this.executeStep("activeCampaignCreateContact", step, options);
|
|
1174
|
+
};
|
|
1175
|
+
proto.addSubtitlesToVideo = function(step, options) {
|
|
1176
|
+
return this.executeStep("addSubtitlesToVideo", step, options);
|
|
1177
|
+
};
|
|
1178
|
+
proto.airtableCreateUpdateRecord = function(step, options) {
|
|
1179
|
+
return this.executeStep("airtableCreateUpdateRecord", step, options);
|
|
1180
|
+
};
|
|
1181
|
+
proto.airtableDeleteRecord = function(step, options) {
|
|
1182
|
+
return this.executeStep("airtableDeleteRecord", step, options);
|
|
1183
|
+
};
|
|
1184
|
+
proto.airtableGetRecord = function(step, options) {
|
|
1185
|
+
return this.executeStep("airtableGetRecord", step, options);
|
|
1186
|
+
};
|
|
1187
|
+
proto.airtableGetTableRecords = function(step, options) {
|
|
1188
|
+
return this.executeStep("airtableGetTableRecords", step, options);
|
|
1189
|
+
};
|
|
1190
|
+
proto.analyzeImage = function(step, options) {
|
|
1191
|
+
return this.executeStep("analyzeImage", step, options);
|
|
1192
|
+
};
|
|
1193
|
+
proto.analyzeVideo = function(step, options) {
|
|
1194
|
+
return this.executeStep("analyzeVideo", step, options);
|
|
1195
|
+
};
|
|
1196
|
+
proto.captureThumbnail = function(step, options) {
|
|
1197
|
+
return this.executeStep("captureThumbnail", step, options);
|
|
1198
|
+
};
|
|
1199
|
+
proto.codaCreateUpdatePage = function(step, options) {
|
|
1200
|
+
return this.executeStep("codaCreateUpdatePage", step, options);
|
|
1201
|
+
};
|
|
1202
|
+
proto.codaCreateUpdateRow = function(step, options) {
|
|
1203
|
+
return this.executeStep("codaCreateUpdateRow", step, options);
|
|
1204
|
+
};
|
|
1205
|
+
proto.codaFindRow = function(step, options) {
|
|
1206
|
+
return this.executeStep("codaFindRow", step, options);
|
|
1207
|
+
};
|
|
1208
|
+
proto.codaGetPage = function(step, options) {
|
|
1209
|
+
return this.executeStep("codaGetPage", step, options);
|
|
1210
|
+
};
|
|
1211
|
+
proto.codaGetTableRows = function(step, options) {
|
|
1212
|
+
return this.executeStep("codaGetTableRows", step, options);
|
|
1213
|
+
};
|
|
1214
|
+
proto.convertPdfToImages = function(step, options) {
|
|
1215
|
+
return this.executeStep("convertPdfToImages", step, options);
|
|
1216
|
+
};
|
|
1217
|
+
proto.createDataSource = function(step, options) {
|
|
1218
|
+
return this.executeStep("createDataSource", step, options);
|
|
1219
|
+
};
|
|
1220
|
+
proto.createGoogleCalendarEvent = function(step, options) {
|
|
1221
|
+
return this.executeStep("createGoogleCalendarEvent", step, options);
|
|
1222
|
+
};
|
|
1223
|
+
proto.createGoogleDoc = function(step, options) {
|
|
1224
|
+
return this.executeStep("createGoogleDoc", step, options);
|
|
1225
|
+
};
|
|
1226
|
+
proto.createGoogleSheet = function(step, options) {
|
|
1227
|
+
return this.executeStep("createGoogleSheet", step, options);
|
|
1228
|
+
};
|
|
1229
|
+
proto.deleteDataSource = function(step, options) {
|
|
1230
|
+
return this.executeStep("deleteDataSource", step, options);
|
|
1231
|
+
};
|
|
1232
|
+
proto.deleteDataSourceDocument = function(step, options) {
|
|
1233
|
+
return this.executeStep("deleteDataSourceDocument", step, options);
|
|
1234
|
+
};
|
|
1235
|
+
proto.deleteGmailEmail = function(step, options) {
|
|
1236
|
+
return this.executeStep("deleteGmailEmail", step, options);
|
|
1237
|
+
};
|
|
1238
|
+
proto.deleteGoogleCalendarEvent = function(step, options) {
|
|
1239
|
+
return this.executeStep("deleteGoogleCalendarEvent", step, options);
|
|
1240
|
+
};
|
|
1241
|
+
proto.deleteGoogleSheetRows = function(step, options) {
|
|
1242
|
+
return this.executeStep("deleteGoogleSheetRows", step, options);
|
|
1243
|
+
};
|
|
1244
|
+
proto.detectPII = function(step, options) {
|
|
1245
|
+
return this.executeStep("detectPII", step, options);
|
|
1246
|
+
};
|
|
1247
|
+
proto.downloadVideo = function(step, options) {
|
|
1248
|
+
return this.executeStep("downloadVideo", step, options);
|
|
1249
|
+
};
|
|
1250
|
+
proto.enhanceImageGenerationPrompt = function(step, options) {
|
|
1251
|
+
return this.executeStep("enhanceImageGenerationPrompt", step, options);
|
|
1252
|
+
};
|
|
1253
|
+
proto.enhanceVideoGenerationPrompt = function(step, options) {
|
|
1254
|
+
return this.executeStep("enhanceVideoGenerationPrompt", step, options);
|
|
1255
|
+
};
|
|
1256
|
+
proto.enrichPerson = function(step, options) {
|
|
1257
|
+
return this.executeStep("enrichPerson", step, options);
|
|
1258
|
+
};
|
|
1259
|
+
proto.extractAudioFromVideo = function(step, options) {
|
|
1260
|
+
return this.executeStep("extractAudioFromVideo", step, options);
|
|
1261
|
+
};
|
|
1262
|
+
proto.extractText = function(step, options) {
|
|
1263
|
+
return this.executeStep("extractText", step, options);
|
|
1264
|
+
};
|
|
1265
|
+
proto.fetchDataSourceDocument = function(step, options) {
|
|
1266
|
+
return this.executeStep("fetchDataSourceDocument", step, options);
|
|
1267
|
+
};
|
|
1268
|
+
proto.fetchGoogleDoc = function(step, options) {
|
|
1269
|
+
return this.executeStep("fetchGoogleDoc", step, options);
|
|
1270
|
+
};
|
|
1271
|
+
proto.fetchGoogleSheet = function(step, options) {
|
|
1272
|
+
return this.executeStep("fetchGoogleSheet", step, options);
|
|
1273
|
+
};
|
|
1274
|
+
proto.fetchSlackChannelHistory = function(step, options) {
|
|
1275
|
+
return this.executeStep("fetchSlackChannelHistory", step, options);
|
|
1276
|
+
};
|
|
1277
|
+
proto.fetchYoutubeCaptions = function(step, options) {
|
|
1278
|
+
return this.executeStep("fetchYoutubeCaptions", step, options);
|
|
1279
|
+
};
|
|
1280
|
+
proto.fetchYoutubeChannel = function(step, options) {
|
|
1281
|
+
return this.executeStep("fetchYoutubeChannel", step, options);
|
|
1282
|
+
};
|
|
1283
|
+
proto.fetchYoutubeComments = function(step, options) {
|
|
1284
|
+
return this.executeStep("fetchYoutubeComments", step, options);
|
|
1285
|
+
};
|
|
1286
|
+
proto.fetchYoutubeVideo = function(step, options) {
|
|
1287
|
+
return this.executeStep("fetchYoutubeVideo", step, options);
|
|
1288
|
+
};
|
|
1289
|
+
proto.generateChart = function(step, options) {
|
|
1290
|
+
return this.executeStep("generateChart", step, options);
|
|
1291
|
+
};
|
|
1292
|
+
proto.generateImage = function(step, options) {
|
|
1293
|
+
return this.executeStep("generateImage", step, options);
|
|
1294
|
+
};
|
|
1295
|
+
proto.generateLipsync = function(step, options) {
|
|
1296
|
+
return this.executeStep("generateLipsync", step, options);
|
|
1297
|
+
};
|
|
1298
|
+
proto.generateMusic = function(step, options) {
|
|
1299
|
+
return this.executeStep("generateMusic", step, options);
|
|
1300
|
+
};
|
|
1301
|
+
proto.generateAsset = function(step, options) {
|
|
1302
|
+
return this.executeStep("generatePdf", step, options);
|
|
1303
|
+
};
|
|
1304
|
+
proto.generateStaticVideoFromImage = function(step, options) {
|
|
1305
|
+
return this.executeStep("generateStaticVideoFromImage", step, options);
|
|
1306
|
+
};
|
|
1307
|
+
proto.generateVideo = function(step, options) {
|
|
1308
|
+
return this.executeStep("generateVideo", step, options);
|
|
1309
|
+
};
|
|
1310
|
+
proto.getGmailDraft = function(step, options) {
|
|
1311
|
+
return this.executeStep("getGmailDraft", step, options);
|
|
1312
|
+
};
|
|
1313
|
+
proto.getGmailEmail = function(step, options) {
|
|
1314
|
+
return this.executeStep("getGmailEmail", step, options);
|
|
1315
|
+
};
|
|
1316
|
+
proto.getGoogleCalendarEvent = function(step, options) {
|
|
1317
|
+
return this.executeStep("getGoogleCalendarEvent", step, options);
|
|
1318
|
+
};
|
|
1319
|
+
proto.getGoogleDriveFile = function(step, options) {
|
|
1320
|
+
return this.executeStep("getGoogleDriveFile", step, options);
|
|
1321
|
+
};
|
|
1322
|
+
proto.getGoogleSheetInfo = function(step, options) {
|
|
1323
|
+
return this.executeStep("getGoogleSheetInfo", step, options);
|
|
1324
|
+
};
|
|
1325
|
+
proto.getMediaMetadata = function(step, options) {
|
|
1326
|
+
return this.executeStep("getMediaMetadata", step, options);
|
|
1327
|
+
};
|
|
1328
|
+
proto.httpRequest = function(step, options) {
|
|
1329
|
+
return this.executeStep("httpRequest", step, options);
|
|
1330
|
+
};
|
|
1331
|
+
proto.hubspotCreateCompany = function(step, options) {
|
|
1332
|
+
return this.executeStep("hubspotCreateCompany", step, options);
|
|
1333
|
+
};
|
|
1334
|
+
proto.hubspotCreateContact = function(step, options) {
|
|
1335
|
+
return this.executeStep("hubspotCreateContact", step, options);
|
|
1336
|
+
};
|
|
1337
|
+
proto.hubspotGetCompany = function(step, options) {
|
|
1338
|
+
return this.executeStep("hubspotGetCompany", step, options);
|
|
1339
|
+
};
|
|
1340
|
+
proto.hubspotGetContact = function(step, options) {
|
|
1341
|
+
return this.executeStep("hubspotGetContact", step, options);
|
|
1342
|
+
};
|
|
1343
|
+
proto.hunterApiCompanyEnrichment = function(step, options) {
|
|
1344
|
+
return this.executeStep("hunterApiCompanyEnrichment", step, options);
|
|
1345
|
+
};
|
|
1346
|
+
proto.hunterApiDomainSearch = function(step, options) {
|
|
1347
|
+
return this.executeStep("hunterApiDomainSearch", step, options);
|
|
1348
|
+
};
|
|
1349
|
+
proto.hunterApiEmailFinder = function(step, options) {
|
|
1350
|
+
return this.executeStep("hunterApiEmailFinder", step, options);
|
|
1351
|
+
};
|
|
1352
|
+
proto.hunterApiEmailVerification = function(step, options) {
|
|
1353
|
+
return this.executeStep("hunterApiEmailVerification", step, options);
|
|
1354
|
+
};
|
|
1355
|
+
proto.hunterApiPersonEnrichment = function(step, options) {
|
|
1356
|
+
return this.executeStep("hunterApiPersonEnrichment", step, options);
|
|
1357
|
+
};
|
|
1358
|
+
proto.imageFaceSwap = function(step, options) {
|
|
1359
|
+
return this.executeStep("imageFaceSwap", step, options);
|
|
1360
|
+
};
|
|
1361
|
+
proto.imageRemoveWatermark = function(step, options) {
|
|
1362
|
+
return this.executeStep("imageRemoveWatermark", step, options);
|
|
1363
|
+
};
|
|
1364
|
+
proto.insertVideoClips = function(step, options) {
|
|
1365
|
+
return this.executeStep("insertVideoClips", step, options);
|
|
1366
|
+
};
|
|
1367
|
+
proto.listDataSources = function(step, options) {
|
|
1368
|
+
return this.executeStep("listDataSources", step, options);
|
|
1369
|
+
};
|
|
1370
|
+
proto.listGmailDrafts = function(step, options) {
|
|
1371
|
+
return this.executeStep("listGmailDrafts", step, options);
|
|
1372
|
+
};
|
|
1373
|
+
proto.listGoogleCalendarEvents = function(step, options) {
|
|
1374
|
+
return this.executeStep("listGoogleCalendarEvents", step, options);
|
|
1375
|
+
};
|
|
1376
|
+
proto.listGoogleDriveFiles = function(step, options) {
|
|
1377
|
+
return this.executeStep("listGoogleDriveFiles", step, options);
|
|
1378
|
+
};
|
|
1379
|
+
proto.logic = function(step, options) {
|
|
1380
|
+
return this.executeStep("logic", step, options);
|
|
1381
|
+
};
|
|
1382
|
+
proto.makeDotComRunScenario = function(step, options) {
|
|
1383
|
+
return this.executeStep("makeDotComRunScenario", step, options);
|
|
1384
|
+
};
|
|
1385
|
+
proto.mergeAudio = function(step, options) {
|
|
1386
|
+
return this.executeStep("mergeAudio", step, options);
|
|
1387
|
+
};
|
|
1388
|
+
proto.mergeVideos = function(step, options) {
|
|
1389
|
+
return this.executeStep("mergeVideos", step, options);
|
|
1390
|
+
};
|
|
1391
|
+
proto.mixAudioIntoVideo = function(step, options) {
|
|
1392
|
+
return this.executeStep("mixAudioIntoVideo", step, options);
|
|
1393
|
+
};
|
|
1394
|
+
proto.muteVideo = function(step, options) {
|
|
1395
|
+
return this.executeStep("muteVideo", step, options);
|
|
1396
|
+
};
|
|
1397
|
+
proto.n8nRunNode = function(step, options) {
|
|
1398
|
+
return this.executeStep("n8nRunNode", step, options);
|
|
1399
|
+
};
|
|
1400
|
+
proto.notionCreatePage = function(step, options) {
|
|
1401
|
+
return this.executeStep("notionCreatePage", step, options);
|
|
1402
|
+
};
|
|
1403
|
+
proto.notionUpdatePage = function(step, options) {
|
|
1404
|
+
return this.executeStep("notionUpdatePage", step, options);
|
|
1405
|
+
};
|
|
1406
|
+
proto.peopleSearch = function(step, options) {
|
|
1407
|
+
return this.executeStep("peopleSearch", step, options);
|
|
1408
|
+
};
|
|
1409
|
+
proto.postToLinkedIn = function(step, options) {
|
|
1410
|
+
return this.executeStep("postToLinkedIn", step, options);
|
|
1411
|
+
};
|
|
1412
|
+
proto.postToSlackChannel = function(step, options) {
|
|
1413
|
+
return this.executeStep("postToSlackChannel", step, options);
|
|
1414
|
+
};
|
|
1415
|
+
proto.postToX = function(step, options) {
|
|
1416
|
+
return this.executeStep("postToX", step, options);
|
|
1417
|
+
};
|
|
1418
|
+
proto.postToZapier = function(step, options) {
|
|
1419
|
+
return this.executeStep("postToZapier", step, options);
|
|
1420
|
+
};
|
|
1421
|
+
proto.queryDataSource = function(step, options) {
|
|
1422
|
+
return this.executeStep("queryDataSource", step, options);
|
|
1423
|
+
};
|
|
1424
|
+
proto.queryExternalDatabase = function(step, options) {
|
|
1425
|
+
return this.executeStep("queryExternalDatabase", step, options);
|
|
1426
|
+
};
|
|
1427
|
+
proto.redactPII = function(step, options) {
|
|
1428
|
+
return this.executeStep("redactPII", step, options);
|
|
1429
|
+
};
|
|
1430
|
+
proto.removeBackgroundFromImage = function(step, options) {
|
|
1431
|
+
return this.executeStep("removeBackgroundFromImage", step, options);
|
|
1432
|
+
};
|
|
1433
|
+
proto.replyToGmailEmail = function(step, options) {
|
|
1434
|
+
return this.executeStep("replyToGmailEmail", step, options);
|
|
1435
|
+
};
|
|
1436
|
+
proto.resizeVideo = function(step, options) {
|
|
1437
|
+
return this.executeStep("resizeVideo", step, options);
|
|
1438
|
+
};
|
|
1439
|
+
proto.runPackagedWorkflow = function(step, options) {
|
|
1440
|
+
return this.executeStep("runPackagedWorkflow", step, options);
|
|
1441
|
+
};
|
|
1442
|
+
proto.scrapeFacebookPage = function(step, options) {
|
|
1443
|
+
return this.executeStep("scrapeFacebookPage", step, options);
|
|
1444
|
+
};
|
|
1445
|
+
proto.scrapeFacebookPosts = function(step, options) {
|
|
1446
|
+
return this.executeStep("scrapeFacebookPosts", step, options);
|
|
1447
|
+
};
|
|
1448
|
+
proto.scrapeInstagramComments = function(step, options) {
|
|
1449
|
+
return this.executeStep("scrapeInstagramComments", step, options);
|
|
1450
|
+
};
|
|
1451
|
+
proto.scrapeInstagramMentions = function(step, options) {
|
|
1452
|
+
return this.executeStep("scrapeInstagramMentions", step, options);
|
|
1453
|
+
};
|
|
1454
|
+
proto.scrapeInstagramPosts = function(step, options) {
|
|
1455
|
+
return this.executeStep("scrapeInstagramPosts", step, options);
|
|
1456
|
+
};
|
|
1457
|
+
proto.scrapeInstagramProfile = function(step, options) {
|
|
1458
|
+
return this.executeStep("scrapeInstagramProfile", step, options);
|
|
1459
|
+
};
|
|
1460
|
+
proto.scrapeInstagramReels = function(step, options) {
|
|
1461
|
+
return this.executeStep("scrapeInstagramReels", step, options);
|
|
1462
|
+
};
|
|
1463
|
+
proto.scrapeLinkedInCompany = function(step, options) {
|
|
1464
|
+
return this.executeStep("scrapeLinkedInCompany", step, options);
|
|
1465
|
+
};
|
|
1466
|
+
proto.scrapeLinkedInProfile = function(step, options) {
|
|
1467
|
+
return this.executeStep("scrapeLinkedInProfile", step, options);
|
|
1468
|
+
};
|
|
1469
|
+
proto.scrapeMetaThreadsProfile = function(step, options) {
|
|
1470
|
+
return this.executeStep("scrapeMetaThreadsProfile", step, options);
|
|
1471
|
+
};
|
|
1472
|
+
proto.scrapeUrl = function(step, options) {
|
|
1473
|
+
return this.executeStep("scrapeUrl", step, options);
|
|
1474
|
+
};
|
|
1475
|
+
proto.scrapeXPost = function(step, options) {
|
|
1476
|
+
return this.executeStep("scrapeXPost", step, options);
|
|
1477
|
+
};
|
|
1478
|
+
proto.scrapeXProfile = function(step, options) {
|
|
1479
|
+
return this.executeStep("scrapeXProfile", step, options);
|
|
1480
|
+
};
|
|
1481
|
+
proto.searchGoogle = function(step, options) {
|
|
1482
|
+
return this.executeStep("searchGoogle", step, options);
|
|
1483
|
+
};
|
|
1484
|
+
proto.searchGoogleCalendarEvents = function(step, options) {
|
|
1485
|
+
return this.executeStep("searchGoogleCalendarEvents", step, options);
|
|
1486
|
+
};
|
|
1487
|
+
proto.searchGoogleDrive = function(step, options) {
|
|
1488
|
+
return this.executeStep("searchGoogleDrive", step, options);
|
|
1489
|
+
};
|
|
1490
|
+
proto.searchGoogleImages = function(step, options) {
|
|
1491
|
+
return this.executeStep("searchGoogleImages", step, options);
|
|
1492
|
+
};
|
|
1493
|
+
proto.searchGoogleNews = function(step, options) {
|
|
1494
|
+
return this.executeStep("searchGoogleNews", step, options);
|
|
1495
|
+
};
|
|
1496
|
+
proto.searchGoogleTrends = function(step, options) {
|
|
1497
|
+
return this.executeStep("searchGoogleTrends", step, options);
|
|
1498
|
+
};
|
|
1499
|
+
proto.searchPerplexity = function(step, options) {
|
|
1500
|
+
return this.executeStep("searchPerplexity", step, options);
|
|
1501
|
+
};
|
|
1502
|
+
proto.searchXPosts = function(step, options) {
|
|
1503
|
+
return this.executeStep("searchXPosts", step, options);
|
|
1504
|
+
};
|
|
1505
|
+
proto.searchYoutube = function(step, options) {
|
|
1506
|
+
return this.executeStep("searchYoutube", step, options);
|
|
1507
|
+
};
|
|
1508
|
+
proto.searchYoutubeTrends = function(step, options) {
|
|
1509
|
+
return this.executeStep("searchYoutubeTrends", step, options);
|
|
1510
|
+
};
|
|
1511
|
+
proto.sendEmail = function(step, options) {
|
|
1512
|
+
return this.executeStep("sendEmail", step, options);
|
|
1513
|
+
};
|
|
1514
|
+
proto.sendSMS = function(step, options) {
|
|
1515
|
+
return this.executeStep("sendSMS", step, options);
|
|
1516
|
+
};
|
|
1517
|
+
proto.setRunTitle = function(step, options) {
|
|
1518
|
+
return this.executeStep("setRunTitle", step, options);
|
|
1519
|
+
};
|
|
1520
|
+
proto.setVariable = function(step, options) {
|
|
1521
|
+
return this.executeStep("setVariable", step, options);
|
|
1522
|
+
};
|
|
1523
|
+
proto.telegramSendAudio = function(step, options) {
|
|
1524
|
+
return this.executeStep("telegramSendAudio", step, options);
|
|
1525
|
+
};
|
|
1526
|
+
proto.telegramSendFile = function(step, options) {
|
|
1527
|
+
return this.executeStep("telegramSendFile", step, options);
|
|
1528
|
+
};
|
|
1529
|
+
proto.telegramSendImage = function(step, options) {
|
|
1530
|
+
return this.executeStep("telegramSendImage", step, options);
|
|
1531
|
+
};
|
|
1532
|
+
proto.telegramSendMessage = function(step, options) {
|
|
1533
|
+
return this.executeStep("telegramSendMessage", step, options);
|
|
1534
|
+
};
|
|
1535
|
+
proto.telegramSendVideo = function(step, options) {
|
|
1536
|
+
return this.executeStep("telegramSendVideo", step, options);
|
|
1537
|
+
};
|
|
1538
|
+
proto.telegramSetTyping = function(step, options) {
|
|
1539
|
+
return this.executeStep("telegramSetTyping", step, options);
|
|
1540
|
+
};
|
|
1541
|
+
proto.textToSpeech = function(step, options) {
|
|
1542
|
+
return this.executeStep("textToSpeech", step, options);
|
|
1543
|
+
};
|
|
1544
|
+
proto.transcribeAudio = function(step, options) {
|
|
1545
|
+
return this.executeStep("transcribeAudio", step, options);
|
|
1546
|
+
};
|
|
1547
|
+
proto.trimMedia = function(step, options) {
|
|
1548
|
+
return this.executeStep("trimMedia", step, options);
|
|
1549
|
+
};
|
|
1550
|
+
proto.updateGoogleCalendarEvent = function(step, options) {
|
|
1551
|
+
return this.executeStep("updateGoogleCalendarEvent", step, options);
|
|
1552
|
+
};
|
|
1553
|
+
proto.updateGoogleDoc = function(step, options) {
|
|
1554
|
+
return this.executeStep("updateGoogleDoc", step, options);
|
|
1555
|
+
};
|
|
1556
|
+
proto.updateGoogleSheet = function(step, options) {
|
|
1557
|
+
return this.executeStep("updateGoogleSheet", step, options);
|
|
1558
|
+
};
|
|
1559
|
+
proto.uploadDataSourceDocument = function(step, options) {
|
|
1560
|
+
return this.executeStep("uploadDataSourceDocument", step, options);
|
|
1561
|
+
};
|
|
1562
|
+
proto.upscaleImage = function(step, options) {
|
|
1563
|
+
return this.executeStep("upscaleImage", step, options);
|
|
1564
|
+
};
|
|
1565
|
+
proto.upscaleVideo = function(step, options) {
|
|
1566
|
+
return this.executeStep("upscaleVideo", step, options);
|
|
1567
|
+
};
|
|
1568
|
+
proto.generateText = function(step, options) {
|
|
1569
|
+
return this.executeStep("userMessage", step, options);
|
|
1570
|
+
};
|
|
1571
|
+
proto.videoFaceSwap = function(step, options) {
|
|
1572
|
+
return this.executeStep("videoFaceSwap", step, options);
|
|
1573
|
+
};
|
|
1574
|
+
proto.videoRemoveBackground = function(step, options) {
|
|
1575
|
+
return this.executeStep("videoRemoveBackground", step, options);
|
|
1576
|
+
};
|
|
1577
|
+
proto.videoRemoveWatermark = function(step, options) {
|
|
1578
|
+
return this.executeStep("videoRemoveWatermark", step, options);
|
|
1579
|
+
};
|
|
1580
|
+
proto.watermarkImage = function(step, options) {
|
|
1581
|
+
return this.executeStep("watermarkImage", step, options);
|
|
1582
|
+
};
|
|
1583
|
+
proto.watermarkVideo = function(step, options) {
|
|
1584
|
+
return this.executeStep("watermarkVideo", step, options);
|
|
1585
|
+
};
|
|
1586
|
+
}
|
|
1587
|
+
var init_steps = __esm({
|
|
1588
|
+
"src/generated/steps.ts"() {
|
|
1589
|
+
"use strict";
|
|
1590
|
+
}
|
|
1591
|
+
});
|
|
1592
|
+
|
|
1593
|
+
// src/generated/helpers.ts
|
|
1594
|
+
var helpers_exports = {};
|
|
1595
|
+
__export(helpers_exports, {
|
|
1596
|
+
applyHelperMethods: () => applyHelperMethods
|
|
1597
|
+
});
|
|
1598
|
+
function applyHelperMethods(AgentClass) {
|
|
1599
|
+
const proto = AgentClass.prototype;
|
|
1600
|
+
proto.listModels = function() {
|
|
1601
|
+
return this._request("GET", "/helpers/models").then((r) => r.data);
|
|
1602
|
+
};
|
|
1603
|
+
proto.listModelsByType = function(modelType) {
|
|
1604
|
+
return this._request("GET", `/helpers/models/${modelType}`).then((r) => r.data);
|
|
1605
|
+
};
|
|
1606
|
+
proto.listConnectors = function() {
|
|
1607
|
+
return this._request("GET", "/helpers/connectors").then((r) => r.data);
|
|
1608
|
+
};
|
|
1609
|
+
proto.getConnector = function(serviceId) {
|
|
1610
|
+
return this._request("GET", `/helpers/connectors/${serviceId}`).then((r) => r.data);
|
|
1611
|
+
};
|
|
1612
|
+
}
|
|
1613
|
+
var init_helpers = __esm({
|
|
1614
|
+
"src/generated/helpers.ts"() {
|
|
1615
|
+
"use strict";
|
|
1616
|
+
}
|
|
1617
|
+
});
|
|
1618
|
+
|
|
1619
|
+
// src/client.ts
|
|
1620
|
+
var client_exports = {};
|
|
1621
|
+
__export(client_exports, {
|
|
1622
|
+
MindStudioAgent: () => MindStudioAgent
|
|
1623
|
+
});
|
|
1624
|
+
function sleep2(ms) {
|
|
1625
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
1626
|
+
}
|
|
1627
|
+
function resolveToken(provided) {
|
|
1628
|
+
if (provided) return { token: provided, authType: "apiKey" };
|
|
1629
|
+
if (process.env.MINDSTUDIO_API_KEY)
|
|
1630
|
+
return { token: process.env.MINDSTUDIO_API_KEY, authType: "apiKey" };
|
|
1631
|
+
if (process.env.CALLBACK_TOKEN)
|
|
1632
|
+
return { token: process.env.CALLBACK_TOKEN, authType: "internal" };
|
|
1633
|
+
throw new MindStudioError(
|
|
1634
|
+
"No API key provided. Pass `apiKey` to the MindStudioAgent constructor, or set the MINDSTUDIO_API_KEY environment variable.",
|
|
1635
|
+
"missing_api_key",
|
|
1636
|
+
401
|
|
1637
|
+
);
|
|
1638
|
+
}
|
|
1639
|
+
var DEFAULT_BASE_URL, DEFAULT_MAX_RETRIES, MindStudioAgent;
|
|
1640
|
+
var init_client = __esm({
|
|
1641
|
+
"src/client.ts"() {
|
|
1642
|
+
"use strict";
|
|
1643
|
+
init_http();
|
|
1644
|
+
init_errors();
|
|
1645
|
+
init_rate_limit();
|
|
1646
|
+
init_steps();
|
|
1647
|
+
init_helpers();
|
|
1648
|
+
DEFAULT_BASE_URL = "https://v1.mindstudio-api.com";
|
|
1649
|
+
DEFAULT_MAX_RETRIES = 3;
|
|
1650
|
+
MindStudioAgent = class {
|
|
1651
|
+
/** @internal */
|
|
1652
|
+
_httpConfig;
|
|
1653
|
+
/** @internal */
|
|
1654
|
+
_reuseThreadId;
|
|
1655
|
+
/** @internal */
|
|
1656
|
+
_threadId;
|
|
1657
|
+
constructor(options = {}) {
|
|
1658
|
+
const { token, authType } = resolveToken(options.apiKey);
|
|
1659
|
+
const baseUrl = options.baseUrl ?? process.env.MINDSTUDIO_BASE_URL ?? process.env.REMOTE_HOSTNAME ?? DEFAULT_BASE_URL;
|
|
1660
|
+
this._reuseThreadId = options.reuseThreadId ?? /^(true|1)$/i.test(process.env.MINDSTUDIO_REUSE_THREAD_ID ?? "");
|
|
1661
|
+
this._httpConfig = {
|
|
1662
|
+
baseUrl,
|
|
1663
|
+
token,
|
|
1664
|
+
rateLimiter: new RateLimiter(authType),
|
|
1665
|
+
maxRetries: options.maxRetries ?? DEFAULT_MAX_RETRIES
|
|
1666
|
+
};
|
|
1667
|
+
}
|
|
1668
|
+
/**
|
|
1669
|
+
* Execute any step by its type name. This is the low-level method that all
|
|
1670
|
+
* typed step methods delegate to. Use it as an escape hatch for step types
|
|
1671
|
+
* not yet covered by the generated methods.
|
|
1672
|
+
*
|
|
1673
|
+
* ```ts
|
|
1674
|
+
* const result = await agent.executeStep("generateImage", { prompt: "hello", mode: "background" });
|
|
1675
|
+
* ```
|
|
1676
|
+
*/
|
|
1677
|
+
async executeStep(stepType, step, options) {
|
|
1678
|
+
const threadId = options?.threadId ?? (this._reuseThreadId ? this._threadId : void 0);
|
|
1679
|
+
const { data, headers } = await request(this._httpConfig, "POST", `/steps/${stepType}/execute`, {
|
|
1680
|
+
step,
|
|
1681
|
+
...options?.appId != null && { appId: options.appId },
|
|
1682
|
+
...threadId != null && { threadId }
|
|
1683
|
+
});
|
|
1684
|
+
let output;
|
|
1685
|
+
if (data.output != null) {
|
|
1686
|
+
output = data.output;
|
|
1687
|
+
} else if (data.outputUrl) {
|
|
1688
|
+
const res = await fetch(data.outputUrl);
|
|
1689
|
+
if (!res.ok) {
|
|
1690
|
+
throw new MindStudioError(
|
|
1691
|
+
`Failed to fetch output from S3: ${res.status} ${res.statusText}`,
|
|
1692
|
+
"output_fetch_error",
|
|
1693
|
+
res.status
|
|
1694
|
+
);
|
|
1695
|
+
}
|
|
1696
|
+
const envelope = await res.json();
|
|
1697
|
+
output = envelope.value;
|
|
1698
|
+
} else {
|
|
1699
|
+
output = void 0;
|
|
1700
|
+
}
|
|
1701
|
+
const returnedThreadId = headers.get("x-mindstudio-thread-id") ?? "";
|
|
1702
|
+
if (this._reuseThreadId && returnedThreadId) {
|
|
1703
|
+
this._threadId = returnedThreadId;
|
|
1704
|
+
}
|
|
1705
|
+
const remaining = headers.get("x-ratelimit-remaining");
|
|
1706
|
+
const billingCost = headers.get("x-mindstudio-billing-cost");
|
|
1707
|
+
const billingEvents = headers.get("x-mindstudio-billing-events");
|
|
1708
|
+
return {
|
|
1709
|
+
...output,
|
|
1710
|
+
$appId: headers.get("x-mindstudio-app-id") ?? "",
|
|
1711
|
+
$threadId: returnedThreadId,
|
|
1712
|
+
$rateLimitRemaining: remaining != null ? parseInt(remaining, 10) : void 0,
|
|
1713
|
+
$billingCost: billingCost != null ? parseFloat(billingCost) : void 0,
|
|
1714
|
+
$billingEvents: billingEvents != null ? JSON.parse(billingEvents) : void 0
|
|
1715
|
+
};
|
|
1716
|
+
}
|
|
1717
|
+
/**
|
|
1718
|
+
* List all pre-built agents in the organization.
|
|
1719
|
+
*
|
|
1720
|
+
* ```ts
|
|
1721
|
+
* const { apps } = await agent.listAgents();
|
|
1722
|
+
* for (const app of apps) console.log(app.name, app.id);
|
|
1723
|
+
* ```
|
|
1724
|
+
*/
|
|
1725
|
+
async listAgents() {
|
|
1726
|
+
const { data } = await request(
|
|
1727
|
+
this._httpConfig,
|
|
1728
|
+
"GET",
|
|
1729
|
+
"/agents/load"
|
|
1730
|
+
);
|
|
1731
|
+
return data;
|
|
1732
|
+
}
|
|
1733
|
+
/**
|
|
1734
|
+
* Run a pre-built agent and wait for the result.
|
|
1735
|
+
*
|
|
1736
|
+
* Uses async polling internally — the request returns immediately with a
|
|
1737
|
+
* callback token, then polls until the run completes or fails.
|
|
1738
|
+
*
|
|
1739
|
+
* ```ts
|
|
1740
|
+
* const result = await agent.runAgent({
|
|
1741
|
+
* appId: 'your-agent-id',
|
|
1742
|
+
* variables: { query: 'hello' },
|
|
1743
|
+
* });
|
|
1744
|
+
* console.log(result.result);
|
|
1745
|
+
* ```
|
|
1746
|
+
*/
|
|
1747
|
+
async runAgent(options) {
|
|
1748
|
+
const pollInterval = options.pollIntervalMs ?? 1e3;
|
|
1749
|
+
const { data } = await request(this._httpConfig, "POST", "/agents/run", {
|
|
1750
|
+
appId: options.appId,
|
|
1751
|
+
async: true,
|
|
1752
|
+
...options.variables != null && { variables: options.variables },
|
|
1753
|
+
...options.workflow != null && { workflow: options.workflow },
|
|
1754
|
+
...options.version != null && { version: options.version },
|
|
1755
|
+
...options.includeBillingCost != null && {
|
|
1756
|
+
includeBillingCost: options.includeBillingCost
|
|
1757
|
+
},
|
|
1758
|
+
...options.metadata != null && { metadata: options.metadata }
|
|
1759
|
+
});
|
|
1760
|
+
const token = data.callbackToken;
|
|
1761
|
+
const pollUrl = `${this._httpConfig.baseUrl}/developer/v2/agents/run/poll/${token}`;
|
|
1762
|
+
while (true) {
|
|
1763
|
+
await sleep2(pollInterval);
|
|
1764
|
+
const res = await fetch(pollUrl, {
|
|
1765
|
+
headers: { "User-Agent": "@mindstudio-ai/agent" }
|
|
1766
|
+
});
|
|
1767
|
+
if (res.status === 404) {
|
|
1768
|
+
throw new MindStudioError(
|
|
1769
|
+
"Poll token not found or expired.",
|
|
1770
|
+
"poll_token_expired",
|
|
1771
|
+
404
|
|
1772
|
+
);
|
|
1773
|
+
}
|
|
1774
|
+
if (!res.ok) {
|
|
1775
|
+
throw new MindStudioError(
|
|
1776
|
+
`Poll request failed: ${res.status} ${res.statusText}`,
|
|
1777
|
+
"poll_error",
|
|
1778
|
+
res.status
|
|
1779
|
+
);
|
|
1780
|
+
}
|
|
1781
|
+
const poll = await res.json();
|
|
1782
|
+
if (poll.status === "pending") continue;
|
|
1783
|
+
if (poll.status === "error") {
|
|
1784
|
+
throw new MindStudioError(
|
|
1785
|
+
poll.error ?? "Agent run failed.",
|
|
1786
|
+
"agent_run_error",
|
|
1787
|
+
500
|
|
1788
|
+
);
|
|
1789
|
+
}
|
|
1790
|
+
return poll.result;
|
|
1791
|
+
}
|
|
1792
|
+
}
|
|
1793
|
+
/** @internal Used by generated helper methods. */
|
|
1794
|
+
_request(method, path, body) {
|
|
1795
|
+
return request(this._httpConfig, method, path, body);
|
|
1796
|
+
}
|
|
1797
|
+
};
|
|
1798
|
+
applyStepMethods(MindStudioAgent);
|
|
1799
|
+
applyHelperMethods(MindStudioAgent);
|
|
1800
|
+
}
|
|
1801
|
+
});
|
|
1802
|
+
|
|
1803
|
+
// src/mcp.ts
|
|
1804
|
+
var mcp_exports = {};
|
|
1805
|
+
__export(mcp_exports, {
|
|
1806
|
+
startMcpServer: () => startMcpServer
|
|
1807
|
+
});
|
|
1808
|
+
import { createInterface } from "readline";
|
|
1809
|
+
function send(message) {
|
|
1810
|
+
process.stdout.write(JSON.stringify(message) + "\n");
|
|
1811
|
+
}
|
|
1812
|
+
function sendResult(id, result) {
|
|
1813
|
+
send({ jsonrpc: "2.0", id, result });
|
|
1814
|
+
}
|
|
1815
|
+
function sendError(id, code, message) {
|
|
1816
|
+
send({ jsonrpc: "2.0", id: id ?? null, error: { code, message } });
|
|
1817
|
+
}
|
|
1818
|
+
async function startMcpServer(options) {
|
|
1819
|
+
let agent = null;
|
|
1820
|
+
let metadata = null;
|
|
1821
|
+
let tools = null;
|
|
1822
|
+
async function getMetadata() {
|
|
1823
|
+
if (!metadata) {
|
|
1824
|
+
const mod = await Promise.resolve().then(() => (init_metadata(), metadata_exports));
|
|
1825
|
+
metadata = mod.stepMetadata;
|
|
1826
|
+
}
|
|
1827
|
+
return metadata;
|
|
1828
|
+
}
|
|
1829
|
+
function getAgent() {
|
|
1830
|
+
if (!agent) {
|
|
1831
|
+
agent = new MindStudioAgent({
|
|
1832
|
+
apiKey: options?.apiKey,
|
|
1833
|
+
baseUrl: options?.baseUrl,
|
|
1834
|
+
reuseThreadId: true
|
|
1835
|
+
});
|
|
1836
|
+
}
|
|
1837
|
+
return agent;
|
|
1838
|
+
}
|
|
1839
|
+
async function buildTools() {
|
|
1840
|
+
if (tools) return tools;
|
|
1841
|
+
const meta = await getMetadata();
|
|
1842
|
+
const stepTools = Object.entries(meta).map(
|
|
1843
|
+
([name, step]) => ({
|
|
1844
|
+
name,
|
|
1845
|
+
description: step.description + (step.usageNotes ? "\n\n" + step.usageNotes : ""),
|
|
1846
|
+
inputSchema: step.inputSchema
|
|
1847
|
+
})
|
|
1848
|
+
);
|
|
1849
|
+
tools = [...stepTools, ...HELPER_TOOLS];
|
|
1850
|
+
return tools;
|
|
1851
|
+
}
|
|
1852
|
+
async function handleMessage(msg) {
|
|
1853
|
+
const { id, method, params } = msg;
|
|
1854
|
+
switch (method) {
|
|
1855
|
+
case "initialize":
|
|
1856
|
+
sendResult(id, {
|
|
1857
|
+
protocolVersion: MCP_PROTOCOL_VERSION,
|
|
1858
|
+
capabilities: { tools: {} },
|
|
1859
|
+
serverInfo: {
|
|
1860
|
+
name: "mindstudio-agent",
|
|
1861
|
+
version: "0.0.16"
|
|
1862
|
+
}
|
|
1863
|
+
});
|
|
1864
|
+
break;
|
|
1865
|
+
case "notifications/initialized":
|
|
1866
|
+
break;
|
|
1867
|
+
case "tools/list":
|
|
1868
|
+
sendResult(id, { tools: await buildTools() });
|
|
1869
|
+
break;
|
|
1870
|
+
case "tools/call": {
|
|
1871
|
+
const toolName = params.name;
|
|
1872
|
+
const args = params.arguments ?? {};
|
|
1873
|
+
try {
|
|
1874
|
+
let result;
|
|
1875
|
+
if (toolName === "listModels") {
|
|
1876
|
+
result = await getAgent().listModels();
|
|
1877
|
+
} else if (toolName === "listModelsByType") {
|
|
1878
|
+
result = await getAgent().listModelsByType(
|
|
1879
|
+
args.modelType
|
|
1880
|
+
);
|
|
1881
|
+
} else if (toolName === "listConnectors") {
|
|
1882
|
+
result = await getAgent().listConnectors();
|
|
1883
|
+
} else if (toolName === "getConnector") {
|
|
1884
|
+
result = await getAgent().getConnector(
|
|
1885
|
+
args.serviceId
|
|
1886
|
+
);
|
|
1887
|
+
} else if (toolName === "listAgents") {
|
|
1888
|
+
result = await getAgent().listAgents();
|
|
1889
|
+
} else if (toolName === "runAgent") {
|
|
1890
|
+
result = await getAgent().runAgent({
|
|
1891
|
+
appId: args.appId,
|
|
1892
|
+
variables: args.variables,
|
|
1893
|
+
workflow: args.workflow,
|
|
1894
|
+
version: args.version
|
|
1895
|
+
});
|
|
1896
|
+
} else {
|
|
1897
|
+
const meta = await getMetadata();
|
|
1898
|
+
const step = meta[toolName];
|
|
1899
|
+
if (!step) {
|
|
1900
|
+
sendError(id, -32602, `Unknown tool: ${toolName}`);
|
|
1901
|
+
return;
|
|
1902
|
+
}
|
|
1903
|
+
result = await getAgent().executeStep(
|
|
1904
|
+
step.stepType,
|
|
1905
|
+
args
|
|
1906
|
+
);
|
|
1907
|
+
}
|
|
1908
|
+
sendResult(id, {
|
|
1909
|
+
content: [
|
|
1910
|
+
{ type: "text", text: JSON.stringify(result, null, 2) }
|
|
1911
|
+
]
|
|
1912
|
+
});
|
|
1913
|
+
} catch (err) {
|
|
1914
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
1915
|
+
sendResult(id, {
|
|
1916
|
+
content: [{ type: "text", text: `Error: ${message}` }],
|
|
1917
|
+
isError: true
|
|
1918
|
+
});
|
|
1919
|
+
}
|
|
1920
|
+
break;
|
|
1921
|
+
}
|
|
1922
|
+
default:
|
|
1923
|
+
if (id !== void 0) {
|
|
1924
|
+
sendError(id, -32601, `Method not found: ${method}`);
|
|
1925
|
+
}
|
|
1926
|
+
break;
|
|
1927
|
+
}
|
|
1928
|
+
}
|
|
1929
|
+
console.log = console.warn;
|
|
1930
|
+
const rl = createInterface({ input: process.stdin, terminal: false });
|
|
1931
|
+
for await (const line of rl) {
|
|
1932
|
+
if (!line.trim()) continue;
|
|
1933
|
+
try {
|
|
1934
|
+
const msg = JSON.parse(line);
|
|
1935
|
+
await handleMessage(msg);
|
|
1936
|
+
} catch {
|
|
1937
|
+
sendError(void 0, -32700, "Parse error");
|
|
1938
|
+
}
|
|
1939
|
+
}
|
|
1940
|
+
}
|
|
1941
|
+
var MCP_PROTOCOL_VERSION, HELPER_TOOLS;
|
|
1942
|
+
var init_mcp = __esm({
|
|
1943
|
+
"src/mcp.ts"() {
|
|
1944
|
+
"use strict";
|
|
1945
|
+
init_client();
|
|
1946
|
+
MCP_PROTOCOL_VERSION = "2024-11-05";
|
|
1947
|
+
HELPER_TOOLS = [
|
|
1948
|
+
{
|
|
1949
|
+
name: "listModels",
|
|
1950
|
+
description: "List all available AI models across all categories.",
|
|
1951
|
+
inputSchema: { type: "object", properties: {} }
|
|
1952
|
+
},
|
|
1953
|
+
{
|
|
1954
|
+
name: "listModelsByType",
|
|
1955
|
+
description: "List AI models filtered by type.",
|
|
1956
|
+
inputSchema: {
|
|
1957
|
+
type: "object",
|
|
1958
|
+
properties: {
|
|
1959
|
+
modelType: {
|
|
1960
|
+
type: "string",
|
|
1961
|
+
enum: [
|
|
1962
|
+
"llm_chat",
|
|
1963
|
+
"image_generation",
|
|
1964
|
+
"video_generation",
|
|
1965
|
+
"video_analysis",
|
|
1966
|
+
"text_to_speech",
|
|
1967
|
+
"vision",
|
|
1968
|
+
"transcription"
|
|
1969
|
+
]
|
|
1970
|
+
}
|
|
1971
|
+
},
|
|
1972
|
+
required: ["modelType"]
|
|
1973
|
+
}
|
|
1974
|
+
},
|
|
1975
|
+
{
|
|
1976
|
+
name: "listConnectors",
|
|
1977
|
+
description: "List available connector services (Slack, Google, HubSpot, etc.).",
|
|
1978
|
+
inputSchema: { type: "object", properties: {} }
|
|
1979
|
+
},
|
|
1980
|
+
{
|
|
1981
|
+
name: "getConnector",
|
|
1982
|
+
description: "Get details for a single connector service by ID.",
|
|
1983
|
+
inputSchema: {
|
|
1984
|
+
type: "object",
|
|
1985
|
+
properties: { serviceId: { type: "string" } },
|
|
1986
|
+
required: ["serviceId"]
|
|
1987
|
+
}
|
|
1988
|
+
},
|
|
1989
|
+
{
|
|
1990
|
+
name: "listAgents",
|
|
1991
|
+
description: "List all pre-built agents in the organization along with org metadata.",
|
|
1992
|
+
inputSchema: { type: "object", properties: {} }
|
|
1993
|
+
},
|
|
1994
|
+
{
|
|
1995
|
+
name: "runAgent",
|
|
1996
|
+
description: "Run a pre-built agent and wait for the result. Uses async polling internally.",
|
|
1997
|
+
inputSchema: {
|
|
1998
|
+
type: "object",
|
|
1999
|
+
properties: {
|
|
2000
|
+
appId: {
|
|
2001
|
+
type: "string",
|
|
2002
|
+
description: "The agent/app ID to run."
|
|
2003
|
+
},
|
|
2004
|
+
variables: {
|
|
2005
|
+
type: "object",
|
|
2006
|
+
description: "Input variables as key-value pairs.",
|
|
2007
|
+
additionalProperties: true
|
|
2008
|
+
},
|
|
2009
|
+
workflow: {
|
|
2010
|
+
type: "string",
|
|
2011
|
+
description: "Workflow name to execute. Omit for the app default."
|
|
2012
|
+
},
|
|
2013
|
+
version: {
|
|
2014
|
+
type: "string",
|
|
2015
|
+
description: 'App version override (e.g. "draft"). Defaults to "live".'
|
|
2016
|
+
}
|
|
2017
|
+
},
|
|
2018
|
+
required: ["appId"]
|
|
2019
|
+
}
|
|
2020
|
+
}
|
|
2021
|
+
];
|
|
2022
|
+
}
|
|
2023
|
+
});
|
|
2024
|
+
|
|
2025
|
+
// src/cli.ts
|
|
2026
|
+
import { parseArgs } from "util";
|
|
2027
|
+
var HELP = `Usage: mindstudio <command | method> [options]
|
|
2028
|
+
|
|
2029
|
+
Commands:
|
|
2030
|
+
<method> [json | --flags] Execute a step method (shorthand for exec)
|
|
2031
|
+
exec <method> [json | --flags] Execute a step method
|
|
2032
|
+
list [--json] List available methods
|
|
2033
|
+
info <method> Show method details (params, types, output)
|
|
2034
|
+
agents [--json] List pre-built agents in your organization
|
|
2035
|
+
run <appId> [json | --flags] Run a pre-built agent and wait for result
|
|
2036
|
+
mcp Start MCP server (JSON-RPC over stdio)
|
|
2037
|
+
|
|
2038
|
+
Options:
|
|
2039
|
+
--api-key <key> API key (or set MINDSTUDIO_API_KEY env)
|
|
2040
|
+
--base-url <url> API base URL
|
|
2041
|
+
--app-id <id> App ID for thread context
|
|
2042
|
+
--thread-id <id> Thread ID for state persistence
|
|
2043
|
+
--output-key <key> Extract a single field from the result
|
|
2044
|
+
--no-meta Strip $-prefixed metadata from output
|
|
2045
|
+
--workflow <name> Workflow to execute (run command)
|
|
2046
|
+
--version <ver> App version override, e.g. "draft" (run command)
|
|
2047
|
+
--json Output as JSON (list/agents only)
|
|
2048
|
+
--help Show this help
|
|
2049
|
+
|
|
2050
|
+
Examples:
|
|
2051
|
+
mindstudio generate-image --prompt "a sunset"
|
|
2052
|
+
mindstudio generate-image --prompt "a sunset" --output-key imageUrl
|
|
2053
|
+
mindstudio generate-text --message "hello" --no-meta
|
|
2054
|
+
mindstudio generate-image '{"prompt":"a sunset"}'
|
|
2055
|
+
echo '{"query":"test"}' | mindstudio search-google
|
|
2056
|
+
mindstudio info generate-image
|
|
2057
|
+
mindstudio list --json
|
|
2058
|
+
mindstudio agents
|
|
2059
|
+
mindstudio run <appId> --query "hello"
|
|
2060
|
+
mindstudio mcp
|
|
2061
|
+
`;
|
|
2062
|
+
function camelToKebab(s) {
|
|
2063
|
+
return s.replace(/[A-Z]/g, (m) => "-" + m.toLowerCase());
|
|
2064
|
+
}
|
|
2065
|
+
function kebabToCamel(s) {
|
|
2066
|
+
return s.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
|
|
2067
|
+
}
|
|
2068
|
+
function parseJson5(input) {
|
|
2069
|
+
let s = input;
|
|
2070
|
+
s = s.replace(/\/\/.*$/gm, "");
|
|
2071
|
+
s = s.replace(/\/\*[\s\S]*?\*\//g, "");
|
|
2072
|
+
s = s.replace(/([{,]\s*)([a-zA-Z_$][a-zA-Z0-9_$]*)\s*:/g, '$1"$2":');
|
|
2073
|
+
s = s.replace(/'([^'\\]*(?:\\.[^'\\]*)*)'/g, '"$1"');
|
|
2074
|
+
s = s.replace(/,(\s*[}\]])/g, "$1");
|
|
2075
|
+
return JSON.parse(s);
|
|
2076
|
+
}
|
|
2077
|
+
function coerce(value) {
|
|
2078
|
+
if (typeof value !== "string") return value;
|
|
2079
|
+
if (value === "true") return true;
|
|
2080
|
+
if (value === "false") return false;
|
|
2081
|
+
if (value !== "" && !isNaN(Number(value))) return Number(value);
|
|
2082
|
+
if (value.startsWith("{") && value.endsWith("}") || value.startsWith("[") && value.endsWith("]")) {
|
|
2083
|
+
try {
|
|
2084
|
+
return JSON.parse(value);
|
|
2085
|
+
} catch {
|
|
2086
|
+
}
|
|
2087
|
+
}
|
|
2088
|
+
return value;
|
|
2089
|
+
}
|
|
2090
|
+
function levenshtein(a, b) {
|
|
2091
|
+
const m = a.length;
|
|
2092
|
+
const n = b.length;
|
|
2093
|
+
const dp = Array.from(
|
|
2094
|
+
{ length: m + 1 },
|
|
2095
|
+
() => Array(n + 1).fill(0)
|
|
2096
|
+
);
|
|
2097
|
+
for (let i = 0; i <= m; i++) dp[i][0] = i;
|
|
2098
|
+
for (let j = 0; j <= n; j++) dp[0][j] = j;
|
|
2099
|
+
for (let i = 1; i <= m; i++) {
|
|
2100
|
+
for (let j = 1; j <= n; j++) {
|
|
2101
|
+
dp[i][j] = a[i - 1] === b[j - 1] ? dp[i - 1][j - 1] : 1 + Math.min(dp[i - 1][j], dp[i][j - 1], dp[i - 1][j - 1]);
|
|
2102
|
+
}
|
|
2103
|
+
}
|
|
2104
|
+
return dp[m][n];
|
|
2105
|
+
}
|
|
2106
|
+
function printHelp() {
|
|
2107
|
+
process.stderr.write(HELP);
|
|
2108
|
+
}
|
|
2109
|
+
function fatal(message) {
|
|
2110
|
+
process.stderr.write(JSON.stringify({ error: { message } }) + "\n");
|
|
2111
|
+
process.exit(1);
|
|
2112
|
+
}
|
|
2113
|
+
async function readStdin() {
|
|
2114
|
+
const chunks = [];
|
|
2115
|
+
for await (const chunk of process.stdin) {
|
|
2116
|
+
chunks.push(chunk);
|
|
2117
|
+
}
|
|
2118
|
+
return Buffer.concat(chunks).toString("utf-8").trim();
|
|
2119
|
+
}
|
|
2120
|
+
var HELPER_NAMES = /* @__PURE__ */ new Set([
|
|
2121
|
+
"listModels",
|
|
2122
|
+
"listModelsByType",
|
|
2123
|
+
"listConnectors",
|
|
2124
|
+
"getConnector"
|
|
2125
|
+
]);
|
|
2126
|
+
function resolveMethodOrFail(name, metadataKeys) {
|
|
2127
|
+
if (metadataKeys.has(name)) return name;
|
|
2128
|
+
const camel = kebabToCamel(name);
|
|
2129
|
+
if (metadataKeys.has(camel)) return camel;
|
|
2130
|
+
const kebab = name.includes("-") ? name : camelToKebab(name);
|
|
2131
|
+
let bestDist = Infinity;
|
|
2132
|
+
let bestMatch = "";
|
|
2133
|
+
for (const key of metadataKeys) {
|
|
2134
|
+
const d = levenshtein(kebab, camelToKebab(key));
|
|
2135
|
+
if (d < bestDist) {
|
|
2136
|
+
bestDist = d;
|
|
2137
|
+
bestMatch = camelToKebab(key);
|
|
2138
|
+
}
|
|
2139
|
+
}
|
|
2140
|
+
const suggestion = bestDist <= 3 ? ` Did you mean '${bestMatch}'?` : "";
|
|
2141
|
+
fatal(
|
|
2142
|
+
`Unknown method: ${name}.${suggestion} Run 'mindstudio list' to see available methods.`
|
|
2143
|
+
);
|
|
2144
|
+
}
|
|
2145
|
+
async function getAllMethodKeys() {
|
|
2146
|
+
const { stepMetadata: stepMetadata2 } = await Promise.resolve().then(() => (init_metadata(), metadata_exports));
|
|
2147
|
+
return /* @__PURE__ */ new Set([...Object.keys(stepMetadata2), ...HELPER_NAMES]);
|
|
2148
|
+
}
|
|
2149
|
+
async function cmdList(asJson) {
|
|
2150
|
+
const { stepMetadata: stepMetadata2 } = await Promise.resolve().then(() => (init_metadata(), metadata_exports));
|
|
2151
|
+
if (asJson) {
|
|
2152
|
+
const entries = Object.entries(stepMetadata2).map(([name, meta]) => ({
|
|
2153
|
+
method: camelToKebab(name),
|
|
2154
|
+
description: meta.description,
|
|
2155
|
+
stepType: meta.stepType,
|
|
2156
|
+
inputSchema: meta.inputSchema,
|
|
2157
|
+
outputSchema: meta.outputSchema
|
|
2158
|
+
}));
|
|
2159
|
+
process.stdout.write(JSON.stringify(entries, null, 2) + "\n");
|
|
2160
|
+
} else {
|
|
2161
|
+
const entries = Object.entries(stepMetadata2);
|
|
2162
|
+
const kebabEntries = entries.map(
|
|
2163
|
+
([name, meta]) => [camelToKebab(name), meta]
|
|
2164
|
+
);
|
|
2165
|
+
const maxLen = Math.min(
|
|
2166
|
+
35,
|
|
2167
|
+
kebabEntries.reduce((m, [k]) => Math.max(m, k.length), 0)
|
|
2168
|
+
);
|
|
2169
|
+
for (const [name, meta] of kebabEntries) {
|
|
2170
|
+
const desc = meta.description || "(no description)";
|
|
2171
|
+
process.stdout.write(`${name.padEnd(maxLen)} ${desc}
|
|
2172
|
+
`);
|
|
2173
|
+
}
|
|
2174
|
+
}
|
|
2175
|
+
}
|
|
2176
|
+
async function cmdInfo(rawMethod) {
|
|
2177
|
+
const allKeys = await getAllMethodKeys();
|
|
2178
|
+
const method = resolveMethodOrFail(rawMethod, allKeys);
|
|
2179
|
+
if (HELPER_NAMES.has(method)) {
|
|
2180
|
+
const helpers = {
|
|
2181
|
+
listModels: { desc: "List all available AI models.", input: "(none)", output: "{ models: MindStudioModel[] }" },
|
|
2182
|
+
listModelsByType: { desc: "List AI models filtered by type.", input: "modelType: string (required)", output: "{ models: MindStudioModel[] }" },
|
|
2183
|
+
listConnectors: { desc: "List available connector services.", input: "(none)", output: "{ services: Array }" },
|
|
2184
|
+
getConnector: { desc: "Get details for a connector service.", input: "serviceId: string (required)", output: "{ service: object }" }
|
|
2185
|
+
};
|
|
2186
|
+
const h = helpers[method];
|
|
2187
|
+
process.stderr.write(`
|
|
2188
|
+
${camelToKebab(method)}
|
|
2189
|
+
|
|
2190
|
+
`);
|
|
2191
|
+
process.stderr.write(` ${h.desc}
|
|
2192
|
+
|
|
2193
|
+
`);
|
|
2194
|
+
process.stderr.write(` Input: ${h.input}
|
|
2195
|
+
`);
|
|
2196
|
+
process.stderr.write(` Output: ${h.output}
|
|
2197
|
+
|
|
2198
|
+
`);
|
|
2199
|
+
return;
|
|
2200
|
+
}
|
|
2201
|
+
const { stepMetadata: stepMetadata2 } = await Promise.resolve().then(() => (init_metadata(), metadata_exports));
|
|
2202
|
+
const meta = stepMetadata2[method];
|
|
2203
|
+
const out = [];
|
|
2204
|
+
out.push("");
|
|
2205
|
+
out.push(` ${camelToKebab(method)}`);
|
|
2206
|
+
out.push("");
|
|
2207
|
+
if (meta.description) out.push(` ${meta.description}`);
|
|
2208
|
+
if (meta.usageNotes) {
|
|
2209
|
+
out.push("");
|
|
2210
|
+
for (const line of meta.usageNotes.split("\n")) {
|
|
2211
|
+
const trimmed = line.trim();
|
|
2212
|
+
if (trimmed) out.push(` ${trimmed}`);
|
|
2213
|
+
}
|
|
2214
|
+
}
|
|
2215
|
+
const schema = meta.inputSchema;
|
|
2216
|
+
const props = schema.properties ?? {};
|
|
2217
|
+
const required = new Set(schema.required ?? []);
|
|
2218
|
+
if (Object.keys(props).length > 0) {
|
|
2219
|
+
out.push("");
|
|
2220
|
+
out.push(" Parameters:");
|
|
2221
|
+
for (const [key, prop] of Object.entries(props)) {
|
|
2222
|
+
const req = required.has(key) ? " (required)" : "";
|
|
2223
|
+
const type = formatPropType(prop);
|
|
2224
|
+
const desc = prop.description ? ` ${prop.description}` : "";
|
|
2225
|
+
out.push(` --${camelToKebab(key)} ${type}${req}${desc}`);
|
|
2226
|
+
}
|
|
2227
|
+
}
|
|
2228
|
+
const outSchema = meta.outputSchema;
|
|
2229
|
+
if (outSchema?.properties) {
|
|
2230
|
+
out.push("");
|
|
2231
|
+
out.push(" Output keys:");
|
|
2232
|
+
const outRequired = new Set(outSchema.required ?? []);
|
|
2233
|
+
for (const [key, prop] of Object.entries(outSchema.properties)) {
|
|
2234
|
+
const type = formatPropType(prop);
|
|
2235
|
+
const opt = outRequired.has(key) ? "" : " (optional)";
|
|
2236
|
+
out.push(` ${key} ${type}${opt}`);
|
|
2237
|
+
}
|
|
2238
|
+
}
|
|
2239
|
+
out.push("");
|
|
2240
|
+
process.stderr.write(out.join("\n") + "\n");
|
|
2241
|
+
}
|
|
2242
|
+
function formatPropType(prop) {
|
|
2243
|
+
if (prop.enum) return prop.enum.map((v) => JSON.stringify(v)).join(" | ");
|
|
2244
|
+
if (prop.type === "array") return "array";
|
|
2245
|
+
if (prop.type === "object") return "object";
|
|
2246
|
+
if (typeof prop.type === "string") return prop.type === "integer" ? "number" : prop.type;
|
|
2247
|
+
return "string";
|
|
2248
|
+
}
|
|
2249
|
+
async function cmdExec(method, input, options) {
|
|
2250
|
+
const { MindStudioAgent: MindStudioAgent2 } = await Promise.resolve().then(() => (init_client(), client_exports));
|
|
2251
|
+
await Promise.resolve().then(() => (init_steps(), steps_exports)).then(
|
|
2252
|
+
(m) => m.applyStepMethods(MindStudioAgent2)
|
|
2253
|
+
);
|
|
2254
|
+
await Promise.resolve().then(() => (init_helpers(), helpers_exports)).then(
|
|
2255
|
+
(m) => m.applyHelperMethods(MindStudioAgent2)
|
|
2256
|
+
);
|
|
2257
|
+
const agent = new MindStudioAgent2({
|
|
2258
|
+
apiKey: options.apiKey,
|
|
2259
|
+
baseUrl: options.baseUrl
|
|
2260
|
+
});
|
|
2261
|
+
let result;
|
|
2262
|
+
if (method === "listModels") {
|
|
2263
|
+
result = await agent.listModels();
|
|
2264
|
+
} else if (method === "listModelsByType") {
|
|
2265
|
+
result = await agent.listModelsByType(input.modelType);
|
|
2266
|
+
} else if (method === "listConnectors") {
|
|
2267
|
+
result = await agent.listConnectors();
|
|
2268
|
+
} else if (method === "getConnector") {
|
|
2269
|
+
result = await agent.getConnector(input.serviceId);
|
|
2270
|
+
} else {
|
|
2271
|
+
const { stepMetadata: stepMetadata2 } = await Promise.resolve().then(() => (init_metadata(), metadata_exports));
|
|
2272
|
+
const meta = stepMetadata2[method];
|
|
2273
|
+
if (!meta) {
|
|
2274
|
+
fatal(
|
|
2275
|
+
`Unknown method: ${method}. Run 'mindstudio list' to see available methods.`
|
|
2276
|
+
);
|
|
2277
|
+
}
|
|
2278
|
+
result = await agent.executeStep(meta.stepType, input, {
|
|
2279
|
+
appId: options.appId,
|
|
2280
|
+
threadId: options.threadId
|
|
2281
|
+
});
|
|
2282
|
+
}
|
|
2283
|
+
if (options.outputKey) {
|
|
2284
|
+
const val = result[options.outputKey];
|
|
2285
|
+
if (typeof val === "string") {
|
|
2286
|
+
process.stdout.write(val + "\n");
|
|
2287
|
+
} else {
|
|
2288
|
+
process.stdout.write(JSON.stringify(val, null, 2) + "\n");
|
|
2289
|
+
}
|
|
2290
|
+
} else if (options.noMeta) {
|
|
2291
|
+
const filtered = {};
|
|
2292
|
+
for (const [k, v] of Object.entries(result)) {
|
|
2293
|
+
if (!k.startsWith("$")) filtered[k] = v;
|
|
2294
|
+
}
|
|
2295
|
+
process.stdout.write(JSON.stringify(filtered, null, 2) + "\n");
|
|
2296
|
+
} else {
|
|
2297
|
+
process.stdout.write(JSON.stringify(result, null, 2) + "\n");
|
|
2298
|
+
}
|
|
2299
|
+
}
|
|
2300
|
+
async function cmdAgents(asJson, options) {
|
|
2301
|
+
const { MindStudioAgent: MindStudioAgent2 } = await Promise.resolve().then(() => (init_client(), client_exports));
|
|
2302
|
+
const agent = new MindStudioAgent2({
|
|
2303
|
+
apiKey: options.apiKey,
|
|
2304
|
+
baseUrl: options.baseUrl
|
|
2305
|
+
});
|
|
2306
|
+
const result = await agent.listAgents();
|
|
2307
|
+
if (asJson) {
|
|
2308
|
+
process.stdout.write(JSON.stringify(result, null, 2) + "\n");
|
|
2309
|
+
} else {
|
|
2310
|
+
process.stderr.write(`
|
|
2311
|
+
${result.orgName} (${result.orgId})
|
|
2312
|
+
|
|
2313
|
+
`);
|
|
2314
|
+
if (result.apps.length === 0) {
|
|
2315
|
+
process.stderr.write(" No agents found.\n\n");
|
|
2316
|
+
return;
|
|
2317
|
+
}
|
|
2318
|
+
const maxLen = Math.min(
|
|
2319
|
+
35,
|
|
2320
|
+
result.apps.reduce((m, a) => Math.max(m, a.name.length), 0)
|
|
2321
|
+
);
|
|
2322
|
+
for (const app of result.apps) {
|
|
2323
|
+
const desc = app.description || "(no description)";
|
|
2324
|
+
process.stdout.write(
|
|
2325
|
+
`${app.name.padEnd(maxLen)} ${app.id} ${desc}
|
|
2326
|
+
`
|
|
2327
|
+
);
|
|
2328
|
+
}
|
|
2329
|
+
}
|
|
2330
|
+
}
|
|
2331
|
+
async function cmdRun(appId, variables, options) {
|
|
2332
|
+
const { MindStudioAgent: MindStudioAgent2 } = await Promise.resolve().then(() => (init_client(), client_exports));
|
|
2333
|
+
const agent = new MindStudioAgent2({
|
|
2334
|
+
apiKey: options.apiKey,
|
|
2335
|
+
baseUrl: options.baseUrl
|
|
2336
|
+
});
|
|
2337
|
+
const result = await agent.runAgent({
|
|
2338
|
+
appId,
|
|
2339
|
+
variables: Object.keys(variables).length > 0 ? variables : void 0,
|
|
2340
|
+
workflow: options.workflow,
|
|
2341
|
+
version: options.version
|
|
2342
|
+
});
|
|
2343
|
+
const obj = result;
|
|
2344
|
+
if (options.outputKey) {
|
|
2345
|
+
const val = obj[options.outputKey];
|
|
2346
|
+
if (typeof val === "string") {
|
|
2347
|
+
process.stdout.write(val + "\n");
|
|
2348
|
+
} else {
|
|
2349
|
+
process.stdout.write(JSON.stringify(val, null, 2) + "\n");
|
|
2350
|
+
}
|
|
2351
|
+
} else if (options.noMeta) {
|
|
2352
|
+
const filtered = {};
|
|
2353
|
+
for (const [k, v] of Object.entries(obj)) {
|
|
2354
|
+
if (!k.startsWith("$")) filtered[k] = v;
|
|
2355
|
+
}
|
|
2356
|
+
process.stdout.write(JSON.stringify(filtered, null, 2) + "\n");
|
|
2357
|
+
} else {
|
|
2358
|
+
process.stdout.write(JSON.stringify(result, null, 2) + "\n");
|
|
2359
|
+
}
|
|
2360
|
+
}
|
|
2361
|
+
function parseStepFlags(argv) {
|
|
2362
|
+
const result = {};
|
|
2363
|
+
for (let i = 0; i < argv.length; i++) {
|
|
2364
|
+
const arg = argv[i];
|
|
2365
|
+
if (arg.startsWith("--") && i + 1 < argv.length) {
|
|
2366
|
+
const key = arg.slice(2);
|
|
2367
|
+
result[kebabToCamel(key)] = coerce(argv[++i]);
|
|
2368
|
+
}
|
|
2369
|
+
}
|
|
2370
|
+
return result;
|
|
2371
|
+
}
|
|
2372
|
+
var GLOBAL_STRING_FLAGS = /* @__PURE__ */ new Set([
|
|
2373
|
+
"--api-key",
|
|
2374
|
+
"--base-url",
|
|
2375
|
+
"--app-id",
|
|
2376
|
+
"--thread-id",
|
|
2377
|
+
"--output-key",
|
|
2378
|
+
"--workflow",
|
|
2379
|
+
"--version"
|
|
2380
|
+
]);
|
|
2381
|
+
function findMethodSplit(argv) {
|
|
2382
|
+
let startIdx = 0;
|
|
2383
|
+
let hasExec = false;
|
|
2384
|
+
for (let i = 0; i < argv.length; i++) {
|
|
2385
|
+
const arg = argv[i];
|
|
2386
|
+
if (arg.startsWith("--")) {
|
|
2387
|
+
if (GLOBAL_STRING_FLAGS.has(arg)) i++;
|
|
2388
|
+
continue;
|
|
2389
|
+
}
|
|
2390
|
+
if (arg === "exec") {
|
|
2391
|
+
hasExec = true;
|
|
2392
|
+
startIdx = i + 1;
|
|
2393
|
+
} else {
|
|
2394
|
+
startIdx = i;
|
|
2395
|
+
}
|
|
2396
|
+
break;
|
|
2397
|
+
}
|
|
2398
|
+
for (let i = startIdx; i < argv.length; i++) {
|
|
2399
|
+
const arg = argv[i];
|
|
2400
|
+
if (arg.startsWith("--")) {
|
|
2401
|
+
if (GLOBAL_STRING_FLAGS.has(arg)) i++;
|
|
2402
|
+
continue;
|
|
2403
|
+
}
|
|
2404
|
+
if (hasExec || i === startIdx) {
|
|
2405
|
+
return { rawMethod: arg, stepArgv: argv.slice(i + 1) };
|
|
2406
|
+
}
|
|
2407
|
+
break;
|
|
2408
|
+
}
|
|
2409
|
+
return null;
|
|
2410
|
+
}
|
|
2411
|
+
async function main() {
|
|
2412
|
+
const { values, positionals } = parseArgs({
|
|
2413
|
+
args: process.argv.slice(2),
|
|
2414
|
+
allowPositionals: true,
|
|
2415
|
+
strict: false,
|
|
2416
|
+
options: {
|
|
2417
|
+
"api-key": { type: "string" },
|
|
2418
|
+
"base-url": { type: "string" },
|
|
2419
|
+
"app-id": { type: "string" },
|
|
2420
|
+
"thread-id": { type: "string" },
|
|
2421
|
+
"output-key": { type: "string" },
|
|
2422
|
+
"no-meta": { type: "boolean", default: false },
|
|
2423
|
+
workflow: { type: "string" },
|
|
2424
|
+
version: { type: "string" },
|
|
2425
|
+
json: { type: "boolean", default: false },
|
|
2426
|
+
help: { type: "boolean", default: false }
|
|
2427
|
+
}
|
|
2428
|
+
});
|
|
2429
|
+
if (values.help || positionals.length === 0) {
|
|
2430
|
+
printHelp();
|
|
2431
|
+
process.exit(positionals.length === 0 ? 1 : 0);
|
|
2432
|
+
}
|
|
2433
|
+
const command = positionals[0];
|
|
2434
|
+
try {
|
|
2435
|
+
if (command === "list") {
|
|
2436
|
+
await cmdList(values.json);
|
|
2437
|
+
return;
|
|
2438
|
+
}
|
|
2439
|
+
if (command === "agents") {
|
|
2440
|
+
await cmdAgents(values.json, {
|
|
2441
|
+
apiKey: values["api-key"],
|
|
2442
|
+
baseUrl: values["base-url"]
|
|
2443
|
+
});
|
|
2444
|
+
return;
|
|
2445
|
+
}
|
|
2446
|
+
if (command === "run") {
|
|
2447
|
+
const appId = positionals[1];
|
|
2448
|
+
if (!appId)
|
|
2449
|
+
fatal("Missing app ID. Usage: mindstudio run <appId> [json | --flags]");
|
|
2450
|
+
const runArgv = process.argv.slice(
|
|
2451
|
+
process.argv.indexOf("run") + 2
|
|
2452
|
+
);
|
|
2453
|
+
const stepArgs = [];
|
|
2454
|
+
for (let i = 0; i < runArgv.length; i++) {
|
|
2455
|
+
const arg = runArgv[i];
|
|
2456
|
+
if (GLOBAL_STRING_FLAGS.has(arg) || arg === "--workflow" || arg === "--version") {
|
|
2457
|
+
i++;
|
|
2458
|
+
} else if (arg === "--no-meta" || arg === "--json" || arg === "--help") {
|
|
2459
|
+
} else if (arg === appId) {
|
|
2460
|
+
} else {
|
|
2461
|
+
stepArgs.push(arg);
|
|
2462
|
+
}
|
|
2463
|
+
}
|
|
2464
|
+
let variables;
|
|
2465
|
+
const firstArg = stepArgs[0];
|
|
2466
|
+
if (firstArg && firstArg.startsWith("{")) {
|
|
2467
|
+
try {
|
|
2468
|
+
variables = parseJson5(firstArg);
|
|
2469
|
+
} catch {
|
|
2470
|
+
fatal(`Invalid JSON input: ${firstArg}`);
|
|
2471
|
+
}
|
|
2472
|
+
} else {
|
|
2473
|
+
const flagInput = parseStepFlags(stepArgs);
|
|
2474
|
+
if (Object.keys(flagInput).length > 0) {
|
|
2475
|
+
variables = flagInput;
|
|
2476
|
+
} else if (!process.stdin.isTTY) {
|
|
2477
|
+
const raw = await readStdin();
|
|
2478
|
+
try {
|
|
2479
|
+
variables = parseJson5(raw);
|
|
2480
|
+
} catch {
|
|
2481
|
+
fatal(`Invalid JSON on stdin: ${raw}`);
|
|
2482
|
+
}
|
|
2483
|
+
} else {
|
|
2484
|
+
variables = {};
|
|
2485
|
+
}
|
|
2486
|
+
}
|
|
2487
|
+
await cmdRun(appId, variables, {
|
|
2488
|
+
apiKey: values["api-key"],
|
|
2489
|
+
baseUrl: values["base-url"],
|
|
2490
|
+
workflow: values.workflow,
|
|
2491
|
+
version: values.version,
|
|
2492
|
+
outputKey: values["output-key"],
|
|
2493
|
+
noMeta: values["no-meta"]
|
|
2494
|
+
});
|
|
2495
|
+
return;
|
|
2496
|
+
}
|
|
2497
|
+
if (command === "mcp") {
|
|
2498
|
+
const { startMcpServer: startMcpServer2 } = await Promise.resolve().then(() => (init_mcp(), mcp_exports));
|
|
2499
|
+
await startMcpServer2({
|
|
2500
|
+
apiKey: values["api-key"],
|
|
2501
|
+
baseUrl: values["base-url"]
|
|
2502
|
+
});
|
|
2503
|
+
return;
|
|
2504
|
+
}
|
|
2505
|
+
if (command === "info") {
|
|
2506
|
+
const rawMethod2 = positionals[1];
|
|
2507
|
+
if (!rawMethod2)
|
|
2508
|
+
fatal("Missing method name. Usage: mindstudio info <method>");
|
|
2509
|
+
await cmdInfo(rawMethod2);
|
|
2510
|
+
return;
|
|
2511
|
+
}
|
|
2512
|
+
const split = findMethodSplit(process.argv.slice(2));
|
|
2513
|
+
if (!split)
|
|
2514
|
+
fatal(
|
|
2515
|
+
"Missing method name. Usage: mindstudio <method> [json | --flags]"
|
|
2516
|
+
);
|
|
2517
|
+
const { rawMethod, stepArgv } = split;
|
|
2518
|
+
const allKeys = await getAllMethodKeys();
|
|
2519
|
+
const method = resolveMethodOrFail(rawMethod, allKeys);
|
|
2520
|
+
let input;
|
|
2521
|
+
const firstStepArg = stepArgv[0];
|
|
2522
|
+
if (firstStepArg && firstStepArg.startsWith("{")) {
|
|
2523
|
+
try {
|
|
2524
|
+
input = parseJson5(firstStepArg);
|
|
2525
|
+
} catch {
|
|
2526
|
+
fatal(`Invalid JSON input: ${firstStepArg}`);
|
|
2527
|
+
}
|
|
2528
|
+
} else {
|
|
2529
|
+
const flagInput = parseStepFlags(stepArgv);
|
|
2530
|
+
if (Object.keys(flagInput).length > 0) {
|
|
2531
|
+
input = flagInput;
|
|
2532
|
+
} else if (!process.stdin.isTTY) {
|
|
2533
|
+
const raw = await readStdin();
|
|
2534
|
+
try {
|
|
2535
|
+
input = parseJson5(raw);
|
|
2536
|
+
} catch {
|
|
2537
|
+
fatal(`Invalid JSON on stdin: ${raw}`);
|
|
2538
|
+
}
|
|
2539
|
+
} else {
|
|
2540
|
+
input = {};
|
|
2541
|
+
}
|
|
2542
|
+
}
|
|
2543
|
+
await cmdExec(method, input, {
|
|
2544
|
+
apiKey: values["api-key"],
|
|
2545
|
+
baseUrl: values["base-url"],
|
|
2546
|
+
appId: values["app-id"],
|
|
2547
|
+
threadId: values["thread-id"],
|
|
2548
|
+
outputKey: values["output-key"],
|
|
2549
|
+
noMeta: values["no-meta"]
|
|
2550
|
+
});
|
|
2551
|
+
} catch (err) {
|
|
2552
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
2553
|
+
fatal(message);
|
|
2554
|
+
}
|
|
2555
|
+
}
|
|
2556
|
+
main();
|