Giter Club home page Giter Club logo

apps-script-intro-codelab's Introduction

Apps Script introductory codelab

This codelab introduces developers to Google Apps Script, our customized JavaScript-in-the-cloud application hosting platform which gives developers integrated access to G Suite, Google, and external services. Access it at http://g.co/codelabs/apps-script-intro.

Prerequisites

  • A Google account (G Suite accounts may require administrator approval)
  • Basic JavaScript skills
  • Basic spreadsheet skills

Introduction

The codelab introduces developers to one of the easiest ways to write code that accesses Google developer technologies, all by leveraging one of the mainstream web development languages, JavaScript. Using Google Apps Script, you will write code to extract an address sitting in a cell in a Google Sheet, generate a Google Map based on that address, and send a link of the map to yourself or a friend using Gmail. The best part? It's only 4 lines of JavaScript!

If you're completely new to Apps Script, check out our overview video. A longer intro video can be found here as well as another video walking you through the code in this codelab & repo.

Support

If you've found an error in this sample, please file an issue. Patches are encouraged, and may be submitted by forking this project and submitting a pull request through GitHub. See CONTRIBUTING for more information.

apps-script-intro-codelab's People

Contributors

dh-- avatar googleworkspace-bot avatar wescpy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

apps-script-intro-codelab's Issues

[SyncRepoSettings bot] - Invalid config file

Failed to validate the config schema at '.github/sync-repo-settings.yaml': [
{
"instancePath": "/permissionRules/1/permission",
"schemaPath": "#/properties/permissionRules/items/properties/permission/enum",
"keyword": "enum",
"params": {
"allowedValues": [
"pull",
"push",
"admin"
]
},
"message": "must be equal to one of the allowed values"
}
]

Schema can be found at https://github.com/googleapis/repo-automation-bots/blob/main/packages/sync-repo-settings/src/schema.json

tutorial example code does not work: API credentials needed?

I tweaked the script to populate a cell with the mapURL:

function sendMap() {
  var sheet = SpreadsheetApp.getActiveSheet();
  var address = sheet.getRange('A1').getValue();
  var map = Maps.newStaticMap().addMarker(address);
  sheet.getRange("A2").setValue(map.getMapUrl());
}

The script works, but the url leads to a page which displays the following html:

The Google Maps Platform server rejected your request. You must use an API key to authenticate each request to Google Maps Platform APIs.

I could not find any info on where to set the Google Maps API key on Google Scripts documentation.

App blocked

Once I run this code I receive this error message and the authorization page is not shown.

6:58:52 PM Warning This project requires access to your Google Account to run. Please try again and allow it this time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.