Topics and lessons

Building your first custom flow part

When your application is past the level of only registering data, you will quickly find the need for more complex processes. This is where custom flow parts come into play.

How to build a custom flow part

Just like the built-in flow parts, you can use custom flow parts in automation flows and user flows. Follow the steps below to create a very simple custom flow part that sends a notification email to an address you provide it as an input:

  1. Go to design and then flow parts:
  1. Click the add button to add a new flow part:
  1. A new, empty flow part named New flow part is created and opened. To rename the flow part, click the edit icon next to the flow part name:
  1. Name your flow part Send notification email.
  2. Now enter add mode by clicking the add button:
  1. The button will turn blue to indicate that add mode is active.
  2. Start by selecting the starting point which currently says no inputs:
  1. You will now see two square add buttons, one to add an input and one to add a step to the flow.
  2. Add an input by clicking the square add button under the highlighted No inputs text:
  1. In the dialog, select Texts and then E-mail address to make the input an email address.
  2. When asked whether it should be a list or a single email, choose One e-mail.
  3. Name the input To address. You have now got a flow part with a single input, named To address, of type E-mail address:
  1. Now press the add button at the end of the arrow to add a step to your flow part:
  1. From the list of actions, choose Send e-mail:
  1. In the next step you can type an email. Let’s keep it simple and type: This is a notification.
  2. Choose to use A specific subject.
  3. Type in a subject, for example New notification.
  4. Choose to send the notfication to A value or list of values from the flow part.
  5. Triggre now shows you a list with all the available values you can use. In this flow part, only one value is compatible, the To address:
  1. Skip the CC or BCC step.
  2. Choose to send the email from A specific address and type your own email address for example.
  3. Don’t add any attachments.
  4. Name the action Send notification.
  5. Now click the add button after your newly created action:
  1. Choose the option to End the flow part after Send notification.
  2. Click the main add button again to exit add mode:
  1. Go back to the list of flow parts by clicking the back button:
  1. Your flow part is now ready to be used!
Tip: Always name your flow part and actions in it after the action performed, e.g. ‘Generate offer document’ or ‘Calculate shipment costs’ as this makes it easiest to read your flows.