Running a flow

Updated 1 day ago by Karan

In this development guide, we will discover how to run the no-code backend flow design for your websites and apps. Byteline helps to build create and run flow design with the help of powerful nodes such as form submission, send an email, scheduler, HTTP API trigger, and much more. 

Let's get started.  

For this example, a simple Byteline flow is assumed that consists of a form submission node and send email node. So basically you're sending an email on the form submission from a web page.

Assuming you have created the structure of your flow successfully.

Please look into How to create your First Flow Design and Send Email pages to understand the steps required to create these flows.

Deploy

The green indicators over the top-right corner show that the nodes have been configured successfully.

Click on the Deploy button and the deploy successful pop-up shall appear on the screen. 

Test Run

You can test the flow by hitting the Run button at the top-right corner of the screen.

A small dialog box appears on the screen to ask for input data and hit the run button. If any inputs are required for the flow, this dialog will require them.

The window will show success status.

You have successfully, created your flow and executed the test run. Now it's time to use the flow in the wild.

Running flows

On this page, 3 methods of running a flow are explained.

Method 1 - Form Submission

In this method, a web form will collect user data in the front-end and will be linked to the back-end flow via a form submit URL.

Step -1.1: To configure the form submission trigger node, click on the edit button over the top-left corner of the node.

Step-1.2: The form submission configuration window will open on the screen. This window shows the URL that should be hit from the web page form. The HTTP method has to be POST, so that you can pass form data to this endpoint. When a form is submitted from a web page, you can specify the next page to be shown using the Redirect URL field. Hit the save button.

Step-1.3: For this documentation, we are assuming that you're using Webflow for your web pages. Similar steps can be followed for other web page builder tools.

Open your Webflow account, create a contact us form with a submit button to fetch the user's name and mail at the front-end.

Step -1.4: Copy the URL from the form submission node's configuration window.

Step - 1.5: Go to the contact us form and follow the steps:

  1. Open form block setting and paste the URL in the action text field to connect the front-end with the back-end flow.
  2. Click the Method drop-down.
  3. Select the POST method to send the data to the Byteline flow.

Now when a user fills the form on a browser and hits the Submit button. The Byteline will process the data entered in the Webflow contact us form and the configured data will be sent via email.

Method 2 - HTTP API

Calling a flow using HTTP API is the most flexible way. You can use this method to execute the flow from anywhere. For example, it can be used to call the flow directly from a JavaScript code running on a web page or from any third-party system. You can also use tools such as Postman or Insomnia to call the flow using this method.

To keep things simple, this document uses Postman, which will be configured to call the flow via an HTTP API trigger URL. As in method 1, the Byteline flow design consists of an HTTP API trigger node and send email node. Follow the steps to create and run the flow:

Step -2.1: Your flow should include HTTP API trigger as first-node. To configure HTTP API trigger node, click on the edit button over the top-left corner of the node.

Step- 2.2: The HTTP API trigger configuration window will open on the screen. This window shows the URL that should be hit from the web page form. The HTTP API trigger offer GET method to fetch data from the API and POST method to send data to API. Hit the save button.

The green indicators over the top-right corner show that the nodes have been configured successfully.

Step -2.3: Deploy your flow and copy the URL from the HTTP API trigger node's configuration window.

Step - 2.4: Open your Postman account to test the deployment. Paste the URL copied in the request field and select POST or GET method. Configure any data that needs to be passed to the flow using the request body. Hit the Send button. The flow will be executed and the output data will be shown in the results window.

You have successfully executed the flow using HTTP API trigger.

Method 3 - Scheduler

In this method, You can configure the scheduler to run the flow on an hourly, weekly, or monthly basis.

Step -3.1: Your flow should include Scheduler as the trigger node (first node). To configure the scheduler node, click on the edit button over the top-left corner of the node.

Step- 3.2: The scheduler configuration window will open on the screen. Set the configuration and hit the save button. You can pre-schedule your flow run in 3 ways specifically:

Hourly: To schedule hourly, you only need to select any of the options from the Every drop-down to run the flow after every 1 hour, 2 hours, or 3 hours. For example, if 2 hours is selected, it means the flow will run every 2 hours.

Weekly: To schedule your email weekly, select the multiple weekdays you want to send the email. Choose any of the options from the Every drop-down to determine the frequency of running the flow. Set the scheduled time as per the GMT timezone. For example: You went for the weekly option, selected Monday at 09:00 AM, and choose "2" to run the flow every 2 weeks.

Monthly: To schedule your email monthly, select the date you want to send the email. Choose any of the options from the Every drop-down to specify how often you want to run the flow. Set the scheduled time as per UTC or GMT timezone and hit the save button. For example: You went for the monthly option, selected day 15 at 11:00 AM, and choose "1" to run the flow once a month.

Now you can send the email at the pre-scheduled time.


How did we do?