If you have installed 
 
You need to install
You can also do:
 
#python #google_api_python_client
  google-api-python-client and got below error on authentication:No crypto library available
You need to install
PyCrypto using pip or PyOpenSSL.You can also do:
sudo pip install PyOpenSSL --upgrade
#python #google_api_python_client
https://www.cagrimmett.com/til/2016/07/07/autofill-google-forms.html
#google #google_forms #prefill #prefill_google_forms
  
  #google #google_forms #prefill #prefill_google_forms
Chuck Grimmett's blog
  
  How to Pre-fill Google Forms
  Did you know that you can pre-fill Google Forms based on a URL? Did you also know that automate it with a database and send personalized forms via services l...
  Send 
 
You need to add
Read more about webhooks for slack here:
- here: https://api.slack.com/incoming-webhooks
That's all! Now will have all your submitted forms in Slack. Voila!
#google #slack #forms #google_forms #webhook #hook #javascript
  
  Google Forms to Slack# read more about slack web hooks here: https://api.slack.com/incoming-webhooks
var POST_URL = "https://hooks.slack.com/services/YOUR_TOKEN";
function onSubmit(e) {
var response = e.response.getItemResponses();
var toType = function(obj) {
return ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase()
}
// "Form Respondent: " + e.response.getRespondentEmail()
var email = response[0].getResponse();
var field2 = response[1].getResponse();
var field3 = response[2].getResponse();
var field4 = response[3].getResponse();
var d = "*SUBMITTED FORM*\n>>>Email: " + email + "\n";
d += "other fields: \n" + field2 + field3 + field4;
var payload =
{ "payload": '{"text": "' + d + '"}' }
var options =
{
"method" : "post",
"payload" : payload
};
UrlFetchApp.fetch(POST_URL, options);
};
You need to add
javascript code above to Script Editor section of google form. When you are in form editing mode click the three   dot in top corner and click on Script Editor. When your're done click on save and give a name to your project script. Now on the     script editor page click on edit -> All your triggers and bind your script to form onSubmit event.Read more about webhooks for slack here:
- here: https://api.slack.com/incoming-webhooks
That's all! Now will have all your submitted forms in Slack. Voila!
#google #slack #forms #google_forms #webhook #hook #javascript
docs.slack.dev
  
  Sending messages using incoming webhooks | Slack Developer Docs
  Incoming webhooks are a way to post messages from apps into Slack. Creating an incoming webhook gives you a unique URL to which you send a JSON payload with the message text and some options. You can use all the usual formatting and layout blocks with incoming…
  How to query on Google Big Query?
Big Query or for short BQ is a data warehousing solution that puts your data on a serverless platform with no limit on data size and processing power. It is design for this specific purpose and returns aggregated results in a fraction of a second most of the time.
In python you can use its library by installing
 
Now create a service account as stated in link below:
https://cloud.google.com/bigquery/docs/reference/libraries
We assume that you have done the installation and configuration process for now. To query on
 
You can send
#google #BI #bigdata #bigquery #warehouse #data_warehouse
  
  Big Query or for short BQ is a data warehousing solution that puts your data on a serverless platform with no limit on data size and processing power. It is design for this specific purpose and returns aggregated results in a fraction of a second most of the time.
In python you can use its library by installing
google-cloud-bigquery:pip install --upgrade google-cloud-bigquery
Now create a service account as stated in link below:
https://cloud.google.com/bigquery/docs/reference/libraries
We assume that you have done the installation and configuration process for now. To query on
BQ:from google.cloud import bigquery
bigquery_client = bigquery.Client()
dataset_id = 'MY_PROJECT'
query = ("SELECT user_id FROM MY_PROJECT.users LIMIT 100")
# API CALL
query_job = bigquery_client.query(query)
for row in query_job:
print row.user_id, row['user_id']
You can send
update commands like the above query too.#google #BI #bigdata #bigquery #warehouse #data_warehouse
Google Cloud
  
  BigQuery API Client Libraries  |  Google Cloud
  Information about interacting with BigQuery API in C++, C#, Go, Java, Node.js, PHP, Python, and Ruby.
  
  Tech C**P
How to query on Google Big Query?   Big Query or for short BQ is a data warehousing solution that puts your data on a serverless platform with no limit on data size and   processing power. It is design for this specific purpose and returns aggregated results…
   In 
 
The response differs based on the given scope on the first login step. Mine was set to the below:
 
#google #login_with_google #oauth #scope #userinfo #oauth2
  Google OAUTH 2.0 in case you get a token from Google Login you can get user's information for that token by sending a simple GET request to the following URL:https://www.googleapis.com/oauth2/v1/userinfo?alt=json&access_token=YOUR_GOOGLE_TOKEN
The response differs based on the given scope on the first login step. Mine was set to the below:
https://www.googleapis.com/auth/plus.me https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
#google #login_with_google #oauth #scope #userinfo #oauth2
 How 3rd Party Logins work like 
In order to understand this concept you need to read a little bit about OAuth 2.0 flow. The flow that frontiers use in order to get access token is called
For example for
- https://accounts.google.com/o/oauth2/v2/auth?client_id=YOUR_CLIENT_ID&redirect_uri=https://example.com/callback. html&response_type=token&scope=openid+profile+email&prompt=select_account
But there are lot more going on in the background. How a modal is opened? Or when modal get the token how it sends access token to the main window (parent window)? How do you close the opened modal after successful authorization?
These are all critical questions that any frontier programmer needs to know.
One the simplest forms of opening a popup is:
 
We store the popup object in
- https://example.com/callback.html
Inside of that HTML you get the parameters.
 
Here get the hash part using
 
We get the hash part as
#javascript #google #3rd_party_login #login #facebook #oauth #oauth2 #implicit_flow
  Facebook, Google, etc?In order to understand this concept you need to read a little bit about OAuth 2.0 flow. The flow that frontiers use in order to get access token is called
Implicit Flow in this scenario in one go you get an access token and you don't need to send your client       secret as everything in web is plain and end users can inspect it.For example for
Google authentication, you use the below link with resopnse_type of token NOT code (code is a 2-step             authentication flow):- https://accounts.google.com/o/oauth2/v2/auth?client_id=YOUR_CLIENT_ID&redirect_uri=https://example.com/callback. html&response_type=token&scope=openid+profile+email&prompt=select_account
But there are lot more going on in the background. How a modal is opened? Or when modal get the token how it sends access token to the main window (parent window)? How do you close the opened modal after successful authorization?
These are all critical questions that any frontier programmer needs to know.
One the simplest forms of opening a popup is:
window.popUpObj = window.open(url, '_blank')
We store the popup object in
window.popUpObj in order to be able to close it in the future. As we just said in google link above we  have a parameter called redirect_uri, here you put a link to where you need to get the parameters from your 3rd party. Here we have  set it to:- https://example.com/callback.html
Inside of that HTML you get the parameters.
Google sends data in a hash section of the URL so in callback.html we get the hash     like below and then send it to the parent window using window.opener:<script>
window.opener.loginCallback(window.location.hash);
</script>
Here get the hash part using
window.location.hash and pass it to parent window function loginCallback. This function is defined    in your main js file like below:window.loginCallback = function(args) {
     console.log('Login callback has been called, token: ', args);
     window.popUpObj.close();
 }We get the hash part as
args and then close the child window using window.popUpObj.close(). This is the object we have recently    stored to refer later.#javascript #google #3rd_party_login #login #facebook #oauth #oauth2 #implicit_flow
