@@ -128,6 +128,8 @@ export const RobotIntegrationPage = ({
128128 "googleSheets" | "airtable" | "webhook" | null
129129 > ( integrationType ) ;
130130
131+ const isScrapeRobot = recording ?. recording_meta ?. type === "scrape" ;
132+
131133 const authenticateWithGoogle = ( ) => {
132134 if ( ! recordingId ) {
133135 console . error ( "Cannot authenticate: recordingId is null" ) ;
@@ -729,26 +731,55 @@ export const RobotIntegrationPage = ({
729731 width : "100%" ,
730732 } }
731733 >
732- < Button variant = "outlined" onClick = { ( ) => {
733- if ( ! recordingId ) return ;
734- setSelectedIntegrationType ( "googleSheets" ) ;
735- setSettings ( { ...settings , integrationType : "googleSheets" } ) ;
736- const basePath = robotPath === "prebuilt-robots" ? "/prebuilt-robots" : "/robots" ;
737- navigate ( `${ basePath } /${ recordingId } /integrate/googleSheets` ) ;
738- } } style = { { display : "flex" , flexDirection : "column" , alignItems : "center" , background : 'white' , color : '#ff00c3' } } >
734+ < Button
735+ variant = "outlined"
736+ disabled = { isScrapeRobot }
737+ onClick = { ( ) => {
738+ if ( isScrapeRobot ) return ;
739+ if ( ! recordingId ) return ;
740+ setSelectedIntegrationType ( "googleSheets" ) ;
741+ setSettings ( { ...settings , integrationType : "googleSheets" } ) ;
742+ const basePath = robotPath === "prebuilt-robots" ? "/prebuilt-robots" : "/robots" ;
743+ navigate ( `${ basePath } /${ recordingId } /integrate/googleSheets` ) ;
744+ } }
745+ style = { {
746+ display : "flex" ,
747+ flexDirection : "column" ,
748+ alignItems : "center" ,
749+ background : 'white' ,
750+ color : isScrapeRobot ? "#aaa" : "#ff00c3" ,
751+ opacity : isScrapeRobot ? 0.5 : 1 ,
752+ cursor : isScrapeRobot ? "not-allowed" : "pointer" ,
753+ } }
754+ >
739755 < img src = "https://ik.imagekit.io/ys1blv5kv/gsheet.svg" alt = "Google Sheets" style = { { margin : "6px" } } />
740756 Google Sheets
741757 </ Button >
742- < Button variant = "outlined" onClick = { ( ) => {
743- if ( ! recordingId ) return ;
744- setSelectedIntegrationType ( "airtable" ) ;
745- setSettings ( { ...settings , integrationType : "airtable" } ) ;
746- const basePath = robotPath === "prebuilt-robots" ? "/prebuilt-robots" : "/robots" ;
747- navigate ( `${ basePath } /${ recordingId } /integrate/airtable` ) ;
748- } } style = { { display : "flex" , flexDirection : "column" , alignItems : "center" , background : 'white' , color : '#ff00c3' } } >
758+ < Button
759+ variant = "outlined"
760+ disabled = { isScrapeRobot }
761+ onClick = { ( ) => {
762+ if ( isScrapeRobot ) return ;
763+ if ( ! recordingId ) return ;
764+ setSelectedIntegrationType ( "airtable" ) ;
765+ setSettings ( { ...settings , integrationType : "airtable" } ) ;
766+ const basePath = robotPath === "prebuilt-robots" ? "/prebuilt-robots" : "/robots" ;
767+ navigate ( `${ basePath } /${ recordingId } /integrate/airtable` ) ;
768+ } }
769+ style = { {
770+ display : "flex" ,
771+ flexDirection : "column" ,
772+ alignItems : "center" ,
773+ background : 'white' ,
774+ color : isScrapeRobot ? "#aaa" : "#ff00c3" ,
775+ opacity : isScrapeRobot ? 0.5 : 1 ,
776+ cursor : isScrapeRobot ? "not-allowed" : "pointer" ,
777+ } }
778+ >
749779 < img src = "https://ik.imagekit.io/ys1blv5kv/airtable.svg" alt = "Airtable" style = { { margin : "6px" } } />
750780 Airtable
751781 </ Button >
782+
752783 < Button variant = "outlined" onClick = { ( ) => {
753784 if ( ! recordingId ) return ;
754785 setSelectedIntegrationType ( "webhook" ) ;
0 commit comments