with one click
automations
Trigger-based automations with action sequences and run history
Menu
Trigger-based automations with action sequences and run history
Backend skills for Supabase — CRM, billing, support, and more
Run comprehensive PLG analysis on a codebase to detect tech stack, existing growth features, and revenue opportunities. Use when the user says "analyze", "scan", "audit codebase", or "find growth opportunities".
Generate context-aware implementation prompts for a selected growth loop. Use when the user says "build", "implement", "generate code", "create prompt", or "how do I build this".
Set up analytics and tracking infrastructure for growth loops. Use when the user says "deploy telemetry", "set up analytics", "tracking", "events", "push to supabase", or "skene push".
Generate prioritized growth loops with implementation roadmaps based on codebase analysis. Use when the user says "plan", "growth loops", "prioritize", "what should I build", or "roadmap".
Check if growth loop requirements are actually implemented in the codebase. Use when the user says "validate", "check status", "skene status", "is it done", or "verify implementation".
| name | automations |
| description | Trigger-based automations with action sequences and run history |
Trigger-based automations with ordered action sequences and execution history. Supports event, schedule, webhook, and manual triggers.
| Column | Type | Description |
|---|---|---|
| id | uuid | Primary key, auto-generated |
| org_id | uuid | References organizations(id), cascade delete |
| creator_id | uuid | References users(id), set null on delete |
| name | text | Name of the automation |
| description | text | Optional description |
| trigger_type | automation_trigger_type | What starts this automation |
| trigger_config | jsonb | Cron expression, event filter, webhook URL, etc. |
| status | automation_status | Current lifecycle status, defaults to draft |
| last_run_at | timestamptz | Timestamp of the most recent run |
| run_count | integer | Total number of runs, defaults to 0 |
| created_at | timestamptz | Row creation timestamp |
| updated_at | timestamptz | Auto-updated on modification |
| metadata | jsonb | Arbitrary key-value data |
| Column | Type | Description |
|---|---|---|
| id | uuid | Primary key, auto-generated |
| org_id | uuid | References organizations(id), cascade delete |
| automation_id | uuid | References automations(id), cascade delete |
| action_type | text | Action kind: send_email, update_field, create_task, webhook, etc. |
| action_config | jsonb | Configuration for the action |
| position | integer | Execution order within the automation, defaults to 0 |
| created_at | timestamptz | Row creation timestamp |
| updated_at | timestamptz | Auto-updated on modification |
| metadata | jsonb | Arbitrary key-value data |
| Column | Type | Description |
|---|---|---|
| id | uuid | Primary key, auto-generated |
| org_id | uuid | References organizations(id), cascade delete |
| automation_id | uuid | References automations(id), cascade delete |
| status | run_status | Current run status, defaults to pending |
| started_at | timestamptz | When the run started executing |
| completed_at | timestamptz | When the run finished |
| error_message | text | Error details if the run failed |
| result | jsonb | Output data from the run |
| created_at | timestamptz | Row creation timestamp |
| updated_at | timestamptz | Auto-updated on modification |
| metadata | jsonb | Arbitrary key-value data |
| Value | Description |
|---|---|
| event | Triggered by a system event |
| schedule | Triggered on a cron schedule |
| webhook | Triggered by an incoming webhook |
| manual | Triggered by a user action |
| Value | Description |
|---|---|
| active | Running and ready to trigger |
| paused | Temporarily disabled |
| draft | Not yet activated |
| archived | Retired, no longer triggerable |
| Value | Description |
|---|---|
| pending | Queued but not yet started |
| running | Currently executing |
| completed | Finished successfully |
| failed | Finished with an error |
All three tables are scoped to the current user's organization via get_user_org_id(). Select, insert, and update are allowed for any org member. Delete requires the is_admin() check.
get_user_org_id() and is_admin() functions, set_updated_at() trigger functionList all active automations for the current org:
SELECT id, name, trigger_type, trigger_config, last_run_at, run_count
FROM automations
WHERE status = 'active'
ORDER BY created_at DESC;
Get the ordered action steps for a specific automation:
SELECT id, action_type, action_config, position
FROM automation_actions
WHERE automation_id = '<automation_id>'
ORDER BY position ASC;
Recent runs across all automations (last 50):
SELECT
r.id,
a.name AS automation_name,
r.status,
r.started_at,
r.completed_at,
r.error_message
FROM automation_runs r
JOIN automations a ON a.id = r.automation_id
ORDER BY r.started_at DESC
LIMIT 50;
Failed runs in the last 7 days:
SELECT
r.id,
a.name AS automation_name,
r.error_message,
r.started_at,
r.result
FROM automation_runs r
JOIN automations a ON a.id = r.automation_id
WHERE r.status = 'failed'
AND r.started_at >= now() - interval '7 days'
ORDER BY r.started_at DESC;
Automations with their action count:
SELECT
a.id,
a.name,
a.status,
a.trigger_type,
count(aa.id) AS action_count
FROM automations a
LEFT JOIN automation_actions aa ON aa.automation_id = a.id
GROUP BY a.id, a.name, a.status, a.trigger_type
ORDER BY a.name;
Run success rate per automation:
SELECT
a.name,
a.run_count,
count(r.id) FILTER (WHERE r.status = 'completed') AS succeeded,
count(r.id) FILTER (WHERE r.status = 'failed') AS failed
FROM automations a
LEFT JOIN automation_runs r ON r.automation_id = a.id
GROUP BY a.id, a.name, a.run_count
ORDER BY a.name;