# Get events in google calendar

**URL:** <https://discourse.nodered.org/t/get-events-in-google-calendar/2520>\
**Category:** General\
**Created:** [23 August 2018 18:58 UTC](https://discourse.nodered.org/t/get-events-in-google-calendar/2520 "2018-08-23T18:58:35Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![leomozzer](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/leomozzer/32/1783_2.png) [@leomozzer](https://discourse.nodered.org/u/leomozzer)\
**Post date:** [23 August 2018 18:58 UTC](https://discourse.nodered.org/t/get-events-in-google-calendar/2520/1 "2018-08-23T18:58:35Z")

</div>

How can I get events in my google calendar? It's the same way when I add events to the calendar?  
msg.payload =  
{  
description: "Great picnic with friends",//descricao\_evento  
start: {dateTime: "2018-08-15T15:00:00-03:00"},  
end: {dateTime: "2018-08-15T16:00:00-03:00"},  
attendees: [  
{  
email: "John@example.com", displayName: "John Smith"  
}],  
summary: "Its Working"//nome\_do\_evento

```
    };
return msg;

```

![Captura%20de%20tela%20de%202018-08-23%2015-52-29](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/3/3f73991280aba318a8673ce46008a2eadbd5ec21.png)

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [24 August 2018 17:07 UTC](https://discourse.nodered.org/t/get-events-in-google-calendar/2520/2 "2018-08-24T17:07:38Z")

</div>

Sorry, been a while since I tried to make sense of connecting Node-RED to the Google API's and it seems that the instructions no longer refer to anything recognisable on the Google side.

Raised an issue:

> <https://github.com/node-red/node-red-web-nodes/issues/228>

---

<div class="post-metadata">

**Author:** ![leomozzer](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/leomozzer/32/1783_2.png) [@leomozzer](https://discourse.nodered.org/u/leomozzer)\
**Post date:** [25 August 2018 14:46 UTC](https://discourse.nodered.org/t/get-events-in-google-calendar/2520/3 "2018-08-25T14:46:26Z")

</div>

Well, i can create events using the code above, but when if i use the same code with the variables empty i got an error saying that variable does not exist.

Atenciosamente,  
Leonardo Mozzer Ferraz de Souza  
e-mail: [mozzer.ferraz@gmail.com](mailto:mozzer.ferraz@gmail.com)  
fone: (48) 99517191 / (48) 91797191.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [25 August 2018 20:09 UTC](https://discourse.nodered.org/t/get-events-in-google-calendar/2520/4 "2018-08-25T20:09:38Z")

</div>

> [@leomozzer](#):
>
> Well, i can create events using the code above, but when if i use the same code with the variables empty i got an error saying that variable does not exist.

That is because the node you are using is only for creating events - as its help describes.

The module provides two other nodes: one that will return details of the _next_ event to happen, and one that will emit an event when a calendar event starts. There is no node available in that module for getting a list of events.

---

<div class="post-metadata">

**Author:** ![leomozzer](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/leomozzer/32/1783_2.png) [@leomozzer](https://discourse.nodered.org/u/leomozzer)\
**Post date:** [25 August 2018 20:27 UTC](https://discourse.nodered.org/t/get-events-in-google-calendar/2520/5 "2018-08-25T20:27:29Z")

</div>

No, I'm using the node to get events (is the one of the foto above), but dont know how is the format of my payload to get events

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [25 August 2018 21:28 UTC](https://discourse.nodered.org/t/get-events-in-google-calendar/2520/6 "2018-08-25T21:28:26Z")

</div>

The node you have shown has no input - you cannot pass it a message. The sidebar help for that node will tell you what it does.

---

<div class="post-metadata">

**Author:** ![leomozzer](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/leomozzer/32/1783_2.png) [@leomozzer](https://discourse.nodered.org/u/leomozzer)\
**Post date:** [25 August 2018 23:19 UTC](https://discourse.nodered.org/t/get-events-in-google-calendar/2520/7 "2018-08-25T23:19:15Z")

</div>

This in the info about the node  
 ![Sem%20t%C3%ADtulo](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/f/f7100f8529a69b59b265183d3b7e824a48d51b17.jpeg)

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [26 August 2018 07:18 UTC](https://discourse.nodered.org/t/get-events-in-google-calendar/2520/8 "2018-08-26T07:18:19Z")

</div>

Yes, It's exactly what I described in my original reply to you.

At this point I'm not sure what question you are asking that hasn't already been answered.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [26 August 2018 08:48 UTC](https://discourse.nodered.org/t/get-events-in-google-calendar/2520/9 "2018-08-26T08:48:23Z")

</div>

> [@leomozzer](#):
>
> No, I'm using the node to get events (is the one of the foto above), but dont know how is the format of my payload to get events

I think the confusion may be in the way you have phrased the question, it reads as if you are asking how to format a payload to send to the node to tell it what to do. Are you actually asking what to do with the payload you get out of the node in order to extract the events from it? If so then feed it into a debug node and see what is there. Looking at the node info it looks as if can use msg.payload.title for the title, etc.
