> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt ## Resource: Sample Flows ## Article: Sample Flows ## Article Link: https://dev.wix.com/docs/api-reference/business-management/automations/triggers/custom-trigger/sample-flows.md ## Article Content: # 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](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Ftriggers) 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. 1. In the editor, create a button on your site page and add an [`onClick()`](https://dev.wix.com/docs/velo/velo-only-apis/$w/button/on-click.md) handler for it in the page code. 1. Add a [web method](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/backend-code/web-modules/about-web-modules.md#web-methods) in your backend code that wraps [`runTrigger()`](https://dev.wix.com/docs/sdk/backend-modules/automations/triggers/custom-trigger/run-trigger.md). 1. 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](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Ftriggers) page of your site dashboard, create an automation in the automation builder. 1. Choose **Velo code trigger** as the automation trigger and copy its trigger ID. [Configure the trigger payload](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/automations/add-a-custom-trigger.md#define-the-payload-structure-optional) with at least 1 field. 1. 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. 1. In the editor, create an input field and add an [`onBlur()`](https://dev.wix.com/docs/velo/velo-only-apis/$w/text-input/on-blur.md) handler for it in the page code. 1. Add a [web method](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/backend-code/web-modules/about-web-modules.md#web-methods) in your backend code that wraps [`runTrigger()`](https://dev.wix.com/docs/sdk/backend-modules/automations/triggers/custom-trigger/run-trigger.md). 1. 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.