Adding a New Data Source

You can load a data source for use in your app that will automatically update when your page is first loaded.

These data sources can then be used in your page builder to populate tables, dynamic text, and more.

At the bottom of the page, click “Add Data Source” to begin. You can use either a Google Sheet or API endpoint as a data source, so select the appropriate source.

Google Sheets

Choose your spreadsheet from the dropdown menu, and if you’d like Frontly to retrieve just one row of data, you can enter the row ID of the data you’d like to see.

Leave this field blank to retrieve the whole spreadsheet.

You can also tell Frontly to retrieve a single line of data dynamically by clicking Insert Data, and selecting a data source. You’ll need to provide the field that will act as the dynamic variable. This needs to be a unique identifier, so generally pick the Frontly ID here.

Selecting a Data Source for a Row ID

Selecting a dynamic variable as a Row ID

When this action is run, Frontly will retrieve the data associated with the line item attached to that Frontly ID, and this can change dynamically as the page URL is changed.

To learn more about dynamic page ID’s, click here.

Make sure to click Run Action to fetch the data for use in Frontly (otherwise no data will be pulled in).

Using Data Filters

If you have multiple items, all associated with a certain ID, such as a product ID, you can retrieve all data related to that ID by using the Filters field.

For example, we could set up our Data Source with “cookies” as the Product ID that we want to see, and this data source will pull in all line items associated with Cookies.

Under the Filters heading, select New Item+. Set the Key as your column name in Sheets, and the value can be any filtering word you’d like. You can also set this as a dynamic value using a variable.

Using an API Request

You can make an HTTP Request to an API endpoint in a similar way.

Click Add Data Source, and enter your API endpoint. You can then retrieve data from your API, and can also add headers to filter the data.

Make sure to click Run Action to fetch the data for use in Frontly (otherwise no data will be pulled in).

You can then use this API data as a source within your Frontly apps.

Did this answer your question?