Note: This feature is only available in apps on paid plans. It is currently in beta.
Custom actions allow you to trigger an API request as an action. So, for example, you could make it so that when a user clicks a button, it sends a request to the SendGrid API to send an email. You can also customize the inputs of a custom action so that the data sent in the API request can use magic text and be dynamic depending on the circumstance of the user and data in your app.
Custom actions can be used for a wide variety of use-cases such as sending emails or sms, creating a contact in a CRM, getting the geo coordinates for an address, or sending data to a web hook. Check out our more in-depth list of use cases for Custom Actions.
1) Select the component you want to add a custom action to
2) Click Add Action, then in the menu, select Custom Actions. You will see a list of your existing custom actions, and the option to add a new one.
3) Specify the Type and Name of the Action
4) Configure the API Request
Set the Base URL
Add any Authentication
Format the Body of the Request
Add & Use any Inputs
Inputs can be used as Magic Text in the Request body as well as the Base URL and Authentication values. These inputs become the inputs for the Action once you've added it to your app. Note: Don't forget to add a test value for your input.
5) Test & Save your Custom Action
6) Add your Custom Action
1) Find a component that is already using the custom action you want to edit, or add it to a component.
2) With the action expanded, click on the Show Advanced button.
3) Click the Edit Custom Action button.
You can't yet use the return values of custom actions, but this is in active development.
Forms can't use custom actions, but this is on the roadmap. In the meantime, you can use individual input components to have user entered data be sent in a custom action OR you can add a custom action as a subsequent action on a form's submit button.
Custom Actions can't send multiple records in their API request.
Because both Custom Actions and External Collections are ways to integrate your app with an API, you may be wondering about the difference and when is the right time to use each.
You should use an External Collection if you need to display a list of items in your app that are stored in a 3rd party system. For example, if my restaurants menu items are already stored in Airtable, I can use external collections to display a list of those menu items in my app.
You should use Custom Actions if you want to perform a function like sending an email or getting the latitude and longitude of an address.