Creating Workflows

Learn how to create automated workflows that connect triggers to actions, helping you automate your business processes.

Getting Started

Before creating a workflow, make sure you have:

  • An active DooneFlow account
  • An organization set up
  • Integrations configured (if needed) - Set up SMS, webhooks, or other integrations

Learn more about configuring integrations.

Understanding Workflows

A workflow consists of three main components:

  1. Workflow Details: Name, description, and status
  2. Triggers: Events that start the workflow (e.g., webhook received)
  3. Actions: Tasks executed in sequence (e.g., send SMS, update Salesforce, call webhook)

Workflow Status: Set workflows to Active (will execute when triggered) or Inactive (saved but won't execute).

Creating a New Workflow

Step 1: Navigate to Workflows

  1. Log in to your DooneFlow account
  2. Click on "Workflows" in the navigation menu
  3. Click the "Create New Workflow" button

Step 2: Configure Basic Information

Fill in the workflow details:

  • Name: A descriptive name for your workflow (e.g., "Lead Follow-up" or "Contact Follow-up")
  • Description: Optional description explaining what the workflow does
  • Active: Toggle to enable/disable the workflow

Configuring Triggers

Triggers define when your workflow starts. DooneFlow supports webhook triggers and email triggers.

Webhook Trigger

A webhook trigger listens for HTTP requests at a specific path.

Configuration:

  • Webhook Path: The URL path where webhooks will be received (e.g., new-leads or contact-form)
  • Full Webhook URL: https://api.dooneflow.com/webhook/{webhook_path}
  • Security Key (Optional): Add a security key to protect your webhook endpoint
  • Event Type (Optional): Select a reusable event type or configure a custom schema for field mapping

Event Types: Event types allow you to define reusable webhook schemas that can be shared across multiple workflows. When you select an event type, the workflow will use that schema to map incoming webhook data to template variables. You can also configure a custom schema for workflow-specific field mappings.

Example Webhook Path:

new-leads

This creates a webhook URL like:

https://api.dooneflow.com/webhook/new-leads

Security Key:

  • Click "Generate Security Key" to create a unique key
  • Include this key in your webhook requests as a header: X-Webhook-Key: {your_security_key}
  • This ensures only authorized requests trigger your workflow

Test Your Webhook:

curl -X POST https://api.dooneflow.com/webhook/new-leads \
  -H "Content-Type: application/json" \
  -H "X-Webhook-Key: your_security_key" \
  -d '{
    "name": "John Doe",
    "phone": "+1234567890",
    "email": "john@example.com"
  }'

Email Trigger

Email triggers allow workflows to start automatically when emails arrive in a monitored inbox.

Configuration:

  • Email Address: The email address to monitor for incoming messages (must be configured in Email Inboxes)
  • Subject Filter (Optional): Only trigger if subject contains this text (case-insensitive)
  • From Filter (Optional): Only trigger if sender email contains this text (case-insensitive)
  • Mark as Read: Automatically mark emails as read after processing

Prerequisites: Before using an email trigger, you must configure an email inbox in Organization Settings → Email Inboxes. The inbox must be set up with IMAP credentials for the email address you want to monitor.

Available Email Fields:

When an email triggers a workflow, these fields are automatically available as template variables:

  • {email_from} - Sender email address
  • {email_to} - Recipient email address
  • {email_subject} - Email subject line
  • {email_body} - Plain text body
  • {email_body_html} - HTML body
  • {contact_email} - Extracted from From field
  • {contact_name} - Extracted from From field (if available)

Example Use Case:

Support Ticket Workflow:

  1. Monitor support@company.com
  2. Subject filter: "Support Request"
  3. Actions: Analyze email with AI, route to team member, create ticket in CRM

Adding Actions

Actions are executed in the order they appear. Click "Add Action" to add new actions.

1. Send SMS Action

Send text messages to contacts or team members.

Configuration:

  • Recipient Type: Customer/Contact or Team Member
  • Message: The SMS message text (supports template variables)

Template Variables: {contact_name}, {contact_phone}, {contact_email}, {team_member_name}, etc.

2. Salesforce Action

Update Salesforce records using OAuth authentication.

Configuration:

  • Connection: Select a configured Salesforce connection
  • Endpoint Type: Standard Object or Custom Endpoint
  • Object/Endpoint: The Salesforce object or Apex endpoint name
  • Operation: Create or Update
  • Payload: JSON with field mappings (supports template variables)

Example Payload:

{
  "FirstName": "{contact_name}",
  "Phone": "{contact_phone}",
  "Email": "{contact_email}",
  "LeadSource": "Webhook"
}

Prerequisites: Salesforce OAuth connection must be configured in your organization settings. See Configuring Integrations for setup instructions.

3. Update CRM Action (Coming Soon)

Update contact metadata and information.

Note: This feature is coming soon. The Update CRM action will allow you to update contact metadata and information within your workflows.

4. Delay Action

Wait for a specified amount of time before continuing to the next action.

Configuration:

  • Delay (seconds): Number of seconds to wait (maximum: 48 hours / 172,800 seconds)

Examples: 1 hour = 3,600 seconds, 24 hours = 86,400 seconds

5. Call Webhook Action

Send HTTP requests to external services.

Configuration:

  • URL: The endpoint to call (supports template variables)
  • Method: HTTP method (GET, POST, PUT, DELETE)
  • Headers: Custom headers (key-value pairs)
  • Payload: Request body for POST/PUT requests (JSON format)

Template Variables

Template variables allow you to dynamically insert data from webhooks and contacts into your actions.

Available Variables

Contact Variables:

  • {contact_name} - Contact's full name
  • {contact_phone} - Contact's phone number
  • {contact_email} - Contact's email address
  • {contact_source} - Source of the contact

Custom Variables:

You can use any field defined in your event type schema:

  • {field_name} - Any field from your webhook payload
  • {property_address} - If defined in your schema
  • {lead_id} - If defined in your schema

Team Member Variables:

  • {team_member_name} - Assigned team member's name
  • {team_member_phone} - Assigned team member's phone
  • {team_member_id} - Assigned team member's ID

Using Template Variables

Template variables use curly braces: {variable_name}

Hi {contact_name}, thank you for your interest in {property_address}!

Examples

Example 1: Lead Follow-up

Workflow Name: Lead Follow-up

Trigger: Webhook path: new-leads

Actions:

  1. Send SMS (Customer/Contact): "Hi {contact_name}, thank you for your interest! I'll contact you shortly."
  2. Salesforce: Create lead with contact information
  3. Delay: 24 hours (86,400 seconds)
  4. Send SMS (Customer/Contact): "Hi {contact_name}, just following up on your inquiry. Are you still interested?"

Example 2: Team Member Notification

Workflow Name: New Lead Assignment

Trigger: Webhook path: new-lead

Actions:

  1. Send SMS (Team Member): "Hi {team_member_name}, new contact assigned: {contact_name} ({contact_phone}, {contact_email}). Contact ID: {team_member_id}"
  2. Salesforce: Create lead and assign to team member

Next Steps

Now that you understand how to create workflows, learn about configuring integrations to connect Doone Flow with external services.

Configure Integrations →