@@ -168,7 +168,7 @@ const ToolSelect = forwardRef<
168168 }
169169 } ;
170170
171- } else if ( key . toLowerCase ( ) === 'google gmail' ) {
171+ } else if ( key . toLowerCase ( ) === 'google gmail mcp ' ) {
172172 onInstall = async ( ) => {
173173 try {
174174 const response = await fetchPost ( "/install/tool/google_gmail" ) ;
@@ -177,13 +177,13 @@ const ToolSelect = forwardRef<
177177 const existingConfigs = await proxyFetchGet ( "/api/configs" ) ;
178178 const existing = Array . isArray ( existingConfigs )
179179 ? existingConfigs . find ( ( c : any ) =>
180- c . config_group ?. toLowerCase ( ) === "google gmail" &&
180+ c . config_group ?. toLowerCase ( ) === "google gmail mcp " &&
181181 c . config_name === "GOOGLE_REFRESH_TOKEN"
182182 )
183183 : null ;
184184
185185 const configPayload = {
186- config_group : "Google Gmail" ,
186+ config_group : "Google Gmail MCP" , //According to backend config
187187 config_name : "GOOGLE_REFRESH_TOKEN" ,
188188 config_value : "exists" ,
189189 } ;
@@ -197,7 +197,7 @@ const ToolSelect = forwardRef<
197197 console . log ( "Google Gmail installed successfully" ) ;
198198 // After successful installation, add to selected tools
199199 const gmailItem = {
200- id : 0 , // Use 0 for integration items
200+ id : 1 , // Use 1 for integration items
201201 key : key ,
202202 name : key ,
203203 description : "Google Gmail integration for managing emails and contacts" ,
@@ -244,7 +244,7 @@ const ToolSelect = forwardRef<
244244 ? t ( "layout.notion-workspace-integration" )
245245 : key . toLowerCase ( ) === 'google calendar'
246246 ? t ( "layout.google-calendar-integration" )
247- : key . toLowerCase ( ) === 'google gmail'
247+ : key . toLowerCase ( ) === 'google gmail mcp '
248248 ? "Google Gmail integration for managing emails and contacts"
249249 : "" ,
250250 onInstall,
@@ -522,7 +522,7 @@ const ToolSelect = forwardRef<
522522 }
523523
524524 // Trigger instantiation for Gmail
525- if ( activeMcp . key === "Gmail" ) {
525+ if ( activeMcp . key === "Google Gmail MCP " ) {
526526 console . log ( "[ToolSelect installMcp] Starting Gmail installation" ) ;
527527 try {
528528 const response = await fetchPost ( "/install/tool/google_gmail" ) ;
@@ -533,13 +533,13 @@ const ToolSelect = forwardRef<
533533 const existingConfigs = await proxyFetchGet ( "/api/configs" ) ;
534534 const existing = Array . isArray ( existingConfigs )
535535 ? existingConfigs . find ( ( c : any ) =>
536- c . config_group ?. toLowerCase ( ) === "gmail" &&
536+ c . config_group ?. toLowerCase ( ) === "google gmail mcp " &&
537537 c . config_name === "GOOGLE_REFRESH_TOKEN"
538538 )
539539 : null ;
540540
541541 const configPayload = {
542- config_group : "Gmail" ,
542+ config_group : "Google Gmail MCP " ,
543543 config_name : "GOOGLE_REFRESH_TOKEN" ,
544544 config_value : "exists" ,
545545 } ;
@@ -558,7 +558,7 @@ const ToolSelect = forwardRef<
558558 key : activeMcp . key ,
559559 name : activeMcp . name ,
560560 description : "Gmail integration for managing emails, drafts, labels, and contacts" ,
561- toolkit : "google_gmail_toolkit " ,
561+ toolkit : "google_gmail_native_toolkit " ,
562562 isLocal : true
563563 } ;
564564 addOption ( selectedItem , true ) ;
@@ -585,13 +585,13 @@ const ToolSelect = forwardRef<
585585 const existingConfigs = await proxyFetchGet ( "/api/configs" ) ;
586586 const existing = Array . isArray ( existingConfigs )
587587 ? existingConfigs . find ( ( c : any ) =>
588- c . config_group ?. toLowerCase ( ) === "gmail" &&
588+ c . config_group ?. toLowerCase ( ) === "google gmail mcp " &&
589589 c . config_name === "GOOGLE_REFRESH_TOKEN"
590590 )
591591 : null ;
592592
593593 const configPayload = {
594- config_group : "Gmail" ,
594+ config_group : "Google Gmail MCP " ,
595595 config_name : "GOOGLE_REFRESH_TOKEN" ,
596596 config_value : "exists" ,
597597 } ;
0 commit comments