user.email. The values of these variables are taken from an authentication provider, so the app must authenticate the users first in order to get these values.
user.idvalue when storing a new note in the table. Finally, we'll set up a personalised message, where the user will see their own email as part of a greeting message.
Copy Baseto duplicate to your account.
user.emailvariable. We'll use the Airtable wizard when adding the API endpoint tutorial to speed things up - we'll need to provide the Airtable base URL and the API Key of our account.
user.id. The value for this variable will be filled once the user is logged in, so each user will only be able to see their own notes.
user.idwith the value
test_id(this is the value we have in our Airtable base for the three sample notes). Then, hit
Send. This will return the three sample notes.
GETGet User Email
user.emailvariable in the welcoming message. As Bravo binds the data that comes from an API, we first need to send the
user.emailvariable to an API service once the user is logged in, then fetch it from that API to display it on the screen. There's a service called httpbin that allows you to create a request URL with a certain parameter, that will trigger a response containing that same parameter. This way, we can send the user.email variable to the httpbin service, and fetch it again using the same GET request.
user.emailvariable to the httpbin service as a query parameter, and get that value back in the response body (received data).
user.emailwith the value
user_test(just a sample value, you can use any value you wish). Then, hit
Send. We need to do this in order to configure the request for later use in our app.
.data.args.name**parameter. You'll see here the value you set as a parameter before sending the request. This will be the parameter that we'll bind to the home screen later, to display the welcome message with the user email.
user.idvariables, respecting the structure that we created in Airtable.
JSON, and copy the following JSON body. In this body, we defined the
user.idvariables with the dollar sign and the brackets. The
noteContentvariable value will be fetched later from one of the screens, and the
user.idwill be automatically filled in by Bravo with the
user.id). In the Parameters tab, set those test parameters to any value you wish.
Send. You should see the test parameters you have set both in the Airtable base and in the Received Data tab. We'll not need any of those values that we get in the response (recall that we have set a List Notes request to display all the notes), you can just leave it as it is.
user.emailvariable to display a welcome message. We'll use the API request we specifically created for this, with the httpbin service.
Usertext element in the
greetingframe, and bind it to the variable containing the user email. The name of this variable is set in the Selected Data tab of the Data Library, go there and check it out if you're not sure of which variable you should select.
Recordsvalue on the right pane, and the Note text element inside to the variable representing the note content (remember that this is set in the Selected Data tab of the Data Library).
Add note...text form field inside of the main container, and bind it to the
noteContentvariable we defined in the JSON body of the Add Note request.
Go To Page, and choose the Notes page. This way, the app will navigate to the Notes screen after the user submits a new note. You can also set up a message to display in case an error occurs when sending the note.