ื“ืœื’ ืœืชื•ื›ืŸ ื”ืจืืฉื™

Activepieces Plugin

Open-source automation alternative to Zapier and Make with bidirectional integration โ€” Gauzy manages Activepieces resources, and the ever-gauzy-piece on Activepieces authenticates back into Gauzy via OAuth 2.0.

Overviewโ€‹

PropertyValue
Package@ever-co/gauzy-plugin-integration-activepieces
Sourcepackages/plugins/integration-activepieces
UI Packagepackages/plugins/integration-activepieces-ui

Why Activepieces?โ€‹

FeatureActivepiecesZapierMake
Open Sourceโœ…โŒโŒ
Self-Hostedโœ…โŒโŒ
Free TierUnlimitedLimitedLimited
Visual Builderโœ…โœ…โœ…
Custom Piecesโœ…โœ…โœ…

Architectureโ€‹

The integration is bidirectional:

DirectionPurposeAuthenticationIsolation
Gauzy โ†’ ActivepiecesManage AP connections & MCP servers from Gauzy UIAPI Key (Bearer token)Multi-tenant; per-tenant keys or global fallback
Activepieces โ†’ Gauzyever-gauzy-piece calls Gauzy APIs securelyOAuth 2.0 Authorization Code Grant (RFC 6749)HMAC-signed codes, single-use enforcement, JWT access tokens

Part 1: Gauzy โ†’ Activepieces (Plugin Integration)โ€‹

Setup Flowโ€‹

  1. Obtain API Key โ€” get a key from Activepieces (via sales@activepieces.com or the platform dashboard).
  2. Plugin Setup โ€” navigate to /pages/integrations/activepieces and submit the API key via POST /api/integration/activepieces/setup. The backend creates/updates an IntegrationTenant record for the current Gauzy tenant, storing the API key in the settings.
  3. Tenant Isolation โ€” all queries include tenantId filtering derived from the authenticated user's JWT. TenantPermissionGuard ensures only authorized users can modify settings.

Connection Managementโ€‹

OperationEndpointNotes
Create/UpsertPOST /api/v1/app-connections (on AP via Gauzy backend)Auto-adds tenantId, organizationId, gauzyVersion; type is SECRET_TEXT
ListGET /api/v1/app-connectionsFilter by pieceName, displayName, and Gauzy tenantId
DeleteDELETE /api/v1/app-connections/:idโ€”

MCP Server Managementโ€‹

Gauzy manages Model Context Protocol (MCP) servers on the Activepieces platform:

  • List servers by project
  • Rotate authentication tokens
  • Update server tool configurations
tip

Response tokens are sanitized before being sent to the frontend for security.

Backend API Endpointsโ€‹

All endpoints are prefixed with /api/integration/activepieces.

MethodPathDescription
POST/setupSet up Activepieces integration with API key
POST/connectionCreate or update an Activepieces connection
GET/connections/:integrationIdList available connections for a specific project
GET/connection/:integrationIdGet specific connection details
DELETE/connection/:integrationIdRemove a connection

Part 2: Activepieces โ†’ Gauzy (OAuth App)โ€‹

OAuth 2.0 Authorization Code Flowโ€‹

Step-by-step:

  1. Authorize Request โ€” GET /authorize with client_id, redirect_uri, scope, state.
  2. User Consent โ€” backend validates the request and redirects to /pages/auth/oauth/authorize.
  3. Approval โ€” user clicks "Authorize"; frontend calls POST /authorize (requires a Gauzy JWT).
  4. Code Generation โ€” backend generates an HMAC-signed, single-use authorization code: v1.{payload}.{signature}.
  5. Redirect โ€” user is redirected back to Activepieces with the code.
  6. Token Exchange โ€” Activepieces calls POST /token; backend validates code, signature, and single-use marker in cache.
  7. Response โ€” returns a Gauzy Access Token (JWT) and expiration.

Security Detailsโ€‹

MechanismDescription
Single-Use CodesAuthorization codes are stored in cache (Redis) and deleted atomically via GETDEL on first use
HMAC SignatureCodes are signed with GAUZY_OAUTH_APP_CODE_SECRET to prevent tampering
Authorization TTLPending authorization requests expire after 10 minutes
Code TTLAuthorization codes expire after 1 minute
Redirect URI ValidationEnforced at both authorize and token exchange phases against an allowlist

Configurationโ€‹

Activepieces Plugin (Gauzy โ†’ Activepieces)โ€‹

# Activepieces platform base URL (default: https://cloud.activepieces.com)
ACTIVEPIECES_BASE_URL=https://cloud.activepieces.com

# Activepieces API endpoint (default: https://api.activepieces.com/v1)
GAUZY_ACTIVEPIECES_API_URL=https://api.activepieces.com/v1

# Global API key โ€” fallback if no per-tenant key is configured
GAUZY_ACTIVEPIECES_API_KEY=

OAuth App (Activepieces โ†’ Gauzy)โ€‹

# OAuth client identifier
GAUZY_OAUTH_APP_CLIENT_ID=8012eaea-b166-...

# Client authentication secret
GAUZY_OAUTH_APP_CLIENT_SECRET=5b9d261d96b5...

# HMAC secret for signing authorization codes
GAUZY_OAUTH_APP_CODE_SECRET=TECP70oa2WN...

# Comma-separated redirect URI allowlist
GAUZY_OAUTH_APP_REDIRECT_URIS=https://cloud.activepieces.com/redirect
tip

For multi-instance deployments, enable Redis for cache-based state management:

REDIS_ENABLED=true
REDIS_URL=redis://localhost:6379 # or REDIS_HOST / REDIS_PORT
REDIS_TLS=true # for TLS connections (rediss://)

Featuresโ€‹

  • Self-Hosted Automation โ€” run workflows on your own infrastructure
  • Data Privacy โ€” no data leaves your servers
  • Unlimited Flows โ€” no per-flow pricing
  • Custom Pieces โ€” build Gauzy-specific automation blocks
  • Webhooks โ€” trigger flows from Gauzy events

Supported Piecesโ€‹

Triggersโ€‹

  • Employee created/updated
  • Time log recorded
  • Task status changed
  • Invoice generated

Actionsโ€‹

  • Create/update employee
  • Log time entry
  • Create/update task
  • Generate invoice
  • Send notification