I've been looking over and trying basically all the old versions of this on here.
And I cannot get a single one of them working... Wich either just means I'm dumb as hell, or there is something here I'm just not understanding...
I have tried the following versions:
I'm looking for a node to get my upcomming calendar events from Google Calendar...
I've tried just about any Node-Red-Contrib-Google version there is out here, and I DID get one of them working for a little while, but appereantly google updated their API over New Years or something, as that just stopped dead in the water as I was setting it up...
Is there anyone here, who can point me to a WORKING, easy to understand, simple enough node that lets me grab upcomming calendar events? Getting my google tasks would be a bonus, but also really good...
I thought I knew partially what I was doing in coding, but all the ones I've found so far really just expects you to know everything about the google API and OAuth setup etc..
You may be making the same mistake I did for a while. Ensure that your payload is an empty string. If you're using an inject node, with the default payload of a timestamp, you will get "No events". I'm using
node-red-node-google to get calendar events.
I dunno... I think I'm about to give up...
I dont think it's node-red stopping me from doing what I want, but more Google and their Developer part with all the Oauth authentication pages, and having to set up landing pages, URLs for that, servers and shit...
I hate to admit it, but it's just a little too much for someone to dive into without knowledge of how to develop google apps themselfs.
I mean, I got the node-red-contrib-google-calendar to work for a while, but what I've read now is that while in testing mode, that stops working after 7 days. And if you're not a google wiz about the Oauth settings and screens at that point, you're f***ed.
It is annoying and Google certainly aren't making life easy for anyone if you aren't a pro developer.
Would a different calendar server work? There are standards for iCal and a few servers out there that you could set up for yourself. Not as convenient for mobile and family use though.
Also, have you looked at: Node.js quickstart | Calendar API | Google Developers
Looks to me as though you could recreate that in a function node?
Well, I feel somewhat relieved that someone else is also thinking that Google certainly aint making life easy for those of us that dont eat google dev documents for breakfast...
Sadly, I dont see myself moving to another calendar service... Too many other things using it, but this is my first attempt at including it into a Node Red DashBoard by myself. But thanks for the suggestions anyhow. But yeah, mobile and famiily use is one of the key parts of it...
Well, after some head-scratching and much trial and error. I have managed to create a flow that works - after a fashion. Using only built-in nodes.
This is where I started - you need to read the prerequisites carefully and follow down about 3 or 4 levels of instructions in order to get the API authorised. I then picked apart the example node.js code and rejigged it to work with Node-RED.
You need 3 flows.
The first to take the credentials JSON that you are offered to download at one point then pass that into the API to generate an authorisation URL. You put things into a retained flow variable as you go along.
You go to that URL manually - I don't think it can be automated. You go through the authorisation and it redirects you to a localhost address (because you selected that this was going to be a desktop app). The 2nd flow is an http-in/-out pair to handle the redirect - you don't strictly need this but it is easier, you take the output from the redirect and save the code into the retained flow variable.
The 3rd flow reads from the retained flow variable. If you don't have an access token, it uses the code saved from the previous step to generate a new token that it also saves into the flow variable for reuse. (actually, I think that last step should be done in the 2nd step as it is async). Only then can you call the calendar API with the token you now have.
The thing is, if you can't generate the original API project, API auth and API credentials, you are still going to be stuck. Let me know if you manage to do that part and I'll tidy up the other code and share it.
Not able to follow that... Heh... Thanks for the attempt though!
Still learning node-red here, so might revisit this at a later date. I might've jumped in a bit too deep in my ambitions.
If you wanna make a clean tutorial that includes both the nodes and the code AND the google dev. side of it, I'm quite sure alot of us would really appreciate it.