Pre-defined Tasks

Creating and Managing Quick Actions in doable.sh

Quick Actions are predefined flows that appear as clickable buttons within the operator widget. They allow users to easily trigger specific actions or workflows that you customize, control, and own. Quick Actions are a powerful way to streamline user interactions with your operator.

Why Use Quick Actions?

Quick Actions simplify complex workflows by enabling users to perform tasks with a single click. These actions are especially useful when users need to:

  • Execute repetitive tasks
  • Navigate through specific application flows
  • Trigger a sequence of steps without manual input

How to Create Quick Actions

There are three ways to create Quick Actions in doable.sh:

1. Using the Dashboard

To create Quick Actions from the dashboard:

  1. Navigate to Configuration > Quick Actions.
  2. Click the + Create button to open the Quick Action form.
  3. Fill out the following fields:
    • Name: A descriptive name for the action.
    • Description: Briefly explain what the action does.
    • Associated Pages: Enter the path where the action will be available (e.g., /dashboard).
    • Steps: Write the steps for the action in natural language, guiding the operator on what to do.

Example:

  • Name: Create Operator
  • Description: Create a new operator and configure it.
  • Associated Pages: /dashboard
  • Steps:
    1. Click the Create New Operator button.
    2. Enter the operator name and allowed domains.
    3. Click Save.

Click Save to add the Quick Action to your operator.


2. Recording Quick Actions (Experimental)

Task recording is an experimental feature that allows you to record your clicks and actions directly within your website.

  1. Click the Record button in the Quick Actions dashboard.
  2. A new window will open, launching the website in admin mode.
  3. Select the domain where you want to record the quick action.
  4. Follow your desired workflow while the system records your clicks.
  5. After finishing, review the recorded steps and save the action.

⚠️ Note: Since task recording is an experimental feature, it may not always accurately capture all steps. You can still manually edit or add steps if necessary.


3. Using the SDK

If you are integrating your operator directly into your web app, you can create Quick Actions programmatically using the SDK.

Installation

Install the SDK via npm:

npm install @doable.sh/sdk

Usage

import { TaskDefinition, startTask } from '@doable.sh/sdk';
 
<TaskDefinition
    id="create-operator-task"
    name="Create Operator"
    description="Create a new operator"
    steps={[
        "Click the 'Create New Operator' button in the top right",
        "Fill out the form with dummy values for 'Acme Inc. Web App Operator'",
        "Use example.com as the domain",
        "Create the operator",
        "Click the 'Configuration' Tab next to Sessions"
    ]}
/>

Best Practices for Quick Actions

  1. Keep Actions Simple: Break complex workflows into smaller, modular tasks.
  2. Use Descriptive Names: Clearly label your Quick Actions to make them easily identifiable.
  3. Test Your Actions: Regularly test both manually created and recorded actions to ensure they work as expected.
  4. Leverage the SDK: Use the SDK for more advanced actions that may require dynamic data or custom flows.

Managing Quick Actions

To edit or remove a Quick Action:

  1. Go to Configuration > Quick Actions.
  2. Click the Edit button next to the action you want to modify.
  3. Make changes or click Delete to remove the action.

By leveraging Quick Actions effectively, you can enhance user engagement, reduce repetitive tasks, and streamline the user experience within your doable.sh-powered application.