@mindstudio-ai/agent 0.1.0 → 0.1.1

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/dist/index.js CHANGED
@@ -191,6 +191,9 @@ function applyStepMethods(AgentClass) {
191
191
  proto.createDataSource = function(step, options) {
192
192
  return this.executeStep("createDataSource", step, options);
193
193
  };
194
+ proto.createGmailDraft = function(step, options) {
195
+ return this.executeStep("createGmailDraft", step, options);
196
+ };
194
197
  proto.createGoogleCalendarEvent = function(step, options) {
195
198
  return this.executeStep("createGoogleCalendarEvent", step, options);
196
199
  };
@@ -293,12 +296,18 @@ function applyStepMethods(AgentClass) {
293
296
  proto.generateVideo = function(step, options) {
294
297
  return this.executeStep("generateVideo", step, options);
295
298
  };
299
+ proto.getGmailAttachments = function(step, options) {
300
+ return this.executeStep("getGmailAttachments", step, options);
301
+ };
296
302
  proto.getGmailDraft = function(step, options) {
297
303
  return this.executeStep("getGmailDraft", step, options);
298
304
  };
299
305
  proto.getGmailEmail = function(step, options) {
300
306
  return this.executeStep("getGmailEmail", step, options);
301
307
  };
308
+ proto.getGmailUnreadCount = function(step, options) {
309
+ return this.executeStep("getGmailUnreadCount", step, options);
310
+ };
302
311
  proto.getGoogleCalendarEvent = function(step, options) {
303
312
  return this.executeStep("getGoogleCalendarEvent", step, options);
304
313
  };
@@ -356,12 +365,18 @@ function applyStepMethods(AgentClass) {
356
365
  proto.listGmailDrafts = function(step, options) {
357
366
  return this.executeStep("listGmailDrafts", step, options);
358
367
  };
368
+ proto.listGmailLabels = function(step, options) {
369
+ return this.executeStep("listGmailLabels", step, options);
370
+ };
359
371
  proto.listGoogleCalendarEvents = function(step, options) {
360
372
  return this.executeStep("listGoogleCalendarEvents", step, options);
361
373
  };
362
374
  proto.listGoogleDriveFiles = function(step, options) {
363
375
  return this.executeStep("listGoogleDriveFiles", step, options);
364
376
  };
377
+ proto.listRecentGmailEmails = function(step, options) {
378
+ return this.executeStep("listRecentGmailEmails", step, options);
379
+ };
365
380
  proto.logic = function(step, options) {
366
381
  return this.executeStep("logic", step, options);
367
382
  };
@@ -467,6 +482,9 @@ function applyStepMethods(AgentClass) {
467
482
  proto.scrapeXProfile = function(step, options) {
468
483
  return this.executeStep("scrapeXProfile", step, options);
469
484
  };
485
+ proto.searchGmailEmails = function(step, options) {
486
+ return this.executeStep("searchGmailEmails", step, options);
487
+ };
470
488
  proto.searchGoogle = function(step, options) {
471
489
  return this.executeStep("searchGoogle", step, options);
472
490
  };
@@ -500,9 +518,18 @@ function applyStepMethods(AgentClass) {
500
518
  proto.sendEmail = function(step, options) {
501
519
  return this.executeStep("sendEmail", step, options);
502
520
  };
521
+ proto.sendGmailDraft = function(step, options) {
522
+ return this.executeStep("sendGmailDraft", step, options);
523
+ };
524
+ proto.sendGmailMessage = function(step, options) {
525
+ return this.executeStep("sendGmailMessage", step, options);
526
+ };
503
527
  proto.sendSMS = function(step, options) {
504
528
  return this.executeStep("sendSMS", step, options);
505
529
  };
530
+ proto.setGmailReadStatus = function(step, options) {
531
+ return this.executeStep("setGmailReadStatus", step, options);
532
+ };
506
533
  proto.setRunTitle = function(step, options) {
507
534
  return this.executeStep("setRunTitle", step, options);
508
535
  };
@@ -542,6 +569,9 @@ function applyStepMethods(AgentClass) {
542
569
  proto.trimMedia = function(step, options) {
543
570
  return this.executeStep("trimMedia", step, options);
544
571
  };
572
+ proto.updateGmailLabels = function(step, options) {
573
+ return this.executeStep("updateGmailLabels", step, options);
574
+ };
545
575
  proto.updateGoogleCalendarEvent = function(step, options) {
546
576
  return this.executeStep("updateGoogleCalendarEvent", step, options);
547
577
  };
@@ -607,6 +637,9 @@ function applyHelperMethods(AgentClass) {
607
637
  proto.listConnections = function() {
608
638
  return this._request("GET", "/helpers/connections").then((r) => r.data);
609
639
  };
640
+ proto.estimateStepCost = function(stepType, step, options) {
641
+ return this._request("POST", "/helpers/step-cost-estimate", { step: { type: stepType, ...step }, ...options }).then((r) => r.data);
642
+ };
610
643
  }
611
644
 
612
645
  // src/client.ts
@@ -800,6 +833,7 @@ var monacoSnippets = {
800
833
  "codaGetTableRows": { fields: [["docId", "string"], ["tableId", "string"]], outputKeys: ["rows"] },
801
834
  "convertPdfToImages": { fields: [["pdfUrl", "string"]], outputKeys: ["imageUrls"] },
802
835
  "createDataSource": { fields: [["name", "string"]], outputKeys: [] },
836
+ "createGmailDraft": { fields: [["to", "string"], ["subject", "string"], ["message", "string"], ["messageType", ["plain", "html", "markdown"]]], outputKeys: ["draftId"] },
803
837
  "createGoogleCalendarEvent": { fields: [["summary", "string"], ["startDateTime", "string"], ["endDateTime", "string"]], outputKeys: ["eventId", "htmlLink"] },
804
838
  "createGoogleDoc": { fields: [["title", "string"], ["text", "string"], ["textType", ["plain", "html", "markdown"]]], outputKeys: ["documentUrl"] },
805
839
  "createGoogleSheet": { fields: [["title", "string"], ["text", "string"]], outputKeys: ["spreadsheetUrl"] },
@@ -836,8 +870,10 @@ var monacoSnippets = {
836
870
  "generateStaticVideoFromImage": { fields: [["imageUrl", "string"], ["duration", "string"]], outputKeys: ["videoUrl"] },
837
871
  "generateText": { fields: [["message", "string"]], outputKeys: ["content"] },
838
872
  "generateVideo": { fields: [["prompt", "string"]], outputKeys: ["videoUrl"] },
873
+ "getGmailAttachments": { fields: [["messageId", "string"]], outputKeys: [] },
839
874
  "getGmailDraft": { fields: [["draftId", "string"]], outputKeys: ["draftId", "messageId", "subject", "to", "from", "body"] },
840
875
  "getGmailEmail": { fields: [["messageId", "string"]], outputKeys: ["messageId", "subject", "from", "to", "date", "body", "labels"] },
876
+ "getGmailUnreadCount": { fields: [], outputKeys: [] },
841
877
  "getGoogleCalendarEvent": { fields: [["eventId", "string"], ["exportType", ["json", "text"]]], outputKeys: ["event"] },
842
878
  "getGoogleDriveFile": { fields: [["fileId", "string"]], outputKeys: ["url", "name", "mimeType", "size"] },
843
879
  "getGoogleSheetInfo": { fields: [["documentId", "string"]], outputKeys: ["title", "sheets"] },
@@ -857,8 +893,10 @@ var monacoSnippets = {
857
893
  "insertVideoClips": { fields: [["baseVideoUrl", "string"], ["overlayVideos", "array"]], outputKeys: ["videoUrl"] },
858
894
  "listDataSources": { fields: [], outputKeys: [] },
859
895
  "listGmailDrafts": { fields: [["exportType", ["json", "text"]]], outputKeys: ["drafts"] },
896
+ "listGmailLabels": { fields: [], outputKeys: [] },
860
897
  "listGoogleCalendarEvents": { fields: [["limit", "number"], ["exportType", ["json", "text"]]], outputKeys: ["events"] },
861
898
  "listGoogleDriveFiles": { fields: [["exportType", ["json", "text"]]], outputKeys: ["files"] },
899
+ "listRecentGmailEmails": { fields: [["exportType", ["json", "text"]], ["limit", "string"]], outputKeys: [] },
862
900
  "logic": { fields: [["context", "string"], ["cases", "array"]], outputKeys: ["selectedCase"] },
863
901
  "makeDotComRunScenario": { fields: [["webhookUrl", "string"], ["input", "object"]], outputKeys: ["data"] },
864
902
  "mergeAudio": { fields: [["mp3Urls", "array"]], outputKeys: ["audioUrl"] },
@@ -894,6 +932,7 @@ var monacoSnippets = {
894
932
  "scrapeUrl": { fields: [["url", "string"]], outputKeys: ["content"] },
895
933
  "scrapeXPost": { fields: [["url", "string"]], outputKeys: ["post"] },
896
934
  "scrapeXProfile": { fields: [["url", "string"]], outputKeys: ["profile"] },
935
+ "searchGmailEmails": { fields: [["query", "string"], ["exportType", ["json", "text"]], ["limit", "string"]], outputKeys: ["emails"] },
897
936
  "searchGoogle": { fields: [["query", "string"], ["exportType", ["text", "json"]]], outputKeys: ["results"] },
898
937
  "searchGoogleCalendarEvents": { fields: [["exportType", ["json", "text"]]], outputKeys: ["events"] },
899
938
  "searchGoogleDrive": { fields: [["query", "string"], ["exportType", ["json", "text"]]], outputKeys: ["files"] },
@@ -905,7 +944,10 @@ var monacoSnippets = {
905
944
  "searchYoutube": { fields: [["query", "string"], ["limitPages", "string"], ["filter", "string"], ["filterType", "string"]], outputKeys: ["results"] },
906
945
  "searchYoutubeTrends": { fields: [["bp", ["now", "music", "gaming", "films"]], ["hl", "string"], ["gl", "string"]], outputKeys: ["trends"] },
907
946
  "sendEmail": { fields: [["subject", "string"], ["body", "string"]], outputKeys: ["recipients"] },
947
+ "sendGmailDraft": { fields: [["draftId", "string"]], outputKeys: [] },
948
+ "sendGmailMessage": { fields: [["to", "string"], ["subject", "string"], ["message", "string"], ["messageType", ["plain", "html", "markdown"]]], outputKeys: ["messageId"] },
908
949
  "sendSMS": { fields: [["body", "string"]], outputKeys: [] },
950
+ "setGmailReadStatus": { fields: [["messageIds", "string"], ["markAsRead", "boolean"]], outputKeys: [] },
909
951
  "setRunTitle": { fields: [["title", "string"]], outputKeys: [] },
910
952
  "setVariable": { fields: [["value", "string"]], outputKeys: [] },
911
953
  "telegramEditMessage": { fields: [["botToken", "string"], ["chatId", "string"], ["messageId", "string"], ["text", "string"]], outputKeys: [] },
@@ -919,6 +961,7 @@ var monacoSnippets = {
919
961
  "textToSpeech": { fields: [["text", "string"]], outputKeys: ["audioUrl"] },
920
962
  "transcribeAudio": { fields: [["audioUrl", "string"], ["prompt", "string"]], outputKeys: ["text"] },
921
963
  "trimMedia": { fields: [["inputUrl", "string"]], outputKeys: ["mediaUrl"] },
964
+ "updateGmailLabels": { fields: [["query", "string"], ["messageIds", "string"], ["addLabelIds", "string"], ["removeLabelIds", "string"]], outputKeys: ["updatedMessageIds"] },
922
965
  "updateGoogleCalendarEvent": { fields: [["eventId", "string"]], outputKeys: ["eventId", "htmlLink"] },
923
966
  "updateGoogleDoc": { fields: [["documentId", "string"], ["text", "string"], ["textType", ["plain", "html", "markdown"]], ["operationType", ["addToTop", "addToBottom", "overwrite"]]], outputKeys: ["documentUrl"] },
924
967
  "updateGoogleSheet": { fields: [["text", "string"], ["spreadsheetId", "string"], ["range", "string"], ["operationType", ["addToBottom", "overwrite", "range"]]], outputKeys: ["spreadsheetUrl"] },
@@ -1058,6 +1101,15 @@ var stepMetadata = {
1058
1101
  inputSchema: { "type": "object", "properties": { "name": { "type": "string", "description": "Name for the new data source (supports variable interpolation)" } }, "required": ["name"] },
1059
1102
  outputSchema: { "description": "This step does not produce output data." }
1060
1103
  },
1104
+ "createGmailDraft": {
1105
+ stepType: "createGmailDraft",
1106
+ description: "Create a draft email in the connected Gmail account.",
1107
+ usageNotes: `- Requires a Google OAuth connection with Gmail compose scope.
1108
+ - The draft appears in the user's Gmail Drafts folder but is not sent.
1109
+ - messageType controls the body format: "plain" for plain text, "html" for raw HTML, "markdown" for auto-converted markdown.`,
1110
+ inputSchema: { "type": "object", "properties": { "to": { "type": "string", "description": "Recipient email address(es), comma-separated for multiple" }, "subject": { "type": "string", "description": "Email subject line" }, "message": { "type": "string", "description": "Email body content" }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" }, "messageType": { "enum": ["plain", "html", "markdown"], "type": "string", "description": 'Body format: "plain", "html", or "markdown"' } }, "required": ["to", "subject", "message", "messageType"] },
1111
+ outputSchema: { "type": "object", "properties": { "draftId": { "type": "string", "description": "Gmail draft ID" } }, "required": ["draftId"] }
1112
+ },
1061
1113
  "createGoogleCalendarEvent": {
1062
1114
  stepType: "createGoogleCalendarEvent",
1063
1115
  description: "Create a new event on a Google Calendar.",
@@ -1313,6 +1365,13 @@ var stepMetadata = {
1313
1365
  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"] },
1314
1366
  outputSchema: { "type": "object", "properties": { "videoUrl": { "anyOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }] } }, "required": ["videoUrl"] }
1315
1367
  },
1368
+ "getGmailAttachments": {
1369
+ stepType: "getGmailAttachments",
1370
+ description: "Download attachments from a Gmail email and re-host them on CDN.",
1371
+ usageNotes: "- Requires a Google OAuth connection with Gmail readonly scope.\n- Attachments are uploaded to CDN and returned as URLs.\n- Attachments larger than 25MB are skipped.\n- Use the message ID from Search Gmail Emails, List Recent Gmail Emails, or Get Gmail Email steps.",
1372
+ inputSchema: { "type": "object", "properties": { "messageId": { "type": "string", "description": "Gmail message ID" }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" } }, "required": ["messageId"] },
1373
+ outputSchema: { "description": "This step does not produce output data." }
1374
+ },
1316
1375
  "getGmailDraft": {
1317
1376
  stepType: "getGmailDraft",
1318
1377
  description: "Retrieve a specific draft from Gmail by draft ID.",
@@ -1327,6 +1386,13 @@ var stepMetadata = {
1327
1386
  inputSchema: { "type": "object", "properties": { "messageId": { "type": "string", "description": "Gmail message ID to retrieve" }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" } }, "required": ["messageId"] },
1328
1387
  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"] }
1329
1388
  },
1389
+ "getGmailUnreadCount": {
1390
+ stepType: "getGmailUnreadCount",
1391
+ description: "Get the number of unread emails in the connected Gmail inbox.",
1392
+ usageNotes: "- Requires a Google OAuth connection with Gmail readonly scope.\n- Returns the unread message count for the inbox label.\n- This is a lightweight call that does not fetch any email content.",
1393
+ inputSchema: { "type": "object", "properties": { "connectionId": { "type": "string", "description": "Google OAuth connection ID" } } },
1394
+ outputSchema: { "description": "This step does not produce output data." }
1395
+ },
1330
1396
  "getGoogleCalendarEvent": {
1331
1397
  stepType: "getGoogleCalendarEvent",
1332
1398
  description: "Retrieve a specific event from a Google Calendar by event ID.",
@@ -1460,6 +1526,13 @@ var stepMetadata = {
1460
1526
  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"] },
1461
1527
  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"] }
1462
1528
  },
1529
+ "listGmailLabels": {
1530
+ stepType: "listGmailLabels",
1531
+ description: "List all labels in the connected Gmail account. Use these label IDs or names with the Update Gmail Labels step.",
1532
+ usageNotes: '- Requires a Google OAuth connection with Gmail readonly scope.\n- Returns both system labels (INBOX, SENT, TRASH, etc.) and user-created labels.\n- Label type is "system" for built-in labels or "user" for custom labels.',
1533
+ inputSchema: { "type": "object", "properties": { "connectionId": { "type": "string", "description": "Google OAuth connection ID" } } },
1534
+ outputSchema: { "description": "This step does not produce output data." }
1535
+ },
1463
1536
  "listGoogleCalendarEvents": {
1464
1537
  stepType: "listGoogleCalendarEvents",
1465
1538
  description: "List upcoming events from a Google Calendar, ordered by start time.",
@@ -1474,6 +1547,13 @@ var stepMetadata = {
1474
1547
  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"] },
1475
1548
  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"] }
1476
1549
  },
1550
+ "listRecentGmailEmails": {
1551
+ stepType: "listRecentGmailEmails",
1552
+ description: "List recent emails from the connected Gmail inbox.",
1553
+ usageNotes: '- Requires a Google OAuth connection with Gmail readonly scope.\n- Returns up to 100 emails (default 5), ordered by most recent first.\n- Functionally equivalent to Search Gmail Emails with an "in:inbox" query.',
1554
+ inputSchema: { "type": "object", "properties": { "connectionId": { "type": "string", "description": "Google OAuth connection ID" }, "exportType": { "enum": ["json", "text"], "type": "string", "description": 'Format for the variable output: "json" or "text"' }, "limit": { "type": "string", "description": "Maximum number of emails to return (1-100, default: 5)" } }, "required": ["exportType", "limit"] },
1555
+ outputSchema: { "description": "This step does not produce output data." }
1556
+ },
1477
1557
  "logic": {
1478
1558
  stepType: "logic",
1479
1559
  description: "Route execution to different branches based on AI evaluation, comparison operators, or workflow jumps.",
@@ -1725,6 +1805,13 @@ var stepMetadata = {
1725
1805
  inputSchema: { "type": "object", "properties": { "url": { "type": "string", "description": "Full URL or username for the X profile (e.g. https://x.com/elonmusk)" } }, "required": ["url"] },
1726
1806
  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"] }
1727
1807
  },
1808
+ "searchGmailEmails": {
1809
+ stepType: "searchGmailEmails",
1810
+ description: "Search for emails in the connected Gmail account using a Gmail search query. To list recent inbox emails, pass an empty query string.",
1811
+ usageNotes: '- Requires a Google OAuth connection with Gmail readonly scope.\n- Uses Gmail search syntax (e.g. "from:user@example.com", "subject:invoice", "is:unread").\n- To list recent inbox emails, use an empty query string or "in:inbox".\n- Returns up to 100 emails (default 5). The variable receives text or JSON depending on exportType.\n- The direct execution output always returns structured email objects.',
1812
+ inputSchema: { "type": "object", "properties": { "query": { "type": "string", "description": 'Gmail search query (e.g. "from:user@example.com", "subject:invoice", "is:unread")' }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" }, "exportType": { "enum": ["json", "text"], "type": "string", "description": 'Format for the variable output: "json" or "text"' }, "limit": { "type": "string", "description": "Maximum number of emails to return (1-10, default: 5)" } }, "required": ["query", "exportType", "limit"] },
1813
+ outputSchema: { "type": "object", "properties": { "emails": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "Gmail message ID" }, "subject": { "type": "string", "description": "Email subject line" }, "from": { "type": "string", "description": "Sender email address" }, "to": { "type": "string", "description": "Recipient email address" }, "date": { "type": "string", "description": "Email date" }, "plainBody": { "type": "string", "description": "Plain text body content" }, "htmlBody": { "type": "string", "description": "HTML body content (if available)" }, "labels": { "type": "string", "description": "Comma-separated label IDs applied to the email" } }, "required": ["id", "subject", "from", "to", "date", "plainBody", "htmlBody", "labels"] }, "description": "List of matching email messages" } }, "required": ["emails"] }
1814
+ },
1728
1815
  "searchGoogle": {
1729
1816
  stepType: "searchGoogle",
1730
1817
  description: "Search the web using Google and return structured results.",
@@ -1802,6 +1889,20 @@ var stepMetadata = {
1802
1889
  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"] },
1803
1890
  outputSchema: { "type": "object", "properties": { "recipients": { "type": "array", "items": { "type": "string" }, "description": "Email addresses the message was sent to" } }, "required": ["recipients"] }
1804
1891
  },
1892
+ "sendGmailDraft": {
1893
+ stepType: "sendGmailDraft",
1894
+ description: "Send an existing draft from the connected Gmail account.",
1895
+ usageNotes: "- Requires a Google OAuth connection with Gmail compose scope.\n- The draft is sent and removed from the Drafts folder.\n- Use the draft ID returned by the Create Gmail Draft or List Gmail Drafts steps.",
1896
+ inputSchema: { "type": "object", "properties": { "draftId": { "type": "string", "description": "Gmail draft ID to send" }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" } }, "required": ["draftId"] },
1897
+ outputSchema: { "description": "This step does not produce output data." }
1898
+ },
1899
+ "sendGmailMessage": {
1900
+ stepType: "sendGmailMessage",
1901
+ description: "Send an email from the connected Gmail account.",
1902
+ usageNotes: '- Requires a Google OAuth connection with Gmail compose scope.\n- messageType controls the body format: "plain" for plain text, "html" for raw HTML, "markdown" for auto-converted markdown.',
1903
+ inputSchema: { "type": "object", "properties": { "to": { "type": "string", "description": "Recipient email address(es), comma-separated for multiple" }, "subject": { "type": "string", "description": "Email subject line" }, "message": { "type": "string", "description": "Email body content" }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" }, "messageType": { "enum": ["plain", "html", "markdown"], "type": "string", "description": 'Body format: "plain", "html", or "markdown"' } }, "required": ["to", "subject", "message", "messageType"] },
1904
+ outputSchema: { "type": "object", "properties": { "messageId": { "type": "string", "description": "Gmail message ID of the sent email" } }, "required": ["messageId"] }
1905
+ },
1805
1906
  "sendSMS": {
1806
1907
  stepType: "sendSMS",
1807
1908
  description: "Send an SMS or MMS message to a phone number configured via OAuth connection.",
@@ -1809,6 +1910,13 @@ var stepMetadata = {
1809
1910
  inputSchema: { "type": "object", "properties": { "body": { "type": "string", "description": "SMS message body text" }, "connectionId": { "type": "string", "description": "OAuth connection ID for the recipient phone number" }, "mediaUrls": { "type": "array", "items": { "type": "string" }, "description": "Optional array of media URLs to send as MMS (up to 10, 5MB each)" } }, "required": ["body"] },
1810
1911
  outputSchema: { "description": "This step does not produce output data." }
1811
1912
  },
1913
+ "setGmailReadStatus": {
1914
+ stepType: "setGmailReadStatus",
1915
+ description: "Mark one or more Gmail emails as read or unread.",
1916
+ usageNotes: "- Requires a Google OAuth connection with Gmail modify scope.\n- Accepts one or more message IDs as a comma-separated string or array.\n- Set markAsRead to true to mark as read, false to mark as unread.",
1917
+ inputSchema: { "type": "object", "properties": { "messageIds": { "type": "string", "description": "Gmail message ID(s), comma-separated" }, "markAsRead": { "type": "boolean", "description": "true = mark as read, false = mark as unread" }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" } }, "required": ["messageIds", "markAsRead"] },
1918
+ outputSchema: { "description": "This step does not produce output data." }
1919
+ },
1812
1920
  "setRunTitle": {
1813
1921
  stepType: "setRunTitle",
1814
1922
  description: "Set the title of the agent run for the user's history",
@@ -1900,6 +2008,13 @@ var stepMetadata = {
1900
2008
  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"] },
1901
2009
  outputSchema: { "type": "object", "properties": { "mediaUrl": { "type": "string", "description": "URL of the trimmed media file" } }, "required": ["mediaUrl"] }
1902
2010
  },
2011
+ "updateGmailLabels": {
2012
+ stepType: "updateGmailLabels",
2013
+ description: "Add or remove labels on Gmail messages, identified by message IDs or a search query.",
2014
+ usageNotes: "- Requires a Google OAuth connection with Gmail modify scope.\n- Provide either a query (Gmail search syntax) or explicit messageIds to target messages.\n- Label IDs can be label names or Gmail label IDs \u2014 names are resolved automatically.",
2015
+ inputSchema: { "type": "object", "properties": { "query": { "type": "string", "description": "Gmail search query to find messages (alternative to messageIds)" }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" }, "messageIds": { "type": "string", "description": "Comma-separated message IDs to target (alternative to query)" }, "addLabelIds": { "type": "string", "description": "Comma-separated label names or IDs to add" }, "removeLabelIds": { "type": "string", "description": "Comma-separated label names or IDs to remove" } }, "required": ["query", "messageIds", "addLabelIds", "removeLabelIds"] },
2016
+ outputSchema: { "type": "object", "properties": { "updatedMessageIds": { "type": "array", "items": { "type": "string" }, "description": "Gmail message IDs that were updated" } }, "required": ["updatedMessageIds"] }
2017
+ },
1903
2018
  "updateGoogleCalendarEvent": {
1904
2019
  stepType: "updateGoogleCalendarEvent",
1905
2020
  description: "Update an existing event on a Google Calendar. Only specified fields are changed.",