Simple Custom Action Walkthrough
In the Example below, we are going to use a simple RestAPI to get and display data in your app.
Example: Getting a Daily Joke From an API
Let’s say you want your app to tell a joke when someone taps a “Make Me Laugh” button. You can do this by connecting to a public joke API.
Add a Button On your screen, add a button and label it “Make Me Laugh.”

Create a Custom Action Select the button, click Add Action, and choose Custom Action. Scroll down to +New Custom Action.

Set Up the Request
Method:
GETURL:
https://official-joke-api.appspot.com/jokes/randomYou don’t need headers or a body for this one — it’s ready to go.
Run Test Request Click Run Test Request.

View Response
Click Show Full Response
You’ll see a JSON response that looks like this:
{ "type": "general", "setup": "Why don’t skeletons fight each other?", "punchline": "They don’t have the guts." }
Add Outputs
Click +Add Item

Add
setupandpunchlineas Text fields

Save your Custom Action
Display the Joke
Add Input components to Display the setup and punchline
Add an Action on the Button following the Custom Action which Changes the Input Value for each output.


Preview and Test

Now, every time someone taps Make Me Laugh, your app will fetch a brand-new joke from the API and display it instantly.
If you wish to use the output to update or create a record in your Adalo database, you can add a follow-up Update or Create action after your Custom Action. From there, use the Outputs from your Custom Action to set properties in a collection.
For example, you could create a new property in the Logged-in-User record named Daily Laugh. After running a Custom Action that returns a Joke, you could update the Logged in User Property to the Custom Action → Setup/Punchline output.
Last updated
Was this helpful?