Sample Flows

This article shares some possible use cases your implementation could support, as well as an example flow that could support each use case. You're certainly not limited to these use cases, but they can be a helpful jumping off point as you plan your implementation.

Send an email on a button click

Send an email to site collaborators when a visitor to your site clicks a button.

  1. In the Automations page of your site dashboard, create an automation in the automation builder. Choose Velo code trigger as the automation trigger and copy its trigger ID. Choose Send an email as an action.
  2. In the editor, create a button on your site page and add an onClick() handler for it in the page code.
  3. Add a web method in your backend code that wraps runTrigger().
  4. Export the web method to your page code. Inside the onClick() handler, call the web method.

Update a Google sheet when a user inputs a value

Update a Google sheet when a text input field loses focus after a site visitor enters data.

  1. In the Automations page of your site dashboard, create an automation in the automation builder.
  2. Choose Velo code trigger as the automation trigger and copy its trigger ID. Configure the trigger payload with at least 1 field.
  3. Choose Update Google Sheets as an action. Connect your Google account if necessary, then select a sheet and match the sheet columns to the payload fields.
  4. In the editor, create an input field and add an onBlur() handler for it in the page code.
  5. Add a web method in your backend code that wraps runTrigger().
  6. Export the web method to your page code. Inside the onBlur() handler, call the web method. Pass in a payload that matches the schema structure you defined. Include the input field value in this payload.
Did this help?