File tree Expand file tree Collapse file tree
packages/components/nodes/tools/Gmail Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,6 +38,13 @@ const CreateDraftSchema = z.object({
3838 bcc : z . string ( ) . optional ( ) . describe ( 'BCC email address(es), comma-separated' )
3939} )
4040
41+ const UpdateDraftSchema = CreateDraftSchema . extend ( {
42+ id : z
43+ . string ( )
44+ . regex ( / ^ [ A - Z a - z 0 - 9 _ - ] + $ / , 'Draft ID must contain only URL-safe characters' )
45+ . describe ( 'ID of the draft to update' )
46+ } )
47+
4148const SendMessageSchema = z . object ( {
4249 to : z . string ( ) . describe ( 'Recipient email address(es), comma-separated' ) ,
4350 subject : z . string ( ) . optional ( ) . describe ( 'Email subject' ) ,
@@ -222,7 +229,7 @@ class UpdateDraftTool extends BaseGmailTool {
222229 const toolInput = {
223230 name : 'update_draft' ,
224231 description : 'Update a specific draft in Gmail' ,
225- schema : CreateDraftSchema ,
232+ schema : UpdateDraftSchema ,
226233 baseUrl : 'https://gmail.googleapis.com/gmail/v1/users/me/drafts' ,
227234 method : 'PUT' ,
228235 headers : { }
You can’t perform that action at this time.
0 commit comments