Google API

579 views
Skip to first unread message

Kristoffer Isaksson

unread,
Jan 31, 2017, 2:18:50 PM1/31/17
to Node-RED
Hello.
I am testing this Node https://www.npmjs.com/package/node-red-contrib-google and trying to access google calendar, but I get this error message:
Error: Missing required parameters: calendarId

Does anyone here use this Node and maybe knows how to pass that parameter to the Node?
I have tried with msg.calendarId with no success.

Thanks

Mark Setrem

unread,
Jan 31, 2017, 3:19:17 PM1/31/17
to Node-RED

It's not a parameter that you pass to the node therefore I think that's a Google error message rather than a Node-Red one.

(although you can pass a calendar name with msg.calendar if you are creating a calendar event)

Have you granted access to both the Google+API and the Google Calendar API?

The Google API is a little bit fussy, I remember it being a bit of trial and error to initially set it up

Kristoffer Isaksson

unread,
Jan 31, 2017, 3:39:24 PM1/31/17
to Node-RED
Thanks for the reply.
I just got a reply from the creater of the node and he told me that the parameter should be passed with msg.payload. so in this case msg.payload.calendarId

But if i try this in a function node and then connect a debug node and try to read msg.payload.calendarId then it is undefined
msg.payload.calendarId = "TheId"; return msg;

Nick O'Leary

unread,
Jan 31, 2017, 3:41:08 PM1/31/17
to Node-RED Mailing List
With that function code, it will depend what msg.payload is coming into the function as to whether that will work.

You will be better doing:

msg.payload = { calendarId: "TheId"}; return msg;


Nick

--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/f8426064-f91e-4d63-9bf3-503bc974f609%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mark Setrem

unread,
Jan 31, 2017, 3:43:12 PM1/31/17
to Node-RED
oops, my mistake.

Sorry I read google and assumed you meant this one http://flows.nodered.org/node/node-red-node-google

Which I use to retrieve calendar events every day.

Kristoffer Isaksson

unread,
Jan 31, 2017, 3:45:55 PM1/31/17
to Node-RED
Thanks, that was exactly what I needed.

I was using a simple Inject node to feed the function node


Den tisdag 31 januari 2017 kl. 21:41:08 UTC+1 skrev Nick O'Leary:
With that function code, it will depend what msg.payload is coming into the function as to whether that will work.

You will be better doing:

msg.payload = { calendarId: "TheId"}; return msg;


Nick
On 31 January 2017 at 20:39, Kristoffer Isaksson <kris.is...@gmail.com> wrote:
Thanks for the reply.
I just got a reply from the creater of the node and he told me that the parameter should be passed with msg.payload. so in this case msg.payload.calendarId

But if i try this in a function node and then connect a debug node and try to read msg.payload.calendarId then it is undefined
msg.payload.calendarId = "TheId"; return msg;


Den tisdag 31 januari 2017 kl. 21:19:17 UTC+1 skrev Mark Setrem:

It's not a parameter that you pass to the node therefore I think that's a Google error message rather than a Node-Red one.

(although you can pass a calendar name with msg.calendar if you are creating a calendar event)

Have you granted access to both the Google+API and the Google Calendar API?

The Google API is a little bit fussy, I remember it being a bit of trial and error to initially set it up

--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.

Kristoffer Isaksson

unread,
Jan 31, 2017, 3:49:23 PM1/31/17
to Node-RED
No problem,
I was looking at that node also but when i noticed that it had not been updated in 1 year and 8 month then I continued to look for a node that was updated more recently. 

Walter Kraembring

unread,
Feb 1, 2017, 8:45:32 AM2/1/17
to Node-RED
Hey Kristoffer,
Nice to see you in here!
BR Walter (you know EventGhost, SwitchKing etc etc)

Kristoffer Isaksson

unread,
Feb 1, 2017, 9:16:57 AM2/1/17
to Node-RED
Hello Walter.
Nice to see you to, was long time ago we had any discussions :)

Now i focus on Node-RED and Z-way, it is possible to build very nice solutions with this software. 
Reply all
Reply to author
Forward
0 new messages