Google Calendar and Twilio as On-Call - google-calendar-api

So I have been using Twilio and Google Calendar for a while now. I was wondering if anyone had a way to connect the two together so I can create an "on-call app" that will automatically take my Twilio number and redirect that number to whoever is on call, based on Google Calendar. I see examples of sending SMS reminders of upcoming events from a google calendar, but nothing that is helping me use Google Calendar and Twilio as a way to help reduce our errors on switching the on-call number.

Twilio developer evangelist here.
I'm not sure about your exact use case, but my colleague Marcos wrote about how you might connect Google Calendar with Twilio. You could use that as a basis for building something that would work for you.
What I guess you would need to do is connect to Google Calendar. Then, when you have a call, look up the current person who is on call (presumably this is represented by events within the calendar). If you record the person's phone number within the event then you can extract that and use it to generate a call or SMS via Twilio.
Does this help at all?

Related

Is there a way for someone to add an event from my app to my Google Calendar? (e.g., similar to Calendly?)

I am somewhat new to this, and I've been building an app on low code platform Bubble.io. I've recently been trying to learn the Google Calendar API to integrate a new function into my app.
Here's what I'm trying to enable: a Calendly-esque function where a user of the app can connect their Google Calender. The user can then send a url to non-users of the app to book time with the user on the user's Google Calendar.
Here's my question: how can someone book time on another persons calendar without making the calendar public? From what I've been researching the calendar has to be public to book without authorizaton, but Calendly manages to do this without making a calendar public.
Thank you in advance to anyone who takes time to read / respond!
if you're still trying to solve this, yes this is possible. Two ways I know this can be done:
Nylas, which would also allow you to integrate with Microsoft/Outlook calendars using the same API calls https://www.nylas.com/
Google Calendar API https://developers.google.com/calendar
Both of these will require you to set up OAuth functions, and might require some custom javascript actions (but also might not). When I tried to set up Nylas using Bubble several months ago, it was not possible to create a Bubble OAuth flow using the API Connector with Nylas. Instead, I had to create a custom flow and it was quite confusing to set up, but eventually worked to do what you've described.

Is there any API call or any kind of feedback to know whether data is actually sent through google analytics collect endpoint?

I have settled my google tag manager as from the guide.
I have got in place a page that redirect just after the tag gtm-load is collected into the dataLayer. It's actually a "transition" page that should redirect instantaneously.
In this way I make sure google-analytics.com/r/collect is called, as I can see from the network ta of my browser, seems the only way to do so for an "instant redirect page".
However I need to test it from the back-end side.
Is there any way to have a feedback from Google Analytics about the data is actually sent? For example something like google-analytics.com/get/data/lastEntry, so that I can use a restAPI to check it out?
As far as I know, google analytics provide only metrics through a web page, and no actual data sent to.
Moreover there are some Rest API here but they are only for configuration purpose.
you might pass a JavaScript function as a hitCallback parameter of analytics send command and it will be called right after hit data were sent:
https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#hitCallback
Here's an example of how to use it with GTM alongside another useful feature of eventcallback
https://www.simoahava.com/gtm-tips/hitcallback-eventcallback/
Hope this helps.
There is a realtime API in Google Analytics, so what I have done for testing is to call my test URL with utm campaign parameters attached. Then I made a call to the realtime API and filtered by my custom campaign.
The realtime API is fairly limited (no session based values, obviously, you cannot test custom dimensions etc), but at least this tells you if your hit has registered in GA.

Create a demo account that's usable with the Analytics Reporting API? [Google Analytics]

I need to test some things with a Google Analytics View, but the default demo account that Google offers does not allow user to use the Analytics Reporting API :
You cannot use the demo account with the Analytics Reporting API. Attempts to do so result in a permissions error: (403) insufficientPermissions.
Source
I just need to replicate a view with different data already.
Thanks for helping.
You cannot replicate views with data. A view will always start empty.
However you can simply register a Google Analytics account and send lots of bogus data (either by setting up a web page with tracking code and call it repeatedly, or set a cron job to fire call via the measurement protocol) (this will happen in realtime, so you need to wait a few days before you have enough useable data. There is not way to bulk-create hits for a longer timeframe).
If you just want to test the API it probably matter that much what data you use, so a mock account should work just fine.

Google analytics Embeded api with out Oauth authorize

How can i use gapi.analytics.auth.authorize without button..
I need it for customers, to track visits on their subdomain, and I have my analytics code on page, so they can't use button to authorize, need without it, automatically.
Any example?
Your question isn't very clear it is hard to understand what you mean by Button.
I think you mean that you would like to select data from YOUR Google Analytics account and display it on YOUR website.
To do this you will need to use a service account as apposed to Oauth2 (Oauth2 would popup with a new window requesting access). When you create the service account in the Google developer console take the service account email address. Give it access at the ACCOUNT level in the Google analytics admin section. It must be the account level this will then give the service account access to read your Google analytics data.
Quota: I am not sure what you are extending to do here but remember you can only make 10000 requests per day against your Google Analytics profile. After that you are cut off there is no way to extend this number. So I advice you to save the data in the database someplace you shouldn't request the same data more then once.
Example:
I suggest that you look for an example in what ever programing language you are intending to use. Again your question doesn't state anything about what language you will be using. Hello analytics API might be a good place to start but it depends upon the language the PHP one is way out of date I wouldn't bother with it. Also you cant use a service account with JavaScript so that one is out to.
Update figured out button
Embded api I think I have finally figured out what you mean by button. gapi.analytics.auth.authorize is used in the Google analytics embedded api. Which is JavaScript which it is not possible to use with a Service account. So the final answer to your question is
Answer: You cant remove the button from the Google Analytics Embded api the only way to login with JavaScript is to use Oauth2.
Advice: switch to PHP and use a service account to request data yourself. Or give each of your customers access to your Google analytics so they can login themselves.

Google calendar API calls blocked by captcha

I have successfully written a tool to display upcoming calendar events on a website using Google's calendar API (v2). I am using the username/password method outlined at https://developers.google.com/google-apps/calendar/v2/developers_guide_dotnet#AuthClientLogin. Today an instance of this code would not return data or a decent error message. I finally logged into the web server and browsed directly to http://calendar.google.com and logged in using the credentials. I was challenged by Google's captcha and then my code worked.
How do I get around API calls being blocked by Google's captcha security? I don't want to have to re-code for magic cookies but I will if I have to. I have read some about generating tokens but I dont know if that is something I have to do once or every time the code is called.
If your app is a service that is getting used by many people, you might be running into API call bandwidth limitation. That is, google is limiting the number of API requests per time interval.
If this IS getting used by many people, you may have to upgrade to a paid account.

Resources