How to automatically save bluetooth data to Google sheet using mit app

Hye, i need a help to automatically save my sensor data from mit app to Google sheet.
I have done with bluetooth connection to mit inventor app but don't have any knowledge how to save automatically to Google sheet

Some Google things.....

AI2 and Google Drive/Docs/Sheets
 
HOWTO: Query Any Google Sheet with a Web App.
UPDATED! HOWTO - Upload Any File to Google Drive !
HOWTO: Use AI2 to directly submit Google Form Data
HOWTO: Google Drive - Multiple Files Download (file by file)
HOWTO: Download Google sheet as CSV
HOWTO: Send Data to Google Sheet with Web App
HOWTO: Show Image from Google Drive
HOWTO: Upload Image to Google Drive using base64 and Google Apps Script Web App
HOWTO: Upload Image to Google Drive using base64 using Camera Image
HOWTO: Get Data from Private Google Sheet with A Google WebApp
HOWTO: Get the ID of Image after uploading using base64
HOWTO: Upload CSV or List to Google Sheet
HOWTO: AI2 - Google Sheets - Web App - Create/Read/Update/Delete
HOWTO: OCR Images and Camera Pictures with Google Docs
HOWTO: OCR pdf and image files using Google Docs OCR function
HOWTO: Upload "Any" File to Google Drive
HOWTO: Use google web app and google query to download filtered output as pdf from Google Sheet
HOWTO: Use Ai2 to Delete Images (or other files) on Google Drive
HOWTO: Take Photo, get GPS Location and Address, upload Image to Google Drive, and save Location data to spreadsheet 
HOWTO: Select a Single Row from a Spreadsheet, and howto EDIT that data

Create a google sheet on your google drive and get title to the data columns that you need, then, you can see this image:
https://community.appinventor.mit.edu/uploads/default/original/3X/7/8/78cd7b31d147dd5f7206117b13d0a2ea70a6ac66.png
For blocks and write this Google app script
function addSheetDataRow(e, sheet){
var PhoneNumber = e.parameter.PhoneNumber
var ToShare = e.parameter.ToShare
var Action = e.parameter.Action
var Latitude = e.parameter.Latitude
var Longitude = e.parameter.Longitude
var Altitude = e.parameter.Altitude
var Adress = e.parameter.Adress
sheet.appendRow([PhoneNumber, ToShare, Action, Latitude, Longitude, Altitude, Adress])
}
function doGet (e) {
var ss = SpreadsheetApp.openByUrl("https://docs.google.com/spreadsheets/d/1u-pYs55SpB-X39_kblHtt4ue3HDEB9cXMOwAjPvOuKs/edit#gid=1182466262 1");
addSheetDataRow (e, ss);
}
function doPost (e) {
var ss = SpreadsheetApp.openByUrl("https://docs.google.com/spreadsheets/d/1u-pYs55SpB-X39_kblHtt4ue3HDEB9cXMOwAjPvOuKs/edit#gid=1252746804");
addSheetDataRow(e, ss);
}
//change links in the apps script to the your spreadsheet link.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.