# Google calendar events

**URL:** https://discourse.nodered.org/t/google-calendar-events/48123
**Category:** General
**Created:** [7 July 2021 09:21 UTC](https://discourse.nodered.org/t/google-calendar-events/48123 "2021-07-07T09:21:00Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![grandautism](https://avatars.discourse-cdn.com/v4/letter/g/b5ac83/32.png) [@grandautism](https://discourse.nodered.org/u/grandautism)
#### Post date: [7 July 2021 09:21 UTC](https://discourse.nodered.org/t/google-calendar-events/48123/1 "2021-07-07T09:21:00Z")

</div>

I want to create events on my calendar via NodeRed, I used node-red-contrib-google-oauth-calendar

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/5/05fc0fc0e3231045e771c4dca73341c192c0ba12.png)  
here is my function code, but it didn't work I can only read my calendar events not add event.  
there is another way to create events on my calendar?

```auto
msg.payload =
{
description: "event test",
start: {dateTime: "2018-08-15T15:00:00-03:00"},
end: {dateTime: "2018-08-15T16:00:00-03:00"},
attendees: [
{
email: "account@gmail.com", displayName: "name "
}],
summary: "It's Working"
};
return msg;

```

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [7 July 2021 10:27 UTC](https://discourse.nodered.org/t/google-calendar-events/48123/2 "2021-07-07T10:27:54Z")

</div>

Hi, i have not used that node but looking at the picture, you are sending a payload to a node called "List upcoming events" - my guess is that node does not support creation of events.

Where did you get the sample code from? Perhaps there is more info in that post/document?

---

<div class="post-metadata">

### Author: ![grandautism](https://avatars.discourse-cdn.com/v4/letter/g/b5ac83/32.png) [@grandautism](https://discourse.nodered.org/u/grandautism)
#### Post date: [7 July 2021 11:02 UTC](https://discourse.nodered.org/t/google-calendar-events/48123/3 "2021-07-07T11:02:03Z")

</div>

I found an exemple in this forum.  
Yes I guess this nodes is only for display events.  
How can we add events ? after all, there is really a possibility to add events to google calender via node red ?

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [7 July 2021 11:12 UTC](https://discourse.nodered.org/t/google-calendar-events/48123/4 "2021-07-07T11:12:56Z")

</div>

> [@grandautism](#):
>
> How can we add events ? after all, there is really a possibility to add events to google calender via node red

My answer is the same I'm afraid...

> [@Steve-Mcl](#):
>
> i have not used that node

> [@Steve-Mcl](#):
>
> Where did you get the sample code from?

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [7 July 2021 11:51 UTC](https://discourse.nodered.org/t/google-calendar-events/48123/5 "2021-07-07T11:51:02Z")

</div>

It looks like you might have mixed up some things?

1. That code you pasted in the first post is the result returned from google (not an instruction to insert a new calendar event)
2. I suspect you are using the wrong node since the code sample you have shown is quite similar to results retuned from the calendar in node in `node-red-node-google`

According to [node-red-node-google](https://flows.nodered.org/node/node-red-node-google) readme...

> ### Calendar out
> 
> Create an entry in a [Google Calendar](https://www.google.com/calendar).
> 
> The incoming message can provide the following properties:
> 
> - **payload** - either a string to describe the event using [quick add format](https://support.google.com/calendar/answer/36604?hl=en) or an object representing the request body for an [insert request](https://developers.google.com/google-apps/calendar/v3/reference/events/insert)
> - **calendar** - the calendar to add the event to (optional, defaults to the node calendar property or the users primary calendar)
> - **sendNotifications** - a boolean to determine if notifications should be sent to attendees (optional, defaults to false)

---

<div class="post-metadata">

### Author: ![grandautism](https://avatars.discourse-cdn.com/v4/letter/g/b5ac83/32.png) [@grandautism](https://discourse.nodered.org/u/grandautism)
#### Post date: [8 July 2021 09:40 UTC](https://discourse.nodered.org/t/google-calendar-events/48123/6 "2021-07-08T09:40:18Z")

</div>

they say that [node-red-node-google](https://flows.nodered.org/node/node-red-node-google) don't work anymore. I don't know what to do

---

<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: [6 September 2021 09:40 UTC](https://discourse.nodered.org/t/google-calendar-events/48123/7 "2021-09-06T09:40:56Z")

</div>

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