Skip to content

Intro to workflows

Workflows are the engine of your WeWeb application, allowing you to create dynamic, interactive experiences without writing code. Think of workflows as a series of actions that happen in response to something - when a user clicks a button, types in a search bar, or when a page loads.

Every workflow starts with a trigger - an event that sets things in motion. When that trigger occurs, WeWeb executes a sequence of actions you've defined. A comprehensive list of triggers can be found here.

In the example below, when a user logs in, we redirect them to a different page based on their role:

Workflow example

Inside workflows you can:

  1. Test the full workflow
  2. Set up a separate workflow if the default runs into an error
  3. Choose the event that triggers the workflow (e.g. On click, On mouse enter, etc.)
  4. Add an action to the workflow
  5. Test an individual action
  6. Click on the three vertical dots to copy/duplicate/delete an action
  7. Zoom in and out of the workflow
  8. Edit the settings of an action
  9. Close the workflow view to return to the editor

Global vs local workflows

In WeWeb, you can create workflows in two ways:

  • Global workflows located in the Actions tab that you can reuse across your application

Global workflow example

  • Local workflows that are tied to a specific trigger or element

TIP

While you can create local workflows for any trigger (app load, page load, button clicks, etc.), we recommend using global workflows whenever you find yourself repeating the same series of actions in different places, or when a workflow becomes too complex to manage. Make sure your workflows are maintainable and easy to understand.

Learn more about how to create and reuse global workflows

Filter on current page

To see if a global workflow is used on a page, you can toggle the All pages switch:

Global workflow executed on an element

In the example above, you can see we are currently on the Home page and only the Calculate shipping cost workflow is being used on that page.

Page workflows

Page workflows are specifically tied to individual pages and only execute when a user visits that particular page.

To create page workflows, go to page settings > Trigger page workflows

Page workflow

App workflows

App workflows run across your entire website. If you create an app workflow that triggers when a page loads, it will run every time any page in your website loads. For example, if your website has a home page, about page, and contact page, the same workflow will run when someone visits any of these pages.

To add a workflow at app level, go to More > Trigger app workflows.

App workflows in More menu

This will open a panel where you can create a new workflow:

App workflows panel

When you trigger a new workflow at app level, you can can choose to build the workflow from scratch or execute a global workflow.

In the example below, on page scroll, throughout our app, we execute a global workflow to change the navbar color:

App workflow example

TIP

Always give your workflows clear, descriptive names. This makes debugging easier and helps team collaboration.

✅ Good: "Validate User Input", "Send Welcome Email"
❌ Bad: "New Workflow", "Workflow 1"

You can use any naming format – just be consistent throughout your project.

Recurring tasks

WeWeb is a frontend builder. It follows that WeWeb's workflows allow you to build frontend logic, to display popup alerts, send an email when a user clicks on a button, or filter data for example.

If you are looking to program recurring tasks, i.e. CronJobs, to perform regular scheduled actions, then this should be created in the logic of your backend - not your frontend.