Trying to send bulk invitations to a yammer group - yammer

We are trying to send mail invitations to multiple users from our web application to join Yammer network using API https://developer.yammer.com/docs/invitations.json but by using this we are able to send at most to 20 mail ids at a time.
Is there any other way to send bulk mails for more than 20 ids at a time?

Nope, the Yammer rate throttling is going to stand in your way, and there's nothing you can do to change it. The best you can hope to do is implement some kind of delay that tries to time the windows when you can send, and make sure to process, delay, and re-submit any 429 (too many requests) responses you get.

Related

How to send bulk im messages to slack users in my workspace? [duplicate]

I need to post multiple bot replies (responses determined dynamically) to the same channel.
The obvious way seems to be to do an HTTP POST for each message in succession using this API method: https://api.slack.com/methods/chat.postMessage
Is there a way to send messages to Slack in bulk to post to the same channel? The order in which the messages get rendered need not be important for me.
No, there is no bulk variant. So you basically need to build your own bulk message sender.
Keep in mind that there is a request limit of 1 message per second or your API requests will fail.
There also is a 3 seconds request time-out for many requests between Slack and your app. (e.g. for direct response to slash commands). So if your bot needs to send many messages you want to use an approach that allows you to send them asynchronously.
One solution to this problem that works very well for me is to use a messaging queue for all Slack messages sent from my bots.
You can try multiple messages as attachements -> https://api.slack.com/reference/messaging/attachments

Folder.Bind() Stuck when using Subscriptions for multiple accounts through EWS Managed API

I am using a streaming subscription (EWS Managed API) to subscribe to events on one mailbox. Now, instead of doing this directly, I want to subscribe and take action on incoming mails on these mailboxes through impersonation.
How to achieve it?
What I have Tried:
I did setup multiple streaming subscriptions using service.ImpersonatedUserId() but when i get a event(i get events successfully for the 2 mailboxes i have subscribed to) and try to take some action for e.g EmailMessage.Bind(Item Id) or Folder.Bind(), the code stucks! I dont get any error message. I even tried TraceEnabled= true, I found nothing!
I did see this MSFT link but didn't find an answer.
I need help with for e.g moving the mail to another folder for multiple mailboxes through EWS subscriptions.
The default concurrent connection limit in .net is 2 by default https://learn.microsoft.com/en-us/dotnet/api/system.net.servicepointmanager.defaultconnectionlimit?view=netframework-4.7.2 because Streaming notifications require a concurrent connection to work this is a common issue.So all you should need to do is set the connection limit higher eg
System.Net.ServicePointManager.DefaultConnectionLimit = 100;

gmail API Users.messages: list is not getting replies

If I make a request to the gmail API for Users.messages.list it will return 100 of the newest messages.
If I make another request, 1 minute later and there are no new emails it will return the same 100 most recent messages.
If I make a third request, 2 minutes after the original and there is a reply to one of the 100 most recent messages it will still return the 100 most recent messages.
The problem with this is the it only returns the message id and thread id, not if there is a new reply or not. That would mean that I would have to check every message that I have locally stored, or every one of the 100 returned messages just to know if there was a reply to it or not.
The way that works, you couldn't "check" your email via the api because if you had stored 10000 messages and you were checking replies on all of them you would use up your entire API "number of requests" allocation in a single day!
What's wrong with you Google?
Sure I could use pop3 or imap but why when I could just use something like /list_recent?
You should definitely take a look at this part of the Gmail API documentation: https://developers.google.com/gmail/api/guides/push
Basically, it explains you how you can setup a "watch" over a Gmail account and receive notifications (new e-mail, deleted e-mail, labels added...) through Pub/Sub, the messaging queue protocol from Google.
The notifications will contain an historyId, which is a kind of milestone in the Gmail account. Using the /history endpoint, you'll then get the e-mails that were added and/or deleted since this history point. You have to store the latest historyId you handled somewhere in your app, so that you can query the right changes (and not miss anything) on the next notification.
If you don't need to react to changes in real-time, maybe you can call the /history endpoint periodically, but it will definitely be less efficient at scale.
It takes a bit of work to get this working but at the end of the day you get a very efficient system able to react about changes in real-time.

Slack POST multiple messages to a channel at once

I need to post multiple bot replies (responses determined dynamically) to the same channel.
The obvious way seems to be to do an HTTP POST for each message in succession using this API method: https://api.slack.com/methods/chat.postMessage
Is there a way to send messages to Slack in bulk to post to the same channel? The order in which the messages get rendered need not be important for me.
No, there is no bulk variant. So you basically need to build your own bulk message sender.
Keep in mind that there is a request limit of 1 message per second or your API requests will fail.
There also is a 3 seconds request time-out for many requests between Slack and your app. (e.g. for direct response to slash commands). So if your bot needs to send many messages you want to use an approach that allows you to send them asynchronously.
One solution to this problem that works very well for me is to use a messaging queue for all Slack messages sent from my bots.
You can try multiple messages as attachements -> https://api.slack.com/reference/messaging/attachments

Is it posible to send multiple message to Google Home through DialogFlow?

On facebook Chatbot or others platform we can send message directly to the user.
So for one question we can send multiple answer.
Now, that i'm developing for Google Home, I need to do the same.
I didn't find this opttion.
Dialogflow HTTP call to my server is the only output available.
So is there anything i missed to send message back to user in case I have a multiple messages answer?
(Or do I have to bufferise very message my hook creates before sending it back?)
Thanks
The conversation model for the Google Assistant is different - you can only send a message to the user in response to the user sending you a message. You can only send a single response, but it may have multiple parts (up to two Simple responses, containing messages, plus other features such as cards and carousels).
If you need to send multiple things back - you may need to rethink how you're doing it or how much you're sending back at a time. The Assistant is primarily for audible responses, and a long audible response is generally not a good UX.

Resources