Trigger Components

Mintflow common tools

Accessing the Sidebar Menu

After logging into AppMint Web Builder, you can access the MintFlow Sidebar Menu by following these steps:

  1. Navigate to the Application Dropdown:

navigate

  • Once you're logged in, locate the Application dropdown from the main dashboard.
  1. Click on the MintFlow Plus (+) Icon:

    • In the dropdown, click on the MintFlow icon (+) to open the MintFlow Designer interface.
  2. Sidebar Menu Location:

    • Once inside the MintFlow Designer, all the main controls and features are organized in the sidebar located on the left-hand side of the screen.
    • The sidebar provides quick access to all the available menu items for designing and managing your workflows.

sidebar menu

Trigger Component:

  • Contains options for flow triggers like Buttons, Timers, EventEmitters, and EventListeners. The Trigger dropdown contains components that help in starting or triggering workflows based on certain actions or events. Below is an explanation of the various components available under the Trigger dropdown:

Button Component

The Button component allows users to manually trigger workflows with a simple button click. This is useful for scenarios where user interaction is required to start a process.

How to Use the Button Component

Buttons

  1. Access the Button Component:

    • Navigate to the Trigger dropdown in the MintFlow Sidebar Menu and select the Button component.
  2. Drag the Button Component into the Workflow:

    • Drag and drop the Button component into the flow designer area.
  3. Configure the Button Component:

    • Click on the Expand icon to open the configuration panel for the button.
    • Set the Button Name: In the configuration panel, give your button a descriptive name in the Name Input field to reflect its function.
Example Use Case

For instance, if you need a button to trigger an email workflow:

  • Drag the Button component from the Trigger dropdown.
  • Name the button as "Send Email".
  • This button will now trigger the email-sending workflow when clicked.

Timer Component

The Timer component allows workflows to be triggered automatically based on scheduled intervals or specific times, making it ideal for time-based automation.

How to Use the Timer Component

timer

  1. Access the Timer Component:

    • In the Trigger dropdown, select the Timer component.
  2. Drag the Timer Component into the Workflow:

    • Drag and drop the Timer component into the flow designer.
  3. Configure the Timer Component:

    • Click the Expand icon to open the configuration panel.
    • Set the Timer Type: Choose from the following timer types:
      • Cron: Use this to set specific days, hours, and seconds when the workflow should run.
      • Interval: Set the workflow to trigger after a certain interval, defined in milliseconds.
      • Timeout: Set a one-time delay in milliseconds before the workflow triggers.
Example Use Case

To trigger a process every day at 6 AM:

  • Drag the Timer component into the flow.
  • Choose Cron and set the timer to run at the specified day, hour, and second.

EventEmitter Component

The EventEmitter component enables a workflow to emit an event to notify other parts of the system or trigger other workflows. This is useful for broadcasting changes or updates.

How to Use the EventEmitter Component

eventEmitter

  1. Access the EventEmitter Component:

    • Navigate to the Trigger dropdown and select the EventEmitter component.
  2. Drag the EventEmitter Component into the Workflow:

    • Drag the EventEmitter component into the workflow designer.
  3. Configure the EventEmitter Component:

    • Click on the Expand icon to configure the EventEmitter.
    • Set the Topic: Provide a topic name in the Topic field. This topic will act as the event identifier that other workflows or listeners can subscribe to.
Example Use Case

To emit an event when a file is uploaded:

  • Drag the EventEmitter component into the flow.
  • Set the Topic to "FileUpload".
  • This will emit an event with the topic "FileUpload" whenever the workflow reaches this point.

EventListener Component

The EventListener component listens for events emitted by an EventEmitter and triggers the workflow when those events occur. This is ideal for reacting to system-wide or workflow-specific changes.

How to Use the EventListener Component

EventListener

  1. Access the EventListener Component:

    • In the Trigger dropdown, locate the EventListener component.
  2. Drag the EventListener Component into the Workflow:

    • Drag the EventListener into the flow designer.
  3. Configure the EventListener Component:

    • Click the Expand icon to configure the EventListener.
    • Set the Preset: Choose a preset from the following options to listen for specific collection-related events:
      • collection-create
      • collection-update
      • collection-delete
      • collection-publish
      • collection-approve
    • Set the Datatype: Choose a data type from the list available in your database.
    • Set the Topic: Enter the topic that the EventListener should listen to. This should match the topic emitted by an EventEmitter.
Example Use Case

To listen for an event when a new user is added to the collection:

  • Drag the EventListener component into the flow.
  • Set the Preset to "collection-create".
  • Select the appropriate datatype from the database.
  • Set the Topic to "UserAdded".