Skip to main content
You can use the embedded SDK to create connections.

Step 1: Initialize the SDK

Follow the instructions in the Initialize SDK page

Step 2: Call Connect method

After initializing the SDK you will have access to a property called activepieces inside your window object, call the its connect method to open a new connection dialog as follows.
<script> 
activepieces.connect({pieceName:'@activepieces/piece-google-sheets'});
</script>
Connect Parameters:
Parameter NameRequiredTypeDescription
pieceNamestringThe name of the piece you want to create a connection for.
Connect Result The connect method returns a promise that resolves to the following object:
{
    connection?: {
        id:string,
        name:string
    }
}

connection is undefined if the user closes the dialog and doesn’t create a connection.
You can use the connections piece in the builder to retrieve the created connection using its name Connections in Builder Connections in Builder