Swirls

SWIRLS_

  • How it works
  • Pricing

56 matches

OverviewDeliver client operations10Win and grow accounts8Resolve customer issues6Create and distribute content9Run people and operations5Review money and agreements3Monitor systems and data9Compose dependable work6

56 matches

OverviewDeliver client operations10Win and grow accounts8Resolve customer issues6Create and distribute content9Run people and operations5Review money and agreements3Monitor systems and data9Compose dependable work6
← Customer SupportFormView on GitHub

Contact Form Autoresponder

Classifies contact form inquiries and sends a tailored autoresponse.

aiemail

Source

/**
 * Contact form that classifies inquiries and sends a tailored autoresponse.
 */

form contact {
  label: "Contact Us"
  visibility: public
  schema: @json {
    {
      "type": "object",
      "required": ["name", "email", "message"],
      "properties": {
        "name": { "type": "string", "title": "Name" },
        "email": { "type": "string", "format": "email", "title": "Email" },
        "message": { "type": "string", "title": "Message" }
      },
      "additionalProperties": false
    }
  }
}

workflow handle_contact {
  label: "Handle Contact Form"

  root {
    type: code
    label: "Extract submission"
    code: @ts { return context.nodes.root.input }
    outputSchema: @json {
      {
        "type": "object",
        "properties": {
          "name": { "type": "string" },
          "email": { "type": "string" },
          "message": { "type": "string" }
        }
      }
    }
  }

  node classify {
    type: ai
    label: "Classify inquiry"
    kind: object
    model: "google/gemini-2.5-flash"
    prompt: @ts {
      return "Classify this customer inquiry into one of: sales, support, partnership, other.\n\nName: " + context.nodes.root.output.name + "\nMessage: " + context.nodes.root.output.message
    }
    schema: @json {
      {
        "type": "object",
        "required": ["category", "summary"],
        "properties": {
          "category": { "type": "string", "enum": ["sales", "support", "partnership", "other"] },
          "summary": { "type": "string" }
        }
      }
    }
  }

  node draft_reply {
    type: ai
    label: "Draft reply"
    kind: text
    model: "google/gemini-2.5-flash"
    prompt: @ts {
      return "Write a short, friendly auto-reply for this " + context.nodes.classify.output.category + " inquiry from " + context.nodes.root.output.name + ". Summary: " + context.nodes.classify.output.summary + "\n\nKeep it under 3 sentences."
    }
    temperature: 0.7
  }

  node send_reply {
    type: email
    label: "Send autoresponse"
    from: @ts { return "[email protected]" }
    to: @ts { return context.nodes.root.output.email }
    subject: @ts { return "Re: Your inquiry" }
    text: @ts { return context.nodes.draft_reply.output }
  }

  flow {
    root -> classify
    classify -> draft_reply
    draft_reply -> send_reply
  }
}

trigger on_contact {
  form:contact -> handle_contact
  enabled: true
}

Flow

Trigger to workflow

contactform
handle_contact
Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

Workflow nodes

CODE
Code Node
Extract submission
AI
AI Node
Classify inquiry
AI
AI Node
Draft reply
EMAIL
Email Node
Send autoresponse
Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.