Plausible
Retrieve website analytics stats from Plausible.
On this page
Connect
Auth type: API key (secret_text). Pass the provider's API key or token as the connection's credential. It is sealed at rest and only opened on the server when an action runs.
- From your agent: integrations {action: "connect", piece, credentials, env} stores the credentials for dev, prod or all. Answers name the fields, never the values.
- Or set the integration's project secrets with the secrets tool (SLACK_BOT_TOKEN, DISCORD_WEBHOOK_URL, TELEGRAM_BOT_TOKEN, TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN …): a call uses the connection, else those secrets. integrations {action: "catalog", piece} lists which ones work.
- Try one action now with integrations {action: "call", piece, piece_action, input}. It really sends.
Call it from a workflow
step.ctx.integrations.invoke("plausible", action, input) resolves with the provider's answer and rejects when Plausible isn't connected or refuses. Wrap it in step.run so a retry sends once. See step.ctx. Its actions run through the integration runner, which the server's operator turns on: integrations {action: "catalog", piece: "plausible"} says whether yours can call it.
// workflows/notify.ts: call Plausible when a booking is confirmed
import { on } from "@appbricx/workflows";
export const tellPlausible = on.transition("booking", "status", "confirmed", async (_event, step) => {
// Recorded once: a retry doesn't send it twice. Rejects when Plausible isn't connected.
const output = await step.run("Plausible", () =>
step.ctx.integrations.invoke("plausible", "create_custom_property", {
"site_id": "<site_id>",
"property": "<property name>"
}),
);
step.ctx.log("Plausible answered", output);
});{
"name": "integrations",
"arguments": {
"project_id": "<project-id>",
"action": "call",
"piece": "plausible",
"piece_action": "create_custom_property",
"input": {
"site_id": "<site_id>",
"property": "<property name>"
},
"env": "dev"
}
}curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/plausible/create_custom_property" \
-H "Authorization: Bearer $APP_KEY" \
-H "content-type: application/json" \
-d '{"props":{"site_id":"<site_id>","property":"<property name>"}}'Actions
create_custom_property
Create Custom Property. Create a custom property for a site
| Input | Type | Description |
|---|---|---|
site_idrequired | id (picked from your account) | Select a site |
propertyrequired | text | Name of the custom property |
create_goal
Create Goal. Find or create a goal for a site
| Input | Type | Description |
|---|---|---|
site_idrequired | id (picked from your account) | Select a site |
goal_typerequired | one of "event" | "page" | Type of goal to create |
event_nameoptional | text | Name of the event (required if goal type is Event) |
page_pathoptional | text | Page path to track (required if goal type is Page). Supports wildcards. |
display_nameoptional | text | Custom display name for the goal in the dashboard |
create_site
Create Site. Create a new site in your Plausible account
| Input | Type | Description |
|---|---|---|
domainrequired | text | Domain of the site (must be globally unique) |
timezoneoptional | text | Timezone name according to IANA database (e.g., Europe/London). Defaults to Etc/UTC |
team_idoptional | id (picked from your account) | Select a team |
track_404_pagesoptional | boolean | Enable tracking of 404 error pages |
hash_based_routingoptional | boolean | Enable hash-based routing for single-page applications |
outbound_linksoptional | boolean | Track clicks on outbound links |
file_downloadsoptional | boolean | Track file downloads |
form_submissionsoptional | boolean | Track form submissions |
delete_custom_property
Delete Custom Property. Delete a custom property from a site
| Input | Type | Description |
|---|---|---|
site_idrequired | id (picked from your account) | Select a site |
propertyrequired | id (picked from your account) | Select a custom property |
delete_goal
Delete Goal. Delete a goal from a site
| Input | Type | Description |
|---|---|---|
site_idrequired | id (picked from your account) | Select a site |
goal_idrequired | id (picked from your account) | Select a goal |
delete_site
Delete Site. Delete a site and all its data from your Plausible account. This action is permanent and may take up to 48 hours to complete.
| Input | Type | Description |
|---|---|---|
site_idrequired | id (picked from your account) | Select a site |
get_site
Get Site. Get details of a site including tracker script configuration
| Input | Type | Description |
|---|---|---|
site_idrequired | id (picked from your account) | Select a site |
invite_guest
Invite Guest. Invite a guest to access a site or find an existing invitation
| Input | Type | Description |
|---|---|---|
site_idrequired | id (picked from your account) | Select a site |
emailrequired | text | Guest's email address |
rolerequired | one of "viewer" | "editor" | Role to assign to the guest |
list_custom_properties
List Custom Properties. Get a list of custom properties for a site
| Input | Type | Description |
|---|---|---|
site_idrequired | id (picked from your account) | Select a site |
list_goals
List Goals. Get a list of goals for a site
| Input | Type | Description |
|---|---|---|
site_idrequired | id (picked from your account) | Select a site |
list_guests
List Guests. Get a list of guests for a site
| Input | Type | Description |
|---|---|---|
site_idrequired | id (picked from your account) | Select a site |
list_sites
List Sites. Get a list of sites your Plausible account can access
No input.
list_teams
List Teams. Get a list of teams your Plausible account can access
No input.
remove_guest
Remove Guest. Remove a guest or invitation from a site
| Input | Type | Description |
|---|---|---|
site_idrequired | id (picked from your account) | Select a site |
emailrequired | id (picked from your account) | Select a guest |
update_site
Update Site. Update an existing site in your Plausible account
| Input | Type | Description |
|---|---|---|
site_idrequired | id (picked from your account) | Select a site |
new_domainoptional | text | New domain name for the site (leave empty to keep current) |
track_404_pagesoptional | boolean | Enable tracking of 404 error pages |
hash_based_routingoptional | boolean | Enable hash-based routing for single-page applications |
outbound_linksoptional | boolean | Track clicks on outbound links |
file_downloadsoptional | boolean | Track file downloads |
form_submissionsoptional | boolean | Track form submissions |
Details
- Id
plausible- Category
- Analytics
- Tags
- analytics, privacy, open-source, stats
- Package
@activepieces/piece-plausible@0.0.5- Runs
- Through the integration runner