Jump to content

Google Calendar View


Recommended Posts

Google Calendar View


View your Google Calendar events in Alfred. Supports multiple accounts.


Download the workflow from GitHub (source repo).


Usage

  • gcal — View upcoming events for the next few days
  • gdate — View events for a specific date
  • today / tomorrow / yesterday — View today's / tomorrow's / yesterday's events
  • gcalconf — Change workflow settings


Actions

  • — Open an event in Google Calendar (change CALENDAR_APP in the configuration sheet to use a different app to your default browser)
  • ⌘↩ — Open an event's location in Google or Apple Maps
  • ⌘Y — Quicklook event details


See the README on GitHub for more details.

Edited by deanishe
Link to comment

Hello,

 

I'm having difficulty getting this to pull through any events from my calendar. I've authorised the connection to my gcal, and enabled a calendar I know to have upcoming events within the time period the workflow will be looking at but nothing is showing.

 

Output from debugger is as below if it helps.

 

Starting debug for 'Google Calendar View'

[2017-12-03 02:55:11][input.keyword] Processing output of 'utility.argument' with arg ''
[2017-12-03 02:55:11][utility.argument] Processing output of 'output.callexternaltrigger' with arg ''
[2017-12-03 02:55:11][trigger.external] Processing output of 'utility.debug' with arg ''
[2017-12-03 02:55:11][utility.debug] .
/---- ACTION IN ----\
query=
variables={
    "APPLE_MAPS" = 1;
    "CALENDAR_APP" = "";
    "EVENT_CACHE_MINS" = 15;
    "SCHEDULE_DAYS" = 5;
    action = date;
}
\-------------------/
[2017-12-03 02:55:11][utility.debug] Processing output of 'utility.filter' with arg ''
[2017-12-03 02:55:11][utility.debug] Processing output of 'utility.filter' with arg ''
[2017-12-03 02:55:11][utility.debug] Processing output of 'utility.filter' with arg ''
[2017-12-03 02:55:11][utility.debug] Processing output of 'utility.filter' with arg ''
[2017-12-03 02:55:11][utility.debug] Processing output of 'utility.filter' with arg ''
[2017-12-03 02:55:11][utility.filter] Processing output of 'utility.argument' with arg ''
[2017-12-03 02:55:11][utility.argument] Processing output of 'input.scriptfilter' with arg ''
[2017-12-03 02:55:11][input.scriptfilter] Queuing argument ''
[2017-12-03 02:55:12][input.scriptfilter] Script with argument '' finished
[2017-12-03 02:55:12][STDERR: input.scriptfilter] 02:55:11 gcal.go:301: [env] SCHEDULE_DAYS=5
02:55:11 gcal.go:301: [env] EVENT_CACHE_MINS=15
?
02:55:11 workflow.go:614: ---- Google Calendar View/0.1.1 (AwGo/0.13.2) ----
02:55:11 gcal.go:233: command=events, calendarID=, query=, startTime=2017-12-03 00:00:00 +0000 GMT, endTime=2017-12-04 00:00:00 +0000 GMT, dateFormat=
02:55:11 cmd_events.go:43: 1 active calendar(s)
02:55:11 cmd_events.go:78: 0 event(s) for 2017-12-03
02:55:11 feedback.go:431: Sent 1 result(s) to Alfred
02:55:11 workflow.go:790: ---------------------- 12ms ----------------------
[2017-12-03 02:55:12][input.scriptfilter] {
  "variables": {
    "AW_SESSION_ID": "ML68S4DUB82A542CZR2V17UB"
  },
  "items": [
    {
      "title": "No Events on Sunday, 3 December 2017",
      "valid": false,
      "icon": {
        "path": "icon.png"
      }
    }
  ]
}

 

Link to comment

@mnisbet There are no obvious errors in the debugger. What are you expecting to see?

 

Could you check the log file (not the debugger)? Open it by entering gdate workflow:log into Alfred. Then enter gcalconf and action Clear Cached Calendars & Events to clear the cached events lists. Finally try gcal to retrieve events for the next 5 days.


Also please note that the workflow ignores all-day events.

 

Edited by deanishe
moar E
Link to comment

It's working perfectly for me (macOS 10.12.6, Alfred 3.5.1). One thought for improvement: currently I need to press enter after having written any of the keywords to execute the chosen function, I would prefer that the function is executed directly after the keyword is given to make it snappier - would this be possible? 

Edited by cands
Link to comment
20 minutes ago, cands said:

I need to press enter after having written any of the keywords to execute the chosen function

 

This was a deliberate choice: I didn't want other stuff (my "Google Calendar" app, the "gcalconf" keyword) getting mixed in with the results.

 

Personally, I never type any of the keywords fully. So it's basically a case of hitting ↩ and not ⇥

 

53 minutes ago, cands said:

