Index of every page on this site: llms.txt
All skills
masheev avatar

/masheev-automations

@21d3a39
by masheevmasheev/skills1 stars
Run it yourself

Use when building automation rules and workflows in Masheev. Covers triggers (conversation.created, message.created, SLA breach, time-based), conditions (equals, contains, greater_than), and actions (set status, assign, add labels, send responses, trigger AI, webhook calls, notifications). Also covers the workflow builder with AI invoke steps, action steps, conditional steps, and delay steps. Use this skill when someone asks to "automate conversations", "set up rules", "auto-assign", "auto-resolve", "trigger AI", or "build a workflow" in Masheev.

Use this Skill: https://skilld.dev/gh/masheev/skills/masheev-automations

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencestemplates.md

≈1.4k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Automation Templates

Pre-built automation templates with complete API calls.

Auto-Assign VIP Contacts

Route enterprise customers to a dedicated support agent.

import { apiClient } from "@masheev/client/server";

await apiClient.automations.create.mutate({
  name: "Auto-assign VIP contacts",
  trigger: "conversation.created",
  conditions: [
    { field: "contact.customAttributes.plan", operator: "equals", value: "enterprise" },
  ],
  actions: [
    { type: "set_priority", value: "high" },
    { type: "add_label", labelId: "label_vip" },
    { type: "assign_to", assigneeType: "agent", assigneeId: "agt_senior_support" },
    { type: "notify", channel: "slack", message: "VIP conversation from {{contact.name}} ({{contact.company}})" },
  ],
});

Escalate After N Unanswered Messages

If a contact sends 3+ messages without a response, escalate.

await apiClient.automations.create.mutate({
  name: "Escalate unanswered conversations",
  trigger: "message.created",
  conditions: [
    { field: "message.role", operator: "equals", value: "contact" },
    { field: "conversation.unansweredCount", operator: "greater_than", value: "2" },
    { field: "conversation.status", operator: "not_equals", value: "resolved" },
  ],
  actions: [
    { type: "set_priority", value: "urgent" },
    { type: "assign_to", assigneeType: "agent", assigneeId: "agt_team_lead" },
    { type: "add_note", content: "Auto-escalated: 3+ unanswered messages from contact." },
    { type: "notify", channel: "email", recipientId: "agt_team_lead", message: "Conversation {{conversation.id}} needs attention." },
  ],
});

Auto-Resolve After Inactivity

Close conversations with no activity for 24 hours when status is pending.

await apiClient.automations.create.mutate({
  name: "Auto-resolve inactive conversations",
  trigger: "time.schedule",
  schedule: "0 */6 * * *",  // Every 6 hours
  conditions: [
    { field: "conversation.status", operator: "equals", value: "pending" },
    { field: "conversation.lastActivityAt", operator: "less_than", value: "{{now - 24h}}" },
  ],
  actions: [
    { type: "send_canned_response", content: "It looks like this issue has been resolved. Feel free to reach out again anytime!" },
    { type: "set_status", value: "resolved" },
  ],
});

Welcome Message for New Conversations

Greet every new conversation with an AI-generated message.

await apiClient.automations.create.mutate({
  name: "Welcome message",
  trigger: "conversation.created",
  conditions: [
    { field: "conversation.channel", operator: "not_equals", value: "voice" },
  ],
  actions: [
    { type: "trigger_ai", instructions: "Send a brief, friendly welcome. Introduce yourself and ask how you can help. Keep it to 1-2 sentences." },
  ],
});

SLA Breach Notification

Alert the team when a conversation approaches or breaches its SLA.

// Warning (approaching breach)
await apiClient.automations.create.mutate({
  name: "SLA breach alert",
  trigger: "sla.warning",
  conditions: [],
  actions: [
    { type: "set_priority", value: "urgent" },
    { type: "add_label", labelId: "label_sla_risk" },
    { type: "notify", channel: "slack", message: "SLA warning: {{conversation.id}} from {{contact.name}} will breach in {{sla.timeRemaining}}." },
    { type: "notify", channel: "email", recipientId: "{{conversation.assigneeId}}", message: "Respond to {{contact.name}} within {{sla.timeRemaining}}." },
  ],
});

// Breach (reassign to manager)
await apiClient.automations.create.mutate({
  name: "SLA breach escalation",
  trigger: "sla.breach",
  conditions: [],
  actions: [
    { type: "assign_to", assigneeType: "agent", assigneeId: "agt_manager" },
    { type: "add_note", content: "SLA breached. Escalated to manager. Original assignee: {{conversation.assigneeName}}." },
    { type: "notify", channel: "slack", message: "SLA BREACHED: {{conversation.id}} reassigned to manager." },
  ],
});

After-Hours Auto-Reply

Send an automatic response outside business hours.

await apiClient.automations.create.mutate({
  name: "After-hours auto-reply",
  trigger: "conversation.created",
  conditions: [
    { field: "time.hour", operator: "less_than", value: "9" },
    { field: "time.hour", operator: "greater_than", value: "17" },
    { field: "time.dayOfWeek", operator: "equals", value: "saturday" },
    { field: "time.dayOfWeek", operator: "equals", value: "sunday" },
  ],
  conditionLogic: "any",
  actions: [
    { type: "send_canned_response", content: "Thanks for reaching out! Our team is offline. Hours: Mon-Fri, 9 AM - 5 PM EST. We will reply next business day." },
    { type: "set_status", value: "pending" },
    { type: "snooze", until: "next_business_day_9am" },
  ],
});

Combining Templates

Automations run independently. Multiple can share the same trigger. Control execution order with priority (1-100, higher runs first):

await apiClient.automations.create.mutate({
  name: "VIP routing (runs first)",
  trigger: "conversation.created",
  priority: 90,
  // ...
});

await apiClient.automations.create.mutate({
  name: "Welcome message (runs after routing)",
  trigger: "conversation.created",
  priority: 50,
  // ...
});

Managing Automations

// List all
const rules = await apiClient.automations.list.query({});

// Deactivate without deleting
await apiClient.automations.activate.mutate({ id: "rule_...", active: false });

// View run history
const runs = await apiClient.automations.listRuns.query({ automationId: "rule_...", limit: 50 });

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning7mo3 checks · Risk SAFE
  • Gen Agent Trust Hub7mo

    The skill provides instructions and code templates for automating workflows in the Masheev platform. It uses the official @masheev/client library. A low-severity security surface for indirect prompt injection exists because the automation rules process external conversation and message data to trigger actions like webhooks, notifications, or AI text generation without explicit sanitization or boundary markers.

  • Socket7mo

    1 alert: gptAnomaly

  • Snyk7mo

    Risk: LOW · No issues

Signed by skilld at 21d3a39. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 weeks ago.

Activeupdated 7 months ago
metadata
{
  "author": "masheev",
  "version": "0.1.0"
}

README badge

README badge for masheev/skills/masheev-automations