Google App maker API - google-apps-script

I have a requirement to pull and post data to another application. App maker provides URL fetch option to get data from public API's.
I want to access data from a application in my intranet server does app maker provides any option to connect to the outside server.
URL Fetch option is used to consume data, if I need to pass some data is there any option available to do this in app script

I have a requirement to pull and post data to another application
If you don't have strong requirements on a way how to pull/post the data you can consider sharing data via database:
Option one: shared database
You can connect App Maker and your other apps to the same Google Cloud SQL database
Option two: direct database connection
Let's say, you have App Maker app connected to Google Cloud SQL database and some internal apps connected to your internal databases. From App Maker side you can connect to your internal databases using JDBC service and you can whitelist your internal apps to connect to your Cloud SQL instance that App Maker app is connected to.
Option three: API way
At this time App Maker app cannot serve as API endpoint(How to create a rest api in app maker?)
But in theory it should work fine with third party services(External API)

Related

Can Flutterflow app access MySQL database from my Google Cloud Instance?

I will create a mobile app for Android and iOS. The purpose of the app is to access just a segment of the MySQL database, that part is for customers (the rest of the database is used by employees via my web application).
Is there a way the for FlutterFlow app to access MySQL database instead of FireBase Storage? If not, what are the alternatives?
Though flutterflow has default integration with Firebase firestore database,
below 2 approaches can be used.
API integration approach can be used to use MYSQL database.
Please refer below flow:
You can have backend Server which will host the API.
This backend server will have integration with MYSQL DB
API's will be consumed in flutterflow app
https://docs.flutterflow.io/data-and-backend/api-calls
Custom code approach (Though have not used it before)
https://docs.flutterflow.io/customizing-your-app/manage-custom-code-in-github

Is there a way to create a custom connector for other tenant?

I am looking for Is there a way to create a custom connector for other tenants or as guests?
A connector is a wrapper or a proxy around an API that interact between Power Automate or Power Apps and the back-end service or data source.
The custom connector (API connector) enables you to connect your own web API (REST API) in Power Automate and Power Apps. To create a custom connector first we need to enable authentication in Azure Active Directory then register one of the APIs as a custom connector and lastly connect to it in Power Automate.
Authentication in Azure Active Directory
First, you need to create an Azure Active Directory (AAD) application that performs the authentication when calling the API endpoint.
First create an App registration in Azure Active Directory.
Now in the settings of the registered App, go to required permission and Add API.
For more detailed information check this Enable authentication in Azure Active Directory section of the Microsoft document.
Custom connector
After configuring the AAD Application we can now create the custom connector.
After clicking the Settings at the top of Power Automate web page, select custom connector.
Select Create custom connector, then Import an OpenAPI file .
In Security page, provide AAD information for the application and set Resource URL.
For detailed information check this Create a custom connector section of the Microsoft document.

Working with azure(mysql database) in node javascript with cloud API

I'm working with an API app on Azure by deploying an API written in NodeJs which stores data in MongoDb.
Make a new API for web & mobile apps from Azure portal.
Choose MongoDb by adding MongoLab module from Azure.
Create a table (collection) and populate it with few entries.
Prepare our Git repository from Azure portal and link it to our local Git on computers.
Decide which NodeJs modules to use to set the dependencies.
Edit the configuration file for NodeJs.
Make the main API file with the following functionalities:
Connection to the database.
Running the service.Making CRUD operation services (CREATE, READ,DELETE...)
Testing our API on a browser.
Making an application using our API
My question: how to use these steps to store data in mysql database(azure)?
I cannot fully understand your requirement, do you want to use the MySQL database to store your data in your API application in Node.js? If not, please clarify your purpose.
To implement connection to MySQL in Node.js, you can use some 3rd part MySQL handler modules.
For example:
node-mysql - A pure node.js JavaScript Client implementing the MySql protocol
or
Sequelize - A promise-based ORM for Node.js and io.js
Any further concern, please feel free to let me know.

How to connect local database to Google Cloud SQL?

Since i am new to Google App Engine, I am using MySQL database locally and I am running a sample application in Google App Engine. But i need to use database also using Google Cloud SQL, I referred some details in the Google developer zone and found some information in connecting Google Cloud SQL using googlemysql connection
I have used a sample code for MySQL connection
if (SystemProperty.environment.value() == SystemProperty.Environment.Value.Production) {
// Load the class that provides the new "jdbc:google:mysql://"
// prefix.
Class.forName("com.mysql.jdbc.GoogleDriver");
url = "jdbc:google:mysql://azk-net:your-instance-name/guestbook?user=root";
} else {
// Local MySQL instance to use during development.
Class.forName("com.mysql.jdbc.Driver");
url = "jdbc:mysql://127.0.0.1:3306/guestbook?user=root";
// Alternatively, connect to a Google Cloud SQL instance using:
// jdbc:mysql://ip-address-of-google-cloud-sql-instance:3306/guestbook?user=root
}
but the thing is i cannot create instance name for my project. In local it is working correctly but i have deployed in the google app engine i am getting error since instance name is not available
I am creating the instance name in the Google Cloud SQL but it is not creating it requires billing.
can anyone help me to connect the database from local to Google Cloud SQL by writing connection properties for accessing database from Google Cloud SQL.
There's no free quota for Google Cloud SQL, you have to enable billing to use it
Google offers two billing plans for Cloud SQL: Packages and Per Use. More information on pricing for Google Cloud SQL can be found on the Cloud SQL Pricing page.

App Engine and MySQL

I just wanted to ask if we can access an external MySQL server from Google App Engine...
The only way to communicate with other hosts is by using UrlFetch that only provides HTTP and HTTPS requests.
So, you can't do it out of the box.
Anyway, if you really need to access an external MySQL server database, you should consider to expose it through a Web API (RESTful, Soap web-services for example).
In this way your data would be available also via UrlFetch.
I am still in the learning phase of all this, but I am fairly certain you can do this now a few ways:
Link Apps Scripts to App Engine and use the JDBC
Link it to Google
Cloud SQL Store your SQL database on Google Cloud Store
Connect Apps Scripts via spreadsheet scripting
"Google Apps Script has the ability to make connections to databases via JDBC with the Jdbc Service. The current support extends to MySQL, Microsoft SQL Server and Oracle. Apps Script makes it easy to connect to databases hosted on Google Cloud SQL, but also works with other cloud hosting platforms and even local databases." https://developers.google.com/apps-script/jdbc
(edited for structure)
It is still not possible to native connect GAE to an external MySQL server the only exception is Googles Cloud SQL. We are using it in our production environment and like the experience. Stable and the performance is good.
GAEs own database scales well and we are using it in most situations, but in cases where we need to ask more complex questions or need aggregate functions, we use Googles Cloud SQl.
These answers are a bit outdated. Google App Engine instances can connect to external database servers.
The ability to connect externally requires that the account the App Engine is running under be a "paid account" a/k/a "billing enabled".
References:
-https://cloud.google.com/appengine/docs/php/using-third-party-databases
-https://cloud.google.com/appengine/docs/php/runtime#PHP_Functions_that_requires_billing_enabled