Responses to emails sent from the API not threaded - gmail-api

I noticed that when I send messages from the gmail API and then get an email response to them, the response is never threaded with the original message. Repro steps:
On gmail.com, create a new email draft to someone. Don't send it.
Go to https://developers.google.com/gmail/api/v1/reference/users/drafts/list and log in at the bottom. Enter 'me' for userId and click Execute to get the ID for your draft.
Go to https://developers.google.com/gmail/api/v1/reference/users/drafts/send, log in at the bottom, enter 'me' for userId and fill in the ID from step 2. Click Execute to send the draft.
Have the other person respond to your email.
On gmail.com, the person's response is not threaded with the original email that was sent. However, this works just fine if you send from the gmail UI instead of the API. In examining the headers, the only difference is that the API adds a second 'Received' header. I'm not sure if this is the cause of gmail not threading.
Has anyone else seen this? What is the gmail.com UI different from the API when sending a draft?

It was a bug. Barring issues rolling out the fix, should be resolved by next Weds, July 9th.

Related

azure logic app not able to retrieve who is the approver after approving the mail(UserEmailAddress- showing Null)

I have created a flow using logic apps where once the owner approves the mail I need to know who approved that mail. While using normal my account I am able to retrieve the user who approved the mail but while using the service account am not able to retrieve the values. All the values its showing as null while using the service account.
How do I get the --> email address <-- of the user that selects 'Approve' or 'Reject' buttons in the email? If an email is forwarded to another person I would like to know who (email address) clicked approve or reject.
After reproducing from my end, I observed that when the mail is viewed in HTML format this doesn't work and also while forwarding the mail, but this works when the response is sent through the adaptive cards and not the HTML message that are received during the Send email with options action. One way that this can work is when you use only the adaptive cards that are send as the request.
RESULTS:
and when you use HTML responses then below is something how you'll be receiving the response.
You can also try Creating your own actionable messages for Flow Approvals by StefanS365 where in you add provider in Actionable Email Developer Dashboard and request the approvals.

Opening gMail Website to a specific message

I'm using the gMail Node API to search for specific messages (not drafts) using the gmail.users.messages.list API, then I use the gmail.users.messages.get API to get the details for the message.
So I have the message id, thread id etc.... in the payloads returned. I present the user with the subject line from each message and I would like to also give the user a URL that will open the message in the gMail website.
If I use the gMail website to open one of the messages that are in my test bed the URL for gMail is:
https://mail.google.com/mail/u/3/#inbox/FMfcgzGljlhhRnrLbTDqXnNxSbhRcVCN
I could easily put that URL together myself but here are my questions:
Will the '/u/3/#inbox' portion of the URL always be the same for the authenticated user?
How do I get the ID at the end of the URL(beginning with FMfcgz...)? I searched the payloads from the API's and I cannot find that ID in any of the data returned.

Sending immediate response and detailed message in DialogFlow

I have a requirement of sending two messages from my chatbot. The first message will be send immediately as a response like "please wait for a moment" and the second one will be sending after an API call.
I'm using Dialogflow with Facebook messenger. Is it possible in Dialogflow send an immediate message and later send a detailed one?
No, you can't send two responses asynchronously. You could show two simple responses but those would be sent at the same time.
app.ask(app.buildRichResponse()
.addSimpleResponse('This is the first')
.addSimpleResponse('and this is the second')
);
I don't know a way to give two responses to the user at different times, but as an alternative, you can give a default response to the user along with the fulfillment response in case something goes wrong on the server side like
Bot: Something went wrong.. please check your internet connection or try again after some time.

Last Message Sent by User Messenger Bot

I'm working with Facebook Messenger Bots and I need a way to make an HTTP Request for the last message sent by the user. All I can find is that Messenger Bots send a web hook with the information but, I specifically need to be able to manually check for the last message sent by the user. Any input would be helpful. Thank you.

Watch request successful but not receiving any messages

I am trying to get Gmail push notifications by setting up a watch notification. I went through all the steps in the Push Notification guide and received a successful historyId/expiration response, but since then all's quiet. I haven't gotten any of the emails pushed through. Any ideas?
AFAIK, your application will only receive a notification message describing the change if the mailbox update matches your watch request.
With this, try to provide the topic name and any other options in your watch() request, such as labels to filter on. For example, to be notified any time a change is made to the Inbox:
POST "https://www.googleapis.com/gmail/v1/users/me/watch"
Content-type: application/json
{
topicName: "projects/myproject/topics/mytopic",
labelIds: ["INBOX"],
}
Other than that, check your Gmail notifications settings. If that still doesn’t work, try the troubleshooting steps given here.

Resources