activepieces
Self-hosted no-code automation platform with visual flow builder, type-safe custom pieces, API integrations, and event-driven triggers
What this skill does
# Activepieces Workflow Automation Skill
Master Activepieces for self-hosted no-code automation with type-safe custom pieces, visual flow building, and enterprise-ready workflow orchestration. This skill covers flow design, piece development, triggers, connections management, and production deployment patterns.
## When to Use This Skill
### USE when:
- Building business automations with type-safe custom components
- Self-hosting is required for data sovereignty and compliance
- Need modular, reusable automation pieces
- Creating approval workflows with human-in-the-loop
- Connecting APIs with visual flow builder
- Teams need both no-code and code-first options
- Require MIT-licensed open-source automation
- Building internal tool automations
### DON'T USE when:
- Complex DAG-based data pipeline orchestration (use Airflow)
- CI/CD pipelines tightly coupled with git (use GitHub Actions)
- Need 400+ pre-built integrations immediately (use n8n)
- Sub-second latency requirements (use direct API calls)
- Simple single-trigger cron jobs (use systemd timers)
## Prerequisites
### Installation Options
**Option 1: Docker Compose (Recommended)**
```yaml
# docker-compose.yml
version: '3.8'
services:
activepieces:
image: activepieces/activepieces:latest
restart: always
ports:
- "8080:80"
environment:
- AP_ENGINE_EXECUTABLE_PATH=dist/packages/engine/main.js
- AP_ENVIRONMENT=prod
- AP_FRONTEND_URL=http://localhost:8080
- AP_WEBHOOK_TIMEOUT_SECONDS=30
- AP_TRIGGER_DEFAULT_POLL_INTERVAL=5
- AP_POSTGRES_DATABASE=activepieces
- AP_POSTGRES_HOST=postgres
- AP_POSTGRES_PORT=5432
- AP_POSTGRES_USERNAME=activepieces
- AP_POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- AP_ENCRYPTION_KEY=${AP_ENCRYPTION_KEY}
- AP_JWT_SECRET=${AP_JWT_SECRET}
- AP_QUEUE_MODE=MEMORY
- AP_REDIS_HOST=redis
- AP_REDIS_PORT=6379
- AP_SANDBOX_RUN_TIME_SECONDS=600
- AP_TELEMETRY_ENABLED=false
depends_on:
- postgres
- redis
volumes:
- ./data:/root/.activepieces
postgres:
image: postgres:15
restart: always
environment:
- POSTGRES_USER=activepieces
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=activepieces
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U activepieces"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7
restart: always
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
volumes:
postgres_data:
```
```bash
# Generate required secrets
export POSTGRES_PASSWORD=$(openssl rand -hex 32)
export AP_ENCRYPTION_KEY=$(openssl rand -hex 16)
export AP_JWT_SECRET=$(openssl rand -hex 32)
# Start services
docker compose up -d
# Access UI at http://localhost:8080
```
**Option 2: Kubernetes with Helm**
```bash
# Add Activepieces Helm repo
helm repo add activepieces https://activepieces.github.io/activepieces
helm repo update
# Create namespace
kubectl create namespace activepieces
# Create secrets
kubectl create secret generic activepieces-secrets \
--namespace activepieces \
--from-literal=encryption-key=$(openssl rand -hex 16) \
--from-literal=jwt-secret=$(openssl rand -hex 32) \
--from-literal=postgres-password=$(openssl rand -hex 32)
# Install Activepieces
helm install activepieces activepieces/activepieces \
--namespace activepieces \
--set ingress.enabled=true \
--set ingress.hosts[0].host=activepieces.example.com
# Get initial setup URL
kubectl get ingress -n activepieces
```
**Option 3: Local Development**
```bash
# Clone repository
git clone https://github.com/activepieces/activepieces.git
cd activepieces
# Install dependencies
npm install
# Setup environment
cp .env.example .env
# Start development server
npm run dev
# Access at http://localhost:4200
```
### Development Setup for Custom Pieces
```bash
# Install Activepieces CLI
npm install -g @activepieces/cli
# Create new piece project
ap create-piece my-custom-piece
# Navigate to piece directory
cd pieces/my-custom-piece
# Install dependencies
npm install
# Build piece
npm run build
# Test piece locally
npm run test
```
## Core Capabilities
### 1. Basic Flow Structure
```typescript
// Flow definition structure
interface Flow {
id: string;
projectId: string;
folderId?: string;
status: 'ENABLED' | 'DISABLED';
schedule?: {
cronExpression: string;
timezone: string;
};
trigger: Trigger;
steps: Step[];
}
// Example flow JSON
const basicFlow = {
"displayName": "New Customer Onboarding",
"trigger": {
"name": "webhook",
"type": "WEBHOOK",
"settings": {
"inputUiInfo": {}
},
"valid": true,
"displayName": "Webhook Trigger"
},
"steps": [
{
"name": "validate_data",
"type": "CODE",
"settings": {
"input": {
"customer": "{{trigger.body.customer}}"
},
"sourceCode": {
"code": "export const code = async (inputs) => {\n const { customer } = inputs;\n \n if (!customer.email || !customer.name) {\n throw new Error('Missing required fields');\n }\n \n return {\n valid: true,\n customer: {\n ...customer,\n email: customer.email.toLowerCase().trim(),\n created_at: new Date().toISOString()\n }\n };\n};"
}
},
"displayName": "Validate Customer Data"
},
{
"name": "create_crm_contact",
"type": "PIECE",
"settings": {
"pieceName": "@activepieces/piece-hubspot",
"pieceVersion": "~0.5.0",
"actionName": "create_contact",
"input": {
"email": "{{validate_data.customer.email}}",
"firstName": "{{validate_data.customer.name.split(' ')[0]}}",
"lastName": "{{validate_data.customer.name.split(' ').slice(1).join(' ')}}",
"properties": {
"source": "activepieces_onboarding",
"created_via": "automation"
}
}
},
"displayName": "Create HubSpot Contact"
},
{
"name": "send_welcome_email",
"type": "PIECE",
"settings": {
"pieceName": "@activepieces/piece-sendgrid",
"pieceVersion": "~0.3.0",
"actionName": "send_email",
"input": {
"to": "{{validate_data.customer.email}}",
"subject": "Welcome to Our Platform!",
"html": "<h1>Welcome, {{validate_data.customer.name}}!</h1><p>We're excited to have you on board.</p>"
}
},
"displayName": "Send Welcome Email"
},
{
"name": "notify_team",
"type": "PIECE",
"settings": {
"pieceName": "@activepieces/piece-slack",
"pieceVersion": "~0.6.0",
"actionName": "send_message",
"input": {
"channel": "#new-customers",
"text": "New customer onboarded: {{validate_data.customer.name}} ({{validate_data.customer.email}})"
}
},
"displayName": "Notify Sales Team"
}
]
};
```
### 2. Webhook Triggers
```typescript
// Webhook trigger configuration
const webhookFlow = {
"displayName": "Payment Webhook Handler",
"trigger": {
"name": "webhook",
"type": "WEBHOOK",
"settings": {
"inputUiInfo": {
"customizedInputs": {}
}
},
"displayName": "Payment Webhook"
},
"steps": [
{
"name": "verify_signature",
"type": "CODE",
"settings": {
"input": {
"payload": "{{trigger.body}}",
"signature": "{{trigger.headers['x-signature']}}",
"secret": "{{connections.payment_webhook_secret}}"
},
"sourceCode": {
"code": `
import crypto from 'crypto';
export const code = async (inputs) => {
const { payload, signature, secret } = inputs;
const expectedSignature = crypto
.createHmac('sha256', secret)
.update(JSON.stringify(payload))
.Related in automation
prompt-engineer
IncludedTransforms user prompts into optimized prompts using frameworks (RTF, RISEN, Chain of Thought, RODES, Chain of Density, RACE, RISE, STAR, SOAP, CLEAR, GROW)
windmill
IncludedDeveloper-first workflow engine that turns scripts into workflows and UIs, supporting Python, TypeScript, Go, and Bash with approval flows, schedule management, and self-hosted deployment
prompt-engineer
IncludedTransforms user prompts into optimized prompts using frameworks (RTF, RISEN, Chain of Thought, RODES, Chain of Density, RACE, RISE, STAR, SOAP, CLEAR, GROW)
airflow
IncludedPython DAG workflow orchestration using Apache Airflow for data pipelines, ETL processes, and scheduled task automation
github-actions
IncludedCI/CD automation and workflow orchestration using GitHub Actions for builds, tests, deployments, and repository automation
n8n
IncludedOpen-source workflow automation platform with visual node-based editor, 400+ integrations, webhooks, and self-hosted deployment capabilities