How can I link my spread sheets to App Maker? - google-app-maker

I'm a new user of App Maker and I've just started coding with Google App Scripts, so basically I don't know so many things about the subject, and today I'm working on a app that already exists at Google Sheets, and I have to recreate it using App Maker. The only problem is that I have all my data and scripts on Google Sheets and my boss asked to not import data but to link the App Maker with spread sheet. For example I have a search form and when I click the submit button I get the values that the user entered in the form and place them into the existing search form in Google Sheets and run the script in Google Sheet, and then get the search results from Sheets and display them in App Maker, please any ideas how can I do that?

You can access Google Sheets files using Spreadsheet Apps Script API. This API provides full CRUD access to Spreadsheet files:
var spreadsheet = SpreadsheetApp.openById(spreadsheetId);
var sheet = spreadsheet.getSheetByName(sheetName);
...
Full sample code lives here:
https://developers.google.com/appmaker/samples/spreadsheet/
In answer to this question you can find high level steps to build UI for some 3rd party services with App Maker: Google App Maker how to create Data Source from Google Contacts

Related

Consolidating Firebase messaging and Google Analytics in Xamarin Forms Android project

In our Xamarin Forms app we have been using Firebase for push notifications for few years. For that purpose, we have a project in Firebase Console.
Now I needed to add Google Analytics (GA4) functionality. Based on documentation, in https://analytics.google.com/ I created a property for our project, and added a data stream for Android platform (and another data stream for iOS also, by the way). That allowed me to download a config file google-services.json to be added to the app project. A new project corresponding to the newly created data stream appeared in the Firebase console.
The problem is that the app project already has google-services.json file used for the push notifications. If I replace it with the new google-services.json, push notifications stop working. If I leave the existing google-services.json, GA4 would not work.
Of course, the google-services.json files differ. The project_number, project_id, storage_bucket, client_id etc are different, and the existing file has
"firebase_url": "https://api-1234567891482864589-273909.firebaseio.com",
which does not exist in the new file. The package_name is the same in both files.
How can I consolidate the projects to make both Firebase functionalities work? I would prefer to keep the newest project.
From document [GA4] Firebase integration
Link Google Analytics 4 properties to Firebase, we could find that :
Create a project
When you create a project in Firebase, you have the option to
integrate with Analytics. If you already have one or more Google
Analytics accounts, you can associate your project with one of those.
If you do not already have a Google Analytics Account, a new one will
be created for you with the name Default Account for Firebase.
Firebase users who have access to that project are given Analytics
user roles based on their Firebase roles (see User access above).
For more, you can check Part : Link your Firebase project to Analytics in above link.
The steps:
Set up a new Analytics link
Open your Firebase project.
Open Project settings > Integrations.
On the Google Analytics card, click Link.
Select an Analytics Account or create a new one.
If you select an existing account, you have the option to select an existing Google Analytics 4 property in that account or to create a new property.
If you create a new account, then a new Google Analytics 4 property is created for you and your project is linked to that property.
Learn more about setup and limits
Configure your Analytics settings.

missing data in Firebase / Google analytics

We accidentally unlinked our Google analytics account from Firebase and linked it to another project in another organisation.
Status quo is that in current project we do have new data from the time we proceeded the unlinking and in the old project we have old data before the time we did the unlinking. Is there any way how to merge those projects to have all data in one place ?
Your analytics data resides within Google Analytics property and not in the Firebase project. If you delete or unlink the property, then your data is unlinked from your project as well. BQ integration is disabled during this period and sometimes the exporting apps are not getting enabled after relinking.

Download File in Appmaker

I have created one app in Appmaker, I want to download certain reports from the Drive tables in Appmaker. For this currently I am creating SpreadSheet using Drive APIs. I want to add download feature as well which allows users to Download Spreadsheet in their local machine.
I have done research on Appscript which allows users to Download files using ContentService, however I do not have any HTMl page from where I can invoke this method. Are there any alternatives for this?
It seems that you can get download URL using DriveApp Apps Script service
// Server script
var downloadUrl = DriveApp.getFileById(FileIdGoesHere).getDownloadUrl();

Copy App Files and Install in a new domain using Google App Maker

After I create an app with App Maker, can I let someone copy that file and install it on a different Google Enterprise Account (i.e., a different domain). The question assumes the Domain Administrator would want this and approve it.
Definitely, you can easily export app as zip file on one domain and import it on other one. Just go to Menu -> Export (.zip):
The story about data associated with app deployments is little bit different. You can read more about this topic in official App Maker documentation:
https://developers.google.com/appmaker/models/import-export

Google App Maker app not working after deploy

I have built an app with Google App Maker which has a Suggest Box linked to a table by a Query parameter.
The app works correctly in Preview mode, but when I deploy it, the Suggest Box doesn't suggest anything!
I have deployed it once before (without a select box as I recall) and it worked correctly.
I tried redeploying to the original deployment and deploying to a new deployment, same result.
Am I missing some security setting or something?
I am using Drive Tables as my datasource. The kind people at Google sent me a couple of links which helped me to understand what's going on: previewing and publishing your application and running as user or developer.
The crux of the issue is that when you deploy an app and run it as user (default), it doesn't take any Drive Table data with it. If you want to add Drive Table data to the deployed app, you have to do this:
Open App Maker
Go to App Settings
Go to Deployments
Select your most recent deployment and click: “EXPORT DATA”
Make sure you select Preview from the Deployments drop down list.
Click Export
This will export all your Preview data to a new Google Spreadsheet.
Now go to your Drive models in the App Maker and click “IMPORT DATA FROM SHEET”
Here you can choose to import data to your Deployed version.
After completing the import process, you will have all your data in the Deployed app.
All courtesy of Google but I didn't find it in the docs, so it might help someone.
Use the browser console to see if there's an error on the connection, make sure the user has access to the datasource and if you're using cloud SQL check the parameters of cloudSQL in the publication

Resources