import { BookOpen, Zap, Layers, Play } from "lucide-react"; import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription } from "@/components/ui/dialog"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; import { ScrollArea } from "@/components/ui/scroll-area"; import { Separator } from "@/components/ui/separator"; import { Badge } from "@/components/ui/badge"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Button } from "@/components/ui/button"; interface WorkflowGuideProps { open: boolean; onOpenChange: (open: boolean) => void; } export function WorkflowGuideDialog({ open, onOpenChange }: WorkflowGuideProps) { return (
Workflow Automation Guide Master the art of automation with this comprehensive manual.
Getting Started Node Types Variables & Logic Best Practices

How Workflows Work

Workflows are visual sequences of tasks that automate your business processes. Each step in the process is represented by a Node. Nodes are connected by Edges (lines) which determine the flow of execution.

1. Trigger

Every workflow starts with a trigger (e.g., "Start Node", "Webhook", or "Schedule"). This initiates the process.

2. Process

Data flows through nodes (e.g., "AI Task", "Condition"). Each node performs an action or decision.

3. Action

The workflow results in tangible outcomes like sending emails, updating CRMs, or posting content.

Creating Your First Workflow

  1. Drag a Trigger node onto the canvas (or use the default Start node).
  2. Add Action nodes to define what should happen.
  3. Connect the nodes by dragging from the bottom handle of one node to the top handle of another.
  4. Configure each node by clicking on it.
  5. Click to persist your changes.
  6. Use to verify the flow.

Triggers

Actions

Logic & Flow Control

Using Variables

Variables allow you to pass data between nodes. You can access variables using the {"{variable_name}"} syntax in text fields, or strict JavaScript in code fields.

Common Variables
{"{email}"} The email address of the current contact
{"{name}"} The name of the contact/company
{"{website}"} Website URL
Node Outputs

Nodes also append data to the context. For example, an API Request node might save its response to apiResponse.

{`// Example Context Data`}
{`{ "email": "user@example.com", "apiResponse": { "status": "success", "id": 123 }, "geminiResult": "Subject: Hello World" }`}
  • Start Simple: Build a linear flow first. Add conditions and loops only when necessary.
  • Test Often: Use the "Set Variables" node to mock data and test small sections of your workflow.
  • Name Your Nodes: Give nodes descriptive names (e.g., "Send Welcome Email" instead of "Template"). Using generic names makes debugging hard.
  • Handle Failures: Consider what happens if an API fails. Maybe add a fallback path?
); } function NodeCard({ icon, name, description }: { icon: string, name: string, description: string }) { return (
{icon}

{name}

{description}

); }