@mindstudio-ai/agent 0.1.0 → 0.1.3

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,29 @@ 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
+ };
643
+ proto.changeName = function(displayName) {
644
+ return this._request("POST", "/account/change-name", { displayName }).then(() => {
645
+ });
646
+ };
647
+ proto.changeProfilePicture = function(profilePictureUrl) {
648
+ return this._request("POST", "/account/change-profile-picture", { profilePictureUrl }).then(() => {
649
+ });
650
+ };
651
+ proto.uploadFile = async function(content, options) {
652
+ const { data } = await this._request("POST", "/account/upload", { extension: options.extension, ...options.type != null && { type: options.type } });
653
+ const { uploadUrl, url } = data;
654
+ const buf = content.buffer.slice(content.byteOffset, content.byteOffset + content.byteLength);
655
+ const res = await fetch(uploadUrl, {
656
+ method: "PUT",
657
+ body: buf,
658
+ headers: options.type ? { "Content-Type": options.type } : {}
659
+ });
660
+ if (!res.ok) throw new Error(`Upload failed: ${res.status} ${res.statusText}`);
661
+ return { url };
662
+ };
610
663
  }
611
664
 
612
665
  // src/client.ts
@@ -800,6 +853,7 @@ var monacoSnippets = {
800
853
  "codaGetTableRows": { fields: [["docId", "string"], ["tableId", "string"]], outputKeys: ["rows"] },
801
854
  "convertPdfToImages": { fields: [["pdfUrl", "string"]], outputKeys: ["imageUrls"] },
802
855
  "createDataSource": { fields: [["name", "string"]], outputKeys: [] },
856
+ "createGmailDraft": { fields: [["to", "string"], ["subject", "string"], ["message", "string"], ["messageType", ["plain", "html", "markdown"]]], outputKeys: ["draftId"] },
803
857
  "createGoogleCalendarEvent": { fields: [["summary", "string"], ["startDateTime", "string"], ["endDateTime", "string"]], outputKeys: ["eventId", "htmlLink"] },
804
858
  "createGoogleDoc": { fields: [["title", "string"], ["text", "string"], ["textType", ["plain", "html", "markdown"]]], outputKeys: ["documentUrl"] },
805
859
  "createGoogleSheet": { fields: [["title", "string"], ["text", "string"]], outputKeys: ["spreadsheetUrl"] },
@@ -836,8 +890,10 @@ var monacoSnippets = {
836
890
  "generateStaticVideoFromImage": { fields: [["imageUrl", "string"], ["duration", "string"]], outputKeys: ["videoUrl"] },
837
891
  "generateText": { fields: [["message", "string"]], outputKeys: ["content"] },
838
892
  "generateVideo": { fields: [["prompt", "string"]], outputKeys: ["videoUrl"] },
893
+ "getGmailAttachments": { fields: [["messageId", "string"]], outputKeys: [] },
839
894
  "getGmailDraft": { fields: [["draftId", "string"]], outputKeys: ["draftId", "messageId", "subject", "to", "from", "body"] },
840
895
  "getGmailEmail": { fields: [["messageId", "string"]], outputKeys: ["messageId", "subject", "from", "to", "date", "body", "labels"] },
896
+ "getGmailUnreadCount": { fields: [], outputKeys: [] },
841
897
  "getGoogleCalendarEvent": { fields: [["eventId", "string"], ["exportType", ["json", "text"]]], outputKeys: ["event"] },
842
898
  "getGoogleDriveFile": { fields: [["fileId", "string"]], outputKeys: ["url", "name", "mimeType", "size"] },
843
899
  "getGoogleSheetInfo": { fields: [["documentId", "string"]], outputKeys: ["title", "sheets"] },
@@ -857,8 +913,10 @@ var monacoSnippets = {
857
913
  "insertVideoClips": { fields: [["baseVideoUrl", "string"], ["overlayVideos", "array"]], outputKeys: ["videoUrl"] },
858
914
  "listDataSources": { fields: [], outputKeys: [] },
859
915
  "listGmailDrafts": { fields: [["exportType", ["json", "text"]]], outputKeys: ["drafts"] },
916
+ "listGmailLabels": { fields: [], outputKeys: [] },
860
917
  "listGoogleCalendarEvents": { fields: [["limit", "number"], ["exportType", ["json", "text"]]], outputKeys: ["events"] },
861
918
  "listGoogleDriveFiles": { fields: [["exportType", ["json", "text"]]], outputKeys: ["files"] },
919
+ "listRecentGmailEmails": { fields: [["exportType", ["json", "text"]], ["limit", "string"]], outputKeys: [] },
862
920
  "logic": { fields: [["context", "string"], ["cases", "array"]], outputKeys: ["selectedCase"] },
863
921
  "makeDotComRunScenario": { fields: [["webhookUrl", "string"], ["input", "object"]], outputKeys: ["data"] },
864
922
  "mergeAudio": { fields: [["mp3Urls", "array"]], outputKeys: ["audioUrl"] },
@@ -894,6 +952,7 @@ var monacoSnippets = {
894
952
  "scrapeUrl": { fields: [["url", "string"]], outputKeys: ["content"] },
895
953
  "scrapeXPost": { fields: [["url", "string"]], outputKeys: ["post"] },
896
954
  "scrapeXProfile": { fields: [["url", "string"]], outputKeys: ["profile"] },
955
+ "searchGmailEmails": { fields: [["query", "string"], ["exportType", ["json", "text"]], ["limit", "string"]], outputKeys: ["emails"] },
897
956
  "searchGoogle": { fields: [["query", "string"], ["exportType", ["text", "json"]]], outputKeys: ["results"] },
898
957
  "searchGoogleCalendarEvents": { fields: [["exportType", ["json", "text"]]], outputKeys: ["events"] },
899
958
  "searchGoogleDrive": { fields: [["query", "string"], ["exportType", ["json", "text"]]], outputKeys: ["files"] },
@@ -905,7 +964,10 @@ var monacoSnippets = {
905
964
  "searchYoutube": { fields: [["query", "string"], ["limitPages", "string"], ["filter", "string"], ["filterType", "string"]], outputKeys: ["results"] },
906
965
  "searchYoutubeTrends": { fields: [["bp", ["now", "music", "gaming", "films"]], ["hl", "string"], ["gl", "string"]], outputKeys: ["trends"] },
907
966
  "sendEmail": { fields: [["subject", "string"], ["body", "string"]], outputKeys: ["recipients"] },
967
+ "sendGmailDraft": { fields: [["draftId", "string"]], outputKeys: [] },
968
+ "sendGmailMessage": { fields: [["to", "string"], ["subject", "string"], ["message", "string"], ["messageType", ["plain", "html", "markdown"]]], outputKeys: ["messageId"] },
908
969
  "sendSMS": { fields: [["body", "string"]], outputKeys: [] },
970
+ "setGmailReadStatus": { fields: [["messageIds", "string"], ["markAsRead", "boolean"]], outputKeys: [] },
909
971
  "setRunTitle": { fields: [["title", "string"]], outputKeys: [] },
910
972
  "setVariable": { fields: [["value", "string"]], outputKeys: [] },
911
973
  "telegramEditMessage": { fields: [["botToken", "string"], ["chatId", "string"], ["messageId", "string"], ["text", "string"]], outputKeys: [] },
@@ -919,6 +981,7 @@ var monacoSnippets = {
919
981
  "textToSpeech": { fields: [["text", "string"]], outputKeys: ["audioUrl"] },
920
982
  "transcribeAudio": { fields: [["audioUrl", "string"], ["prompt", "string"]], outputKeys: ["text"] },
921
983
  "trimMedia": { fields: [["inputUrl", "string"]], outputKeys: ["mediaUrl"] },
984
+ "updateGmailLabels": { fields: [["query", "string"], ["messageIds", "string"], ["addLabelIds", "string"], ["removeLabelIds", "string"]], outputKeys: ["updatedMessageIds"] },
922
985
  "updateGoogleCalendarEvent": { fields: [["eventId", "string"]], outputKeys: ["eventId", "htmlLink"] },
923
986
  "updateGoogleDoc": { fields: [["documentId", "string"], ["text", "string"], ["textType", ["plain", "html", "markdown"]], ["operationType", ["addToTop", "addToBottom", "overwrite"]]], outputKeys: ["documentUrl"] },
924
987
  "updateGoogleSheet": { fields: [["text", "string"], ["spreadsheetId", "string"], ["range", "string"], ["operationType", ["addToBottom", "overwrite", "range"]]], outputKeys: ["spreadsheetUrl"] },
@@ -1058,6 +1121,15 @@ var stepMetadata = {
1058
1121
  inputSchema: { "type": "object", "properties": { "name": { "type": "string", "description": "Name for the new data source (supports variable interpolation)" } }, "required": ["name"] },
1059
1122
  outputSchema: { "description": "This step does not produce output data." }
1060
1123
  },
1124
+ "createGmailDraft": {
1125
+ stepType: "createGmailDraft",
1126
+ description: "Create a draft email in the connected Gmail account.",
1127
+ usageNotes: `- Requires a Google OAuth connection with Gmail compose scope.
1128
+ - The draft appears in the user's Gmail Drafts folder but is not sent.
1129
+ - messageType controls the body format: "plain" for plain text, "html" for raw HTML, "markdown" for auto-converted markdown.`,
1130
+ 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"] },
1131
+ outputSchema: { "type": "object", "properties": { "draftId": { "type": "string", "description": "Gmail draft ID" } }, "required": ["draftId"] }
1132
+ },
1061
1133
  "createGoogleCalendarEvent": {
1062
1134
  stepType: "createGoogleCalendarEvent",
1063
1135
  description: "Create a new event on a Google Calendar.",
@@ -1313,6 +1385,13 @@ var stepMetadata = {
1313
1385
  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
1386
  outputSchema: { "type": "object", "properties": { "videoUrl": { "anyOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }] } }, "required": ["videoUrl"] }
1315
1387
  },
1388
+ "getGmailAttachments": {
1389
+ stepType: "getGmailAttachments",
1390
+ description: "Download attachments from a Gmail email and re-host them on CDN.",
1391
+ 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.",
1392
+ inputSchema: { "type": "object", "properties": { "messageId": { "type": "string", "description": "Gmail message ID" }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" } }, "required": ["messageId"] },
1393
+ outputSchema: { "description": "This step does not produce output data." }
1394
+ },
1316
1395
  "getGmailDraft": {
1317
1396
  stepType: "getGmailDraft",
1318
1397
  description: "Retrieve a specific draft from Gmail by draft ID.",
@@ -1327,6 +1406,13 @@ var stepMetadata = {
1327
1406
  inputSchema: { "type": "object", "properties": { "messageId": { "type": "string", "description": "Gmail message ID to retrieve" }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" } }, "required": ["messageId"] },
1328
1407
  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
1408
  },
1409
+ "getGmailUnreadCount": {
1410
+ stepType: "getGmailUnreadCount",
1411
+ description: "Get the number of unread emails in the connected Gmail inbox.",
1412
+ 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.",
1413
+ inputSchema: { "type": "object", "properties": { "connectionId": { "type": "string", "description": "Google OAuth connection ID" } } },
1414
+ outputSchema: { "description": "This step does not produce output data." }
1415
+ },
1330
1416
  "getGoogleCalendarEvent": {
1331
1417
  stepType: "getGoogleCalendarEvent",
1332
1418
  description: "Retrieve a specific event from a Google Calendar by event ID.",
@@ -1460,6 +1546,13 @@ var stepMetadata = {
1460
1546
  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
1547
  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
1548
  },
1549
+ "listGmailLabels": {
1550
+ stepType: "listGmailLabels",
1551
+ description: "List all labels in the connected Gmail account. Use these label IDs or names with the Update Gmail Labels step.",
1552
+ 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.',
1553
+ inputSchema: { "type": "object", "properties": { "connectionId": { "type": "string", "description": "Google OAuth connection ID" } } },
1554
+ outputSchema: { "description": "This step does not produce output data." }
1555
+ },
1463
1556
  "listGoogleCalendarEvents": {
1464
1557
  stepType: "listGoogleCalendarEvents",
1465
1558
  description: "List upcoming events from a Google Calendar, ordered by start time.",
@@ -1474,6 +1567,13 @@ var stepMetadata = {
1474
1567
  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
1568
  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
1569
  },
1570
+ "listRecentGmailEmails": {
1571
+ stepType: "listRecentGmailEmails",
1572
+ description: "List recent emails from the connected Gmail inbox.",
1573
+ 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.',
1574
+ 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"] },
1575
+ outputSchema: { "description": "This step does not produce output data." }
1576
+ },
1477
1577
  "logic": {
1478
1578
  stepType: "logic",
1479
1579
  description: "Route execution to different branches based on AI evaluation, comparison operators, or workflow jumps.",
@@ -1725,6 +1825,13 @@ var stepMetadata = {
1725
1825
  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
1826
  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
1827
  },
1828
+ "searchGmailEmails": {
1829
+ stepType: "searchGmailEmails",
1830
+ description: "Search for emails in the connected Gmail account using a Gmail search query. To list recent inbox emails, pass an empty query string.",
1831
+ 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.',
1832
+ 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"] },
1833
+ 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"] }
1834
+ },
1728
1835
  "searchGoogle": {
1729
1836
  stepType: "searchGoogle",
1730
1837
  description: "Search the web using Google and return structured results.",
@@ -1802,6 +1909,20 @@ var stepMetadata = {
1802
1909
  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
1910
  outputSchema: { "type": "object", "properties": { "recipients": { "type": "array", "items": { "type": "string" }, "description": "Email addresses the message was sent to" } }, "required": ["recipients"] }
1804
1911
  },
1912
+ "sendGmailDraft": {
1913
+ stepType: "sendGmailDraft",
1914
+ description: "Send an existing draft from the connected Gmail account.",
1915
+ 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.",
1916
+ inputSchema: { "type": "object", "properties": { "draftId": { "type": "string", "description": "Gmail draft ID to send" }, "connectionId": { "type": "string", "description": "Google OAuth connection ID" } }, "required": ["draftId"] },
1917
+ outputSchema: { "description": "This step does not produce output data." }
1918
+ },
1919
+ "sendGmailMessage": {
1920
+ stepType: "sendGmailMessage",
1921
+ description: "Send an email from the connected Gmail account.",
1922
+ 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.',
1923
+ 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"] },
1924
+ outputSchema: { "type": "object", "properties": { "messageId": { "type": "string", "description": "Gmail message ID of the sent email" } }, "required": ["messageId"] }
1925
+ },
1805
1926
  "sendSMS": {
1806
1927
  stepType: "sendSMS",
1807
1928
  description: "Send an SMS or MMS message to a phone number configured via OAuth connection.",
@@ -1809,6 +1930,13 @@ var stepMetadata = {
1809
1930
  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
1931
  outputSchema: { "description": "This step does not produce output data." }
1811
1932
  },
1933
+ "setGmailReadStatus": {
1934
+ stepType: "setGmailReadStatus",
1935
+ description: "Mark one or more Gmail emails as read or unread.",
1936
+ 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.",
1937
+ 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"] },
1938
+ outputSchema: { "description": "This step does not produce output data." }
1939
+ },
1812
1940
  "setRunTitle": {
1813
1941
  stepType: "setRunTitle",
1814
1942
  description: "Set the title of the agent run for the user's history",
@@ -1900,6 +2028,13 @@ var stepMetadata = {
1900
2028
  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
2029
  outputSchema: { "type": "object", "properties": { "mediaUrl": { "type": "string", "description": "URL of the trimmed media file" } }, "required": ["mediaUrl"] }
1902
2030
  },
2031
+ "updateGmailLabels": {
2032
+ stepType: "updateGmailLabels",
2033
+ description: "Add or remove labels on Gmail messages, identified by message IDs or a search query.",
2034
+ 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.",
2035
+ 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"] },
2036
+ outputSchema: { "type": "object", "properties": { "updatedMessageIds": { "type": "array", "items": { "type": "string" }, "description": "Gmail message IDs that were updated" } }, "required": ["updatedMessageIds"] }
2037
+ },
1903
2038
  "updateGoogleCalendarEvent": {
1904
2039
  stepType: "updateGoogleCalendarEvent",
1905
2040
  description: "Update an existing event on a Google Calendar. Only specified fields are changed.",