Datasource

This article describes our Datasource Feature and how this powerful tool can help unlock even greater potential for your mobile application

Tim Tietz avatar
Written by Tim Tietz
Updated over a week ago

What is the Datasource Tool?

The Datasource Tool is a feature within the BuildFire platform designed to empower app developers and creators with the ability to integrate, manage, and display external data seamlessly within their applications. It acts as a bridge between your app and external data sources, ensuring real-time data connectivity.

Benefits:

  • Real-time Data Updates: Any changes made to the external data source are instantly reflected in your app.

  • Flexibility: Connect to a wide variety of data sources, from databases to web services.

  • Streamlined App Development: Reduce manual data input and ensure your app always displays the most up-to-date information.

Setting Up BuildFire's Datasource Tool:

In order to get your environment set up you will want to add a new data source to your control panel and in order to do that you will want to perform the following steps:

  • Click on “Advanced”

  • Click on “Integrations”

  • Click on “Data sources”

You will now be able to begin setting up a New Data Source.

When you click on "New Datasource" you will have the ability to select 1 of 2 different datasources:

  • Web API

  • Google Sheet

Option 1: Web API

Datesource ID: This is the unique identifier assigned to the specific data source you are using. This is the parameter used to specify which data source you're interested in querying.

GET: Used to request data from a specific resource

Request Headers: Provides information about the resource to be fetched

Params: These are the parameters for your data

After you've added your information, make sure you hit Save and your new Datasource will be added!


Now that you've added your Datasource you can link it to the expression you would like it to be a part of. This can be done by going into a plugin's text WYSIWYG editor and inserting the express into the plugin.

Again, this can be done on any Text WYSIWG within a plugin, it is not plugin specific.

Under insert expression, you will gain access to the expression builder and can now add the values you'd like to insert.

Once you've added your expression, click Evaluate and it will run the results. When you're happy with the results click on "user expression" and this will save that expression to the Text WYSIWYG field.

In the editor, you will now see your custom-built expression and the content in the app emulator.

Option 2: Google Sheet

From the side menu of your control pannel click on the Gear Icon then Integrations and then Datasources from the menu.

Click on New Datasource and select Google Sheet

From here you will need to set your Google Sheet up for use:

Once logged you will either select an existing project or create a new project.

Once created click on the side menu and select API & Services > Library

In the Library, Search for "Google Sheets API" and select it

Once located please enable your Google Sheets API - If it's already enabled please feel free to skip this step.

Once enabled it will look like this

Once enabled you will click on the side menu then on APIs and Services and then on Credentials

After clicking on credentials you will click on Create Credentials and API Key this will generate your Google Sheet API Key.

Once the API key has been generated you will need to configure the API key now.

Give your API a Name and the scroll down to Restrict Key and switch it from don't restrict to restrict.

Once on Restrict Key you will select Google Sheet and press okay.

Once done, click on Save.

After clicking Save you will be brought to the Credentials Home Page with your newly created API key.

Click on "Show Key" and copy your newly generated API Key. Now, we will take this API key and bring it back to the Control Panel > Datasources to add it to the Google Sheet Datasource.


Back in the Control Panel, you can now begin to fill out the fields with the required information.

  1. Sheet Name: This will be the name of your Google Sheet and can be found on the bottom lefthand corner of that sheet.

2. Sheet ID: This will be found by clicking on "Share" from your Google Sheet - the ID will be the long number found in the URL after d/ as seen below:

3. Datasource ID: This will be the ID for the data set you will be fetching data from, in the end it will look like this:

When you are ready to pull in the data you will then click on "Fetch Data" to pull in your code, make sure to click Save to save all your hard work.

If you should have any questions on this please reach out to support@buildfire.com and we will be more than happy to help.

Did this answer your question?