@martip/node-red-google-apis 1.0.4

Node-RED node for accessing the Google APIs, using the official supported client library (google-api-nodejs-client).

npm install @martip/node-red-google-apis

A Node-RED node for accessing the Google APIs, using the official supported client library (google-api-nodejs-client).

Install

Either use the Node-RED Menu - Manage Palette - Install, or run the following command in your Node-RED user directory - typically ~/.node-red

npm install @martip/node-red-google-apis

Usage

You choose the API and the method to call, either in the node configuration or dynamically (msg.api and msg.method).

The parameters are passed to the node in msg.payload.

Response Parsing

Depending on the method called, the received buffer can be converted to a string (msg.payload.toString()), an object (JSON.parse(msg.payload.toString())) etc.

Auth

This node requires a Google Service Account.

The credentials for this account can be set statically, using a shared configuration, or dynamically, passing some properties to the node.

Static

Paste the JSON of the account key and the required scopes in the configuration node.

Dynamic

Use msg.credentials to pass the required parameters to the node:

msg.credentials = {
  key: '-----BEGIN PRIVATE KEY-----\n ... \n-----END PRIVATE KEY-----\n',
  email: '[your-account]@[your-project].iam.gserviceaccount.com',
  scopes: [
    'https://www.googleapis.com/auth/...',
    'https://www.googleapis.com/auth/...',
    ...
  ]
};

References

Node Info

Version: 1.0.4
Updated 1 year, 2 months ago
License: MIT
Rating: not yet rated

Actions

Rate:

Downloads

21 in the last week

Nodes

  • google-apis-authentication
  • google-apis

Keywords

  • node-red
  • google
  • api

Maintainers