would this be possible?

 

Yes. It requires replacing the Keyword + Run Scripts with corresponding Script Filters based on the "Show Events" Script Filter at bottom left. It'd be fairly simple to do.

 

It's doubtful I'll do it to the "official" version, though.

Link to comment

Thanks for explaining. A while ago I started following your advice to change keywords to start with a period to avoid other stuff to get mixed in, so I changed keywords to e.g. ".gt" to view todays events. Then it could be handy to execute results directly. But for your (new?) approach of not writing full keywords it seems more handy to select the function using tab or enter. Nevertheless, it's quite handy for me as working now anyway, thanks again.

Edited by cands
Link to comment
14 minutes ago, cands said:

".gt" to view todays events.

 

This was the other approach I considered. .gcal didn't seem to fit so well with the other keywords.

 

17 minutes ago, cands said:

(new?) approach

 

Not new. A result of the above.

 

I figured I'd try it this way for a change. Ultimately, gc↩ is also only three keypresses. There's also a single Script Filter to show events, instead of 4, which makes editing easier.


I guess if enough people want gcal, today, tomorrow etc. to be Script Filters, I'll change it.

Link to comment
  • 4 weeks later...

Great workflow! Couple of points:

 

1. Unlike other Alfred workflows, the only way to get out of this is to close the Alfred bar. If i simply do backspace/esc it doesn't work and stays within the workflow.

2. It would be very useful to add multiple Google calendars. I have a few accounts on Gmail (work, personal etc) and it would be great to see them all.

 

Otherwise great job!

Link to comment
6 hours ago, az566 said:

Unlike other Alfred workflows, the only way to get out of this is to close the Alfred bar.

 

Not true. You can back out of "nested" Script Filters with ⌘⌫

 

6 hours ago, az566 said:

I have a few accounts on Gmail (work, personal etc) and it would be great to see them all.

 

You can share your calendars with your other accounts. The workflow supports shared calendars.

Link to comment
  • 4 weeks later...

Can we update the account you have on record? I have a few google accounts. Due to sharing permissions, I have to switch the account you have OAuth linked to. But I don't see any way currently of doing that. Can you provide a "reset gmail connection" option please?

 

Thanks for any help you can give!

Link to comment

Hi,

   How about adding an option to "quick add" feature on this wonderful workflow?  Even though the new Google Calendar has removed it, is still possible to go back to Classic Calendar and keep using this useful feature... 

 

Thanks a lot!!!

 

ps.: I know it is possible to "add quick"an appointment in Google Calendar creating a web search with the URL:  (http://alfredtips.com/s/243/)

http://www.google.com/calendar/event?ctext=+{query}+&action=TEMPLATE&pprop=HowCreated%3AQUICKA
Edited by Fabio
Link to comment
On 23/01/2018 at 3:35 PM, Entropyfails said:

Well I found the Workflow Data directory in ~/Library/Caches/com.runningwithcrayons.Alfred-3

from

https://www.alfredapp.com/help/troubleshooting/reset-alfred/

 

Though it still may be an ok feature for new Alfred users who need to clear out the history. Thanks for the workflow. It is a huge help!

 

Yeah, I should probably put a "log out" option in there. You got the right directory, in any case.

 

FWIW, you can use "magic queries" with the workflow by entering the query workflow:, e.g. gcalconf workflow:. That will show you a list of actions. Choose delcache (i.e. gcalconf workflow:delcache).

 

3 hours ago, Fabio said:

I know it is possible to "add quick"an appointment in Google Calendar creating a web search with the URL:  (http://alfredtips.com/s/243/)


http://www.google.com/calendar/event?ctext=+{query}+&action=TEMPLATE&pprop=HowCreated%3AQUICKA

 

That's handy. I'll consider it.

Link to comment
  • 5 months later...

It's more likely that authentication has failed, though it's impossible to say for sure without the log.

 

You can check by entering gdate workflow:log or just start over with gdate workflow:reset.

 

If that doesn't work, post the contents of the log, not a screenshot of the workflow.

Link to comment
  • 3 months later...

Hi deanishe, thanks so much for this workflow (it's maybe the one I use the most often!!). :)

I was wondering about the following: 

When you hit command-enter on a calendar event that has a location it automatically opens it in Google Maps. I would ideally like to hit command-enter and automatically open Google Maps with the directions from my current location (similar to what 'dirfc' from this workflow does https://github.com/stuartcryan/advanced-google-maps-alfred-workflow). Is this possible somehow? 

Cheers
 

Link to comment
  • 3 months later...
  • 3 months later...

Hi deanishe, 

 

Thank you for this workflow! The README on github (that's linked to from the extension) describes the new quickadd feature, but it looks like the latest .alfredworkflow release available on github predates those additions. Is there a release with the quickadd feature available?

 

Thanks again!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...