Forms
Table of contents

Connecting flows

Build custom logic and automations for your forms. Run them by simply connecting each one to a form step, and before or after submission.

Add logic and automations

To connect a flow to your form:

  1. Go to the Forms editor.
  2. Open the forms and click on the Flows icon, on the light grey menu. 
  3. Click on the plus button to create a flow or choose an existing one from the selector.

To open a flow in a new tab, simply click on the icon next to the plus button.

Form stages you can execute flows

If this is your first time using Arengu, maybe you still don't know when to execute flows or some kind of actions. Let's see in detail each stage and some common examples.

Between form steps flows

These flows are executed between form steps, just before the user goes to the next one. This means that they are going to be executed when the user clicks on the next step button.

Common flows to run on this stage are:

  • User verifications. Verify user email address or phone number, to check if provided info is valid, correct and real, avoiding fraud and fake users.
  • OTP generation. Generate custom one-time passwords (OTPs) and send them to our users by email or SMS.
  • Check your users database. Find out if a user is already registered in your database, and make a redirection to log them in instead of displaying a sign up form.

For example, if you are building a passwordless login using an email OTP, your Step validation flows stage should be similar to this:

Before form submission flows

These flows are executed just when the form is submitted, but before the user receives a failure or success response. Note that if you add the action Submit form in any of the Step flows, it will force the submission without running the Before submit flow.

Common actions to include on this stage are:

  • Set cookies. Configure cookies to store user data for tracking purposes.
  • Make redirections. Send the user to a destination domain or URL.
  • Create an account. Signup or log the user into your website's database.

For example, we can check an OTP and make login redirections on a before form submission flow like this:

After form submission flows

These flows are executed only when the form is successfully submitted. This means that the user has already sent the complete form and its content is valid and approved.

Useful and common flows on this stage are automated tasks like:

  • Welcome emails. Send an automated welcome email to your new users, triggering an integration with MailJet or SendGrid.
  • Create contact in CRM. Create a new register in your content manager, making easy integrations with HubSpot or any other one with an API.
  • Real time notifications. Get customizable notifications with Slack or Telegram when a user signs up.
  • Data enrichment. Save extra data about the provided company from its website domain or about a person from a corporate email.

For example, after someone signs up, you can enrich information using Clearbit, create a contact in your CRM and automate notifications with Slack.

If you want to know more, you can learn here how to build flows with Arengu.