-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4433 from activepieces/docs/pieces-customization
docs: improve embed docs and document project pieces filter
- Loading branch information
Showing
14 changed files
with
164 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
title: "Customize Pieces" | ||
description: "" | ||
icon: "puzzle" | ||
--- | ||
|
||
This documentation explains how to customize access to pieces depending on projects. | ||
|
||
<Steps> | ||
<Step title="Tag Pieces"> | ||
You can tag pieces in bulk using **Admin Console** | ||
|
||
![Bulk Tag](../resources/screenshots/tag-pieces.png) | ||
</Step> | ||
<Step title="Add Tags to Provision Token"> | ||
We need to specify the tags of pieces in the token, check how to generate token in [provision-users](./provision-users). | ||
|
||
You should specify the `pieces` claim like this: | ||
```json | ||
{ | ||
/// Other claims | ||
"pieces": { | ||
"filterType": "ALLOWED", | ||
"tags": [ "free" ] | ||
} | ||
} | ||
``` | ||
|
||
Each time the token is used in the frontend, it will sync all pieces with these tags to the project. | ||
The project's pieces list will **exactly match** all pieces with these tags at the moment of using the iframe. | ||
</Step> | ||
</Steps> |
18 changes: 9 additions & 9 deletions
18
...edding/configuration/initialize-embed.mdx → docs/embedding/embed-builder.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
title: "Create Connections" | ||
description: "" | ||
icon: "cards" | ||
--- | ||
|
||
You can use the embedded SDK to create connections. | ||
|
||
<Steps> | ||
<Step title="Initialize the SDK"> | ||
Follow the instructions in the [Initialize SDK](../configuration/initialize-embed) in Embed builder. | ||
</Step> | ||
<Step title="Call Connect Method"> | ||
After initializing the SDK, you will have access to a property called `activepieces` inside your `window` object. Call its `connect` method to open a new connection dialog as follows. | ||
|
||
```html | ||
<script> | ||
activepieces.connect({pieceName:'@activepieces/piece-google-sheets'}); | ||
</script> | ||
``` | ||
|
||
**Connect Parameters:** | ||
|
||
| Parameter Name | Required | Type | Description | | ||
| -------------- | -------- | ------ | ------------------------------------------- | | ||
| pieceName | ✅ | string | The 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: | ||
|
||
```ts | ||
{ | ||
connection?: { | ||
id: string, | ||
name: string | ||
} | ||
} | ||
``` | ||
|
||
<Info> | ||
`connection` is undefined if the user closes the dialog and doesn't create a connection. | ||
</Info> | ||
|
||
<Tip> | ||
You can use the `connections` piece in the builder to retrieve the created connection using its name. | ||
![Connections in Builder](/resources/screenshots/connections-piece.png) | ||
![Connections in Builder](/resources/screenshots/connections-piece-usage.png) | ||
</Tip> | ||
</Step> | ||
</Steps> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
title: 'Overview' | ||
description: 'Understanding how embedding works' | ||
icon: "cube" | ||
--- | ||
|
||
<Snippet file="enterprise-feature.mdx" /> | ||
|
||
This section provides an overview of how to embed the Activepieces builder in your application and automatically provision the user. | ||
|
||
The embedding process involves the following steps: | ||
|
||
<Steps> | ||
<Step title="Provision Users"> | ||
Generate a JSON Web Token (JWT) to identify your customer and pass it to the frontend. | ||
</Step> | ||
<Step title="Embed Builder"> | ||
Use the Activepieces SDK and the JWT to embed the Activepieces builder as an iframe, and customize using the SDK. | ||
</Step> | ||
<Step title="Optional Step"> | ||
Optionally, you can embed a Connections dialog to collect user connections. | ||
</Step> | ||
</Steps> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.