Mailchimp - API equivalent to Lists Webhook - mailchimp

We can't setup a Webhook for security reasons so we would like to make a request to the Mailchimp API to get the same information that is contained in the Lists webhook (subscribes, unsubscribes, updates etc) and perform this daily.
I've been looking at the Mailchimp API docs and under the Lists section I can't see anything that would allow us to do a GET for all "list activities" similar to what is contained in the Lists webhook.
Does anyone know if it's possible to get the same information via the Mailchimp API that is contained in the Lists webhook?

I found this endpoint:
http://developer.mailchimp.com/documentation/mailchimp/reference/lists/members/#
which you can call using the Query String parameter:
since_last_changed - Restrict results to subscribers whose information changed after the set timeframe
So far this is the closest that I have found.

Related

Outlook Graph API not receiving groups

What I am trying to achieve -
When I call message API, it returns the group address to which mail is sent, I want to get the members of the group, And for that I believe I need group Id, so I am using the groups API mentioned below https://graph.microsoft.com/v1.0/groups
But this API returns an empty list to me.
Note: email I using is #outlook.com, not xyz.com.
The Microsoft graph API doesn't support personal accounts as you can see the below image. You should have a Work account to get the group details. You were able to get the messages because it supports personal accounts to read messages from your mailbox.

Is it possible to update a group's auto-reply settings using the API?

I'm using Gmail.Users.Settings.updateVacation to update our customer service rep's vacation responses automatically over the weekend and after-hours, so our customers who e-mail when we're not in the office get an informative message of when they can expect a response.
I am attempting to do the same thing with our Google Groups, but have not been able to find the correct API call. If I use the same method as above, but with a group's e-mail address, I get a "Delegation denied" error (even though I'm an Owner of the group). I suspect this is because a Group is not a User, and is just different.
I've found the Manage Group Settings API, which essentially has just one update method, and you use properties to specify what you want to update on the group. The problem is, there is no auto-reply property name that I can find.
How do I update a Group's auto-reply settings?
Many thanks!
Unfortunately, what you want cannot be achieved through the API.
All the possible methods are present in the Groups Settings API so if you didn't find the expected method there, then it means that is not possible through the API.
What you can do instead is to file a Feature Request here and provide all the necessary details.
Reference
Groups Settings API - Groups Resource.

Passing state data with google actions

I am developing a Google Actions project for Google Home using api.ai.
Is it possible to pass a state parameter as part of the response to api.ai and have it included in the next request?
The Amazon Alexa API handles such a flow and it came in handy.
Thanks
EDIT:
I did not mention this before: I have api.ai sending requests to a webhook after google assistant triggers my intents. The response api.ai expects is defined here. I've tried including extra fields in the response but these are not included in any future intent requests from api.ai. I've also tried adding fields and values to the google specific portion of the response (defined here) to no avail.
As an example of what I am interested in, when responding to Alexa requests we can include a json field "sessionAttributes" which are then passed by Amazon in any future requests that are part of that interaction.
In this instance I query a database key on the first intent (which is subsequently used to pull a record) and pass that key in sessionAttributes to avoid performing that lookup for every intent request I receive.
The equivalent that you are looking for to sessionAttributes in Alexa dev depends on whether you are using an API.ai webhook or a conversation webhook. Reference this doc for more info on the differences.
Since you are using API.ai, assuming you are using the Node.js client library, use the snippet below. 'Contexts' can store data, not just serve as a flag of sorts to establish where you are in a conversation. Call setContext just before you call 'ask' and close out your webhook fulfillment.
app.setContext('<context name>', <lifespan of context>, <JSON to store>)
Then for the next round of fulfillment, retrieve the JSON from the parameters object within the Context. Get it with:
var myContext = app.getContext('<context name>')
Reference the examples in these docs for more info.
You could create an optional parameter in API.ai to catch/store this value and append any message being sent to API.ai with a marker and then the database value you want to cache, so API.ai recognizes from the marker the value to be cached as the parameter, and this would be passed back out of API.ai as well, so if you needed to chain/loop this, on your side you again just check if it has the special 'append' parameter value to append that to the next user message.
That being said, contexts can likely achieve the same end-goal you are trying to achieve in a much more straightforward fashion

Checking multiple lists for one email address in MailChimp API 3.0

In MailChimp API 2.0 there was a single command, helper/lists-for-email, that would return all of my lists that a particular email address was subscribed to.
https://apidocs.mailchimp.com/api/2.0/helper/lists-for-email.php
I'm having trouble finding anything similar in MailChimp API 3.0.
http://developer.mailchimp.com/documentation/mailchimp/reference/overview/
We have our own page on our website for managing newsletter preferences, and we need to be able to have some of our list options pre-checked when a logged-in user looks at the list, based on which lists he is subscribed to. All I have been able to figure to do is to check the API for each list individually (10 different API calls) to see if a specific email address is subscribed, but this takes a very long time and I am concerned it may time out for some users depending on network traffic. Either way, it's so long that it's an awful user experience.
Is there one API 3.0 call I can make to find out which of my lists a user is subscribed to, like there was in 2.0?
There is now a solution using the following API:
http://developer.mailchimp.com/documentation/mailchimp/reference/lists/#read-get_lists
You can include the "email" field to filter by a user's email.

Accepting calendar invites via Google API

How do I accept a calendar invite using something like the Google Calendar API or the Google Gmail API?
Bonus points if you can point me how to do it in Ruby, but just a hint at which API I should be using would be more than fine.
You should be using events patch.
First create an Event with just the information you want to change. In this case, this will be the single attendee (even if there are multiple attendees) whose response you want to modify (which should be the same as the user under which the call is made), and the corresponding response status ("accepted", "declined", "tentative").
Then you execute patch, passing in the event id and the sparse event created above.
An example in Java is at https://stackoverflow.com/a/41054893/80075

Resources