MailChimp/Mandrill webhook for message created/scheduled - api

Is it possible to get MailChimp or Mandrill to notify a webhook URL whenever a message is either created for a list, or scheduled to be sent, along with the list and message IDs?
I have a client that wants to intercept messages from his campaign, add special data from his server, then send the resulting template through his connected Mandrill account. I'm trying to figure out how to implement the first step in this process.

Although I know this is old someone may stumble into this thread, have you checked out the webhook information?
http://help.mandrill.com/entries/58303976-Message-Event-Webhook-format
It has an easy way to implement it inside the account. You just setup a URL to intercept and parse the incoming data. I recommend first saving the data then using a scheduled task to parse the job separately so you don't lose data (although mandrill will try 100x).
If the unique id is not enough for you with your events, and you are concerned about specific campaigns you can tag the emails upon send and they will have the tagged information with the incoming event.

Related

Uber API Reporting: Reference between Report Request and Report Success Notification

We want to generate Uber Eats reports for multiple customers. Since everything is running on one system, the webhook notification for report generation will all arrive on the same local API.
Now wondering if there is a relation between the webhook notification and the original report request?
The reason is that we would like to check the signature of the notification and for this we need the appropriate client secret. Also we want to mark the original report request as completed.
So we need to be able to associate the notification to the right client or at least to the report request.
Is it possible that the workflow id we receive with the report request is included in the notification?
Or is the job_id what I'm looking for? In the notification example this is not so clear to me.
Do you have other ideas here?

Maximo script to send a message to another user?

With IBM ICD/Maximo version 7.6.1.2 I am trying to inform a user when an attachment (arriving via a REST call) has finally arrived.
I have access to the USERID of the requester
the launchpoint is 'add' on DOCLINKS
I aim to inform the user using a message box (or something similar) if he/she is still active on the platform
The whole send/receive action takes more than 10-15 minutes so waiting for a response during the same REST call is not possible. The user sends a POST and later receives a POST.
The problem is, mbo.getUserInfo() points to the username of the external service and not the requester so in my opinion I need to either change the active session or active user in order to be able to use commands like:
service.webclientsession().showMessageBox(msggroup,msgkey,params)
I need a method or commands to do that.
One possible way to do this would be by sending a bulletin board message to the user to notify that their file has been uploaded as shown here

How to chat and call automatically in MS Teams?

I'm working on a solution to build a system that automatically alerts users on Microsoft Teams. The order of execution will be:
Automatically scan alarm logs
Sort and send MS Teams messages to personnel for corresponding processing
If the processing staff does not receive the message, make a call on MS Teams to read the pre-recorded voice record.
I used python to automatically get the warning list, to send this alert list to the handler, I have tried MS Teams REST API but it only supports sending messages to Channel. How do I automatically chat and voice calls to an MS Teams user? Can chatbot help me with this problem? I see there are many types of bots that can be added to the conversation:
I think a chatbot is definitely the best way to deal with this. Essentially, you're wanting the bot to message a user on demand, which is something called "Proactive Messaging". You can read more here and here. There are a few things you need to know about this, but in a nutshell you need a way to specifically identify the user for sending the message, which you can get when the user first installs your bot (mostly you need "ServiceUrl" and "ConversationId").
With regards to knowing if the user has read the message, you might want to send an "adaptive card" with a button for the user to acknowledge that they've read the message, and if you don't get a callback within some time frame, start the voice call.

Send message to th all of bots users (telegram api)

how to send Send message to the all of bots users?
There is no way to sned message to all ?
what is the method name ?
From Official API FAQ:
How can I message all of my bot's subscribers at once?
Unfortunately, at this moment we don't have methods for sending bulk messages, e.g. notifications. We may add something along these lines in the future. (...)
Obviously, if you store users chat_id, you can send individual message to all users (I use this method).
Navid wants to send message to all subscribers via bot.
If subscribers are more than 100 persons bot will very slow to sending all messages and may doesn't send messages to all.
Navid's question was how we can send message without this problem?
you can send with curl_multi_exec
Currently, a developer would need to implement a special broadcasting function that would send the message to each active user at the time adding a small delay to avoid hitting the rate limit of 30 messages per second (see https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once). This would mean that a very popular bot with say 10K active users cannot give timely notification as the last user would get the message about 5 minutes after the first user.
Here is a feature request to ask to add a method in the Bot API to broadcast a message to all its active users at once. You can upvote this feature request. https://bugs.telegram.org/c/8463

REST API design for endpoint with notification

I am creating an API endpoint which takes a customer order, create the order and send email notification. At our current design once we successfully create the order, we send a success notification 201 to client and then make a call for our internal email api. Upon getting success notification from us the client app shows users a message to check his/her email.
I don't feel comfortable with this design because if for some reason the email sending method failed there are no way for client to understand this. On the other hand if we wait for to successfully the send the email and then send client app success notification it takes longer times.
So what is the right approach for overcoming this problem?
I think your design works. Why would the client care if the mail service is not working? If the order passes all validations on the server and is persisted I would treat that as a successful state and return 201 Created.
When the client gets 201 Created, then do what you say; give the user a message about checking their mail, but tell them that they should have some patience. Something like:
Your order was submitted. Please check your mail. If you haven't got a mail in 24 hours please contact us, "or whatever other solution here".
You have no control on what time the mail will arrive at the users mail box anyway since mail sending is not a synchronous process.
Remember: Seperate your conserns.
202 Accepted would usually be the most appropriate response for a request which requires further processing. In your case, however, this might not be right because the email is not fundamental to the resource creation.
201 Created is perfectly acceptable for you because the order has actually been created. However, as the spec says, you should return a Location header with the URI of the created resource and an entity describing how to access the resource. That should get around your issue with a mail service failure - the client can still access their order and, to be honest, e-mail is not guaranteed delivery so I'm hoping that the email isn't an absolutely required part of your business process.