CodeMash
  • 🚀Backend as a service
  • 🦄Roadmap
  • 🍕Release Notes
  • Installation
    • Managed Service
    • 🏗️AWS-CDK
    • 🏗️Azure
    • 🏗️Docker
    • 🏗️GC
    • 🏗️Terraform
  • dashboard
    • CodeMash Cloud
    • Project
    • Membership
      • Users
      • Roles
      • Policies
      • Triggers
      • Integrations
        • Apple
        • Azure
        • Facebook
        • Google
        • Twitter
      • Settings
    • Database
      • Collections
        • Schema
          • From Template
          • Structure
        • Tabs
        • Triggers
        • Indexes
        • Shared Forms
      • Taxonomies
        • Terms
        • Schema
        • Settings
      • Aggregation
      • Imports
      • Exports
      • Backups
    • Files
      • Integrations
        • CodeMash
        • S3 Bucket
    • Notifications
      • Push
        • Push Templates
        • Push Templates API
        • Push Notifications
        • Push Notifications API
        • Devices
        • Devices API
        • Integrations
          • Firebase
          • One Signal
          • Expo
      • Email
        • Email Templates
        • Emails
        • Integrations
          • AWS SES
          • Twilio Sendgrid
          • Mailgun
      • 🏗️Server events
      • 🏗️Sms
    • Payments
      • Integrations
        • Apple Pay
        • Google Pay
        • Stripe
        • Kevin.
        • Paysera
        • Decta
    • Scheduler
    • Logs & Monitoring
    • Code
      • Functions
        • Function Inputs
        • Function Templates
          • Node.js
          • Python
          • Ruby
          • Java
          • Go
          • .NET Core
      • CodeMash Functions
        • Google Functions
          • Google Calendar
          • Google Gmail
        • Microsoft Functions
          • Microsoft 365 Users
          • Microsoft 365 Calendar
        • Collection Find
        • Collection Update
        • Users Find
        • Image Resize
        • Html To Pdf
        • Word Document
        • Barcode
        • QR Code
        • Send Email
        • Send Notification
        • Email Reminder
        • Notification Reminder
      • Integrations
        • AWS Lambda
        • Google Cloud Functions
        • Azure Functions
  • Other Topics
    • Apple
      • Developer Portal
      • Bundle Identifier
      • Team ID
      • Service ID
      • Key ID
    • Triggers
    • Tokens Binding
      • Project Tokens
      • Initiator Tokens
      • Receiver Tokens
      • Request Tokens
      • Operation based tokens
      • Template Functions
    • Search parameters
      • Paging
      • Filter
      • Sort
      • Projection
    • data-models
    • Errors
  • SDK
    • Node.js
    • TypeScript
    • .NET
    • 🏗️Go Lang
    • 🏗️Flutter
    • 🏗️Swift
    • 🏗️Kotlin
  • CLI
    • 🏗️CodeMash CLI
  • API
    • Get Started
    • Prerequisites
    • How to test?
    • Cors
    • Project
    • Membership
      • Authentication
      • Users
    • Database
      • Collections
        • Aggregate
        • Change Responsibility
        • Count
        • Delete
        • Delete Many
        • Distinct
        • Find
        • Find One
        • Insert
        • Insert Many
        • References
        • Replace
        • Update
        • Update Many
      • Taxonomies
        • Find
    • Files
    • Code
    • Notifications
      • Push
      • Emails
      • Server Events
      • 🏗️Sms
    • Payments
    • Scheduler
    • Logs & Monitoring
Powered by GitBook
On this page
  • API implementations
  • User authentication
  • API authentication
  • Service accounts
  • External references

Was this helpful?

Edit on GitHub
  1. dashboard
  2. Code
  3. CodeMash Functions

Google Functions

Overview of Google functions

PreviousCodeMash FunctionsNextGoogle Calendar

Last updated 4 years ago

Was this helpful?

Google provided API services implemented in CodeMash. These functions allow to easily integrate Google provided services, like calendar and GMail, into CodeMash.

API implementations

The following are implemented Google resource functions.

User authentication

To be able to use these functions, enable Google authentication in Membership settings. Check how to do that by going to a page below.

API authentication

To use these functions you will need to enable Google authentication in your membership settings. Then you will have to add scopes that you want your users to consent to during the login process.

Here we have two fields for scopes, the upper one is treated as a default, the second one is for Dev mode. The default scopes are always used unless Override default is checked and mode is passed during the authentication process. This could be helpful if you are developing your application further and want to add more scopes in a development environment without changing production.

Service accounts

If you are using G Suite or Google Groups, you can use service accounts to use Google services. The following shows how to setup G Suite to work with CodeMash.

Setting up G Suite

  • Once logged in, create a new project if haven't created yet during the authentication setup.

  • Navigate to Credentials and click Create Credentials. Select Service account.

  • Set the name and create. Proceed to the next steps.

  • In the third step, Grant users access to this service account, in field Service account users role, set your G Suite domain. Another field is not required.

  • After that, create a JSON key and click done.

  • From the admin console home page navigate to Security > API Permissions > Manage Domain Wide Delegation. Here click Add New.

  • Here Client ID will be the ID of your created service account. Go back to the developers console and open service account details. Copy value under the Unique ID field.

The only thing that's left - adding created service account to CodeMash.

  • Once again, navigate to the developers console and open created service account details. If you haven't created the JSON key yet, then create it. Else if you already have a file, proceed to the next step.

  • Go to CodeMash project membership settings, select Google authentication, and open service accounts tab.

  • Here add service account.

  • For name, set any name. For scopes, set the same scopes as they are in G Suite. For service JSON key, paste the downloaded file content.

Now you can use your service account in Google functions.

External references

As all of these functions uses Google API, you will find all of the details in the official documentation:

Go to and login with your Google (or G Suite) account.

After that is done, navigate to admin console.

For scopes, you can get all the scopes from . In the documentation select the APIs you want. Then select references from the top menu, and you will find scopes near each HTTP request.

Google developers console
G Suite
G Suite API
Google API references
Google Calendar
Google Gmail
Google
Google API settings
Google service account creation