This is a dashing job to find users' availability in their Exchange calendar and puts it on a dashboard.
Note: I am not a rubyist. I'd certainly welcome some idiomadicy lessons in the comments.
Drop ews-availability.rb
in jobs/
(or dashing install b084fa409966f22badaf
), and add the following settings to config.ru
:
set :ews_uri, 'https://exchange.example.com/ews/Exchange.asmx'
set :ews_user, '[email protected]'
set :ews_pass, 'super-cool-password'
set :ews_email_list, ['[email protected]','[email protected]','[email protected]']
Note that your user needs access to talk to Exchange via EWS and read free/busy details from specified users.
Then add 'gem 'viewpoint'
to your Gemfile and bundle
again to install it.
When you run your dashboard, the job will run every 5 minutes and publish availability for each user in the list as ews-availability-[emailaddress]
e.g. [email protected]
.
I like to use the Simplemon widget I found here as the dashboard widget for the data:
<li data-row="1" data-col="4" data-sizex="1" data-sizey="1">
<div data-id="[email protected]" data-view="Simplemon" data-title="Example User"></div>
</li>
The job checks back and ahead 30 minutes to see if there are any meetings in progress or coming up.
Valid statuses are:
- Currently marked busy: "BUSY"
- Becoming free within 10 minutes: "HERE SOON"
- Becoming busy within 10 minutes: "BUSY SOON"
- No meetings within threshold: "HERE"
I can't get this to work no matter what I try. I'm getting an empty events array, and I've actually checked the response given by get_user_availability, and there's absolutely no reference for the calendar, it's nowhere to be found. I'm using Office 365 online to test this. Can you help me with this?