# Problems with node-red-contrib-google

**URL:** <https://discourse.nodered.org/t/problems-with-node-red-contrib-google/22445>\
**Category:** General\
**Created:** [1 March 2020 10:50 UTC](https://discourse.nodered.org/t/problems-with-node-red-contrib-google/22445 "2020-03-01T10:50:46Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![HArndt2020](https://avatars.discourse-cdn.com/v4/letter/h/e480ec/32.png) [@HArndt2020](https://discourse.nodered.org/u/HArndt2020)\
**Post date:** [1 March 2020 10:50 UTC](https://discourse.nodered.org/t/problems-with-node-red-contrib-google/22445/1 "2020-03-01T10:50:46Z")

</div>

i don´t no what should i insert in JSON and scope:

 ![gconn](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/3/13c5d91cb1d742f16478524629a3a69def19ffa5.png)

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [1 March 2020 11:02 UTC](https://discourse.nodered.org/t/problems-with-node-red-contrib-google/22445/2 "2020-03-01T11:02:55Z")

</div>

It would be helpful if you provided the full name (node-red-contrib-?????) of the node you are using. That way others don't have to spend time seazrching for the node.

Also it's elpful to supply

1. what platform you are runnig NR on
2. OS you are using
3. version of NR and node.js (can be found on NR startup log)
4. dashboard version (if the dashboard is involved)
5. a description of what you are trying to do

---

<div class="post-metadata">

**Author:** ![HArndt2020](https://avatars.discourse-cdn.com/v4/letter/h/e480ec/32.png) [@HArndt2020](https://discourse.nodered.org/u/HArndt2020)\
**Post date:** [1 March 2020 11:24 UTC](https://discourse.nodered.org/t/problems-with-node-red-contrib-google/22445/3 "2020-03-01T11:24:46Z")

</div>

node-red-contrib-google

 ![gconn1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/2/b2d071ff66d0b28108779c3cf23d92618e8b456b.png) ![gconn2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/0/60ddd84299539d11b7db4139f19cd7e879b81579.png)

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [1 March 2020 12:38 UTC](https://discourse.nodered.org/t/problems-with-node-red-contrib-google/22445/4 "2020-03-01T12:38:20Z")

</div>

And the other information I requested?

---

<div class="post-metadata">

**Author:** ![HArndt2020](https://avatars.discourse-cdn.com/v4/letter/h/e480ec/32.png) [@HArndt2020](https://discourse.nodered.org/u/HArndt2020)\
**Post date:** [1 March 2020 13:36 UTC](https://discourse.nodered.org/t/problems-with-node-red-contrib-google/22445/5 "2020-03-01T13:36:10Z")

</div>

sorry could only upload 2 pictures

 ![gconn3](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/e/1ea47fe86efde6a94445e0aaab2112389041293e.png)

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [1 March 2020 14:14 UTC](https://discourse.nodered.org/t/problems-with-node-red-contrib-google/22445/6 "2020-03-01T14:14:16Z")

</div>

You didn't need to load a image, you could have looked at it and answered the questions.

so

1. what platform you are runnig NR on  
?? don't know from the image
2. OS you are using  
some version or other of windows
3. version of NR and node.js (can be found on NR startup log)  
node-red v1.0.3  
node.js v12.16.1
4. dashboard version (if the dashboard is involved)  
dashboard v2.19.4
5. a description of what you are trying to do  
hmmm.......nope, can figure that out from an image

---

<div class="post-metadata">

**Author:** ![HArndt2020](https://avatars.discourse-cdn.com/v4/letter/h/e480ec/32.png) [@HArndt2020](https://discourse.nodered.org/u/HArndt2020)\
**Post date:** [1 March 2020 15:15 UTC](https://discourse.nodered.org/t/problems-with-node-red-contrib-google/22445/7 "2020-03-01T15:15:00Z")

</div>

I think the os version doesn't matter, but you can see it in the last picture (Windows\_NT 10.0.18362 x64 LE). I would like to read the events from a Google calendar.

Flow:

```auto
[
    {
        "id": "895d2f6.6d24e5",
        "type": "tab",
        "label": "Flow 6",
        "disabled": false,
        "info": ""
    },
    {
        "id": "2842d683.53728a",
        "type": "google",
        "z": "895d2f6.6d24e5",
        "name": "Müllkalender",
        "google": "3b40a2c0.c0d46e",
        "api": "calendar:v3",
        "operation": "events.list",
        "x": 750,
        "y": 160,
        "wires": [
            [
                "39811ee3.ab4cfa"
            ]
        ]
    },
    {
        "id": "675a8d24.7a937c",
        "type": "template",
        "z": "895d2f6.6d24e5",
        "name": "Next Abfall Event",
        "field": "payload",
        "fieldType": "msg",
        "format": "handlebars",
        "syntax": "mustache",
        "template": "{\n \"calendarId\": \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxx@group.calendar.google.com\",\n \"maxResults\": \"1\",\n \"orderBy\": \"startTime\",\n \"singleEvents\": \"true\",\n \"timeMin\": \"{{payload}}\"\n}",
        "output": "json",
        "x": 570,
        "y": 200,
        "wires": [
            [
                "2842d683.53728a"
            ]
        ]
    },
    {
        "id": "fc03e8a3.0cfc6",
        "type": "inject",
        "z": "895d2f6.6d24e5",
        "name": "",
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "repeat": "",
        "crontab": "*/20 17 * * *",
        "once": true,
        "onceDelay": 0.1,
        "x": 170,
        "y": 200,
        "wires": [
            [
                "49f93b6.736cb44"
            ]
        ]
    },
    {
        "id": "49f93b6.736cb44",
        "type": "moment",
        "z": "895d2f6.6d24e5",
        "name": "",
        "topic": "",
        "input": "",
        "inputType": "msg",
        "inTz": "Europe/Berlin",
        "adjAmount": 0,
        "adjType": "days",
        "adjDir": "add",
        "format": "",
        "locale": "C",
        "output": "",
        "outputType": "msg",
        "outTz": "Europe/Berlin",
        "x": 360,
        "y": 200,
        "wires": [
            [
                "675a8d24.7a937c"
            ]
        ]
    },
    {
        "id": "9ad6abbf.f3d1",
        "type": "function",
        "z": "895d2f6.6d24e5",
        "name": "Set Tonne",
        "func": "if (msg.payload == \"true\") {\n if (msg.tonne == \"Biotonne\") {\n msg.payload = \"Bio Tonne\";\n msg.bmp = '74';\n node.status({ fill: \"green\", shape: \"ring\", text: msg.payload + \" stored\" });\n }\n else if (msg.tonne == \"Gelber Sack\") {\n msg.payload = \"Gelber Sack\";\n msg.bmp = '75'; \n node.status({ fill: \"yellow\", shape: \"ring\", text: msg.payload + \" stored\" });\n }\n else if (msg.tonne == \"Altpapier\") {\n msg.payload = \"Altpapier\";\n msg.bmp = '76';\n node.status({ fill: \"blue\", shape: \"ring\", text: msg.payload + \" stored\" });\n }\n else if (msg.tonne == \"Restmüll\") {\n msg.payload = \"Restmüll\";\n msg.bmp = '77'; \n node.status({ fill: \"grey\", shape: \"ring\", text: msg.payload + \" stored\" });\n }\n return msg;\n} else {\n msg.show = false;\n node.status({ fill: \"red\", shape: \"ring\", text: \"Keine Tonne\" + \" stored\" });\n return msg;\n}\n",
        "outputs": 1,
        "noerr": 0,
        "x": 420,
        "y": 260,
        "wires": [
            [
                "f3dc6b87.a54c3"
            ]
        ]
    },
    {
        "id": "6fceeed7.a808e",
        "type": "Screen Init",
        "z": "895d2f6.6d24e5",
        "name": "Screen Init",
        "inscreenName": "muellkalender",
        "induration": "10",
        "x": 770,
        "y": 260,
        "wires": [
            [
                "379fdb48.d747dc"
            ]
        ]
    },
    {
        "id": "f3dc6b87.a54c3",
        "type": "Switch Animation",
        "z": "895d2f6.6d24e5",
        "name": "Switch Animation",
        "aktiv": "true",
        "animation": "fade",
        "x": 590,
        "y": 260,
        "wires": [
            [
                "6fceeed7.a808e"
            ]
        ]
    },
    {
        "id": "edbf5221.49d28",
        "type": "Text",
        "z": "895d2f6.6d24e5",
        "name": "Text",
        "intextString": "{{payload}}",
        "inbigFont": "false",
        "inscrollText": "auto",
        "inscrollTextDelay": "0",
        "incenterText": "false",
        "inposX": "7",
        "inposY": "1",
        "incolorR": "255",
        "incolorG": "255",
        "incolorB": "255",
        "x": 1050,
        "y": 260,
        "wires": [
            [
                "fb9a73bc.f0fce8"
            ]
        ]
    },
    {
        "id": "379fdb48.d747dc",
        "type": "Bitmap Animation",
        "z": "895d2f6.6d24e5",
        "name": "Bitmap",
        "indata": "{{bmp}}",
        "inanimationDelay": "80",
        "inrubberbanding": "false",
        "inlimitLoops": "1",
        "x": 920,
        "y": 260,
        "wires": [
            [
                "edbf5221.49d28"
            ]
        ]
    },
    {
        "id": "39811ee3.ab4cfa",
        "type": "function",
        "z": "895d2f6.6d24e5",
        "name": "parse event",
        "func": "//Aktuelle Datum im ISO Format für heute und morgen\nvar today = new Date(); \nvar tomorrow = new Date(); \n\n//Datum von Morgen im ISO Format\ntomorrow.setDate(today.getDate()+1); \n\nvar parts = msg.payload.items[0].summary.split(\" am \");\nvar date = parts[1].split(\".\");\nvar datum = new Date(date[2], date[1]-1, date[0]);\n//var tonne = parts[0];\n\nif (datum.getTime() >= today.getTime() & \n datum.getTime() <= tomorrow.getTime()) {\n msg.payload = \"true\";\n }\nelse\n{\n msg.payload = \"false\";\n }\n\nmsg.tonne = parts[0]; \n\nnode.send(msg);",
        "outputs": 1,
        "noerr": 0,
        "x": 910,
        "y": 200,
        "wires": [
            [
                "9ad6abbf.f3d1"
            ]
        ]
    },
    {
        "id": "c6786322.82016",
        "type": "comment",
        "z": "895d2f6.6d24e5",
        "name": "AbfallKalender [muellkalender]",
        "info": "",
        "x": 190,
        "y": 160,
        "wires": []
    },
    {
        "id": "fb9a73bc.f0fce8",
        "type": "link out",
        "z": "895d2f6.6d24e5",
        "name": "",
        "links": [
            "647804e.74ecdfc"
        ],
        "x": 1135,
        "y": 260,
        "wires": []
    },
    {
        "id": "3b40a2c0.c0d46e",
        "type": "google-conn",
        "z": "",
        "name": "Google",
        "key": "",
        "scopes": ""
    }
]

```

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [1 March 2020 15:51 UTC](https://discourse.nodered.org/t/problems-with-node-red-contrib-google/22445/8 "2020-03-01T15:51:21Z")

</div>

Please ensure that whenever you post any code, you do so in the format that the forum expects, otherwise other forum users will no be able to assist you.

See this post;

> [@How to share code or flow json](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506):
>
> To share code samples or flow json in this forum, you need to take care to format it properly so that it is displayed correctly. The easiest way to do that is to click the 'Preformatted Text' button in the toolbar: [image] Then paste in your code or flow json. You should end up with three back-tick characters - ``` - on their own line before and after the code. On standard US English keyboards, this is on the same key as the ~ character. Using the backticks will ens…

Instead of reposting your code again below, use the pencil icon in your post above and edit it as per the sharing guide.

---

<div class="post-metadata">

**Author:** ![HArndt2020](https://avatars.discourse-cdn.com/v4/letter/h/e480ec/32.png) [@HArndt2020](https://discourse.nodered.org/u/HArndt2020)\
**Post date:** [1 March 2020 15:59 UTC](https://discourse.nodered.org/t/problems-with-node-red-contrib-google/22445/9 "2020-03-01T15:59:29Z")

</div>

ok, i understand.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [1 March 2020 21:53 UTC](https://discourse.nodered.org/t/problems-with-node-red-contrib-google/22445/10 "2020-03-01T21:53:41Z")

</div>

Well looking at that node, I see

1. it states it is a work in progress
2. it hasn't got much (any) documentation,
3. it hasn't been updated in over two years
4. there are 8 open issues dating back to April of 2018 and none seem to have any response from the author

I'd be looking for another solution.

---

<div class="post-metadata">

**Author:** ![HArndt2020](https://avatars.discourse-cdn.com/v4/letter/h/e480ec/32.png) [@HArndt2020](https://discourse.nodered.org/u/HArndt2020)\
**Post date:** [4 March 2020 08:25 UTC](https://discourse.nodered.org/t/problems-with-node-red-contrib-google/22445/11 "2020-03-04T08:25:12Z")

</div>

thanks for your effort, I have now found another solution, I import my local calendar from Thunderbird and put it on my Raspberry. From there I query the events with ical/upcoming.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [3 May 2020 08:25 UTC](https://discourse.nodered.org/t/problems-with-node-red-contrib-google/22445/12 "2020-05-03T08:25:13Z")

</div>

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