List inbox messages using node.js gmail api - node.js

I have done this demo, However I am not sure how I would go about listing the actual messages in my inbox. I have looked here, but I am not sure how to incorperate that into node?
Thanks in advance! sorry if this is blatantly obvios.
best,
-Zoe

follow the below steps:
make your node.js client.
enable the push notification(that notify you when new email arrived).
HistoryId contains in The notification you received.
Get your mailbox update according history ID.
Receive history list contain message Id , use that message Id and get the email.

Related

Is there a way to achieve the same behavior of sending notifications as email notifications using GitHub API?

I'm building a Telegram bot for myself that should send to me notifications when I get any. I'm trying to achieve the same behavior as GitHub's email notifications. The problem is that I'm not sure if it's even possible. I'm working with GitHub API for few days straight trying to solve this issue but I still have no idea how to do it. It's like GitHub API doesn't provide enough information about the notification.
For example, it provides field "reason", which describes why I got this notification but how to understand what this notification is about? Like, if I was assigned to the issue or pull request (right now it seems like notifications are the same whether I got assigned to the issue or got a new message in the assigned issue), or got a new message in a watching issue/pull request or anything else.

Reset unread message count for Facebook page (Facebook Graph API)

I am trying to build a small Python tool to connect our Helpdesk software (Helpscout) with our companies Facebook page to be able to receive and answer messages from clients directly from within Helpscout.
I am using the conversation endpoint to grab all unread conversation:
conversations = api.get_object('[page_id]/conversations?fields=messages.limit(20){message,from},name, unread_count,message_count')
The problem is, once I read the messages the unread counter still stays the same until we open those messages directly from within the Facebook page. Spent lots of time to find a solution, but apparently there is no option to reset the counter or handle it any other way.
As a workaround I currently use the overall message count and compare it every time I check for new message to only load the new ones. That works fine, but there is still the issue that all messages stay unread on the Facebook page and will be all loaded again with every API call until we manually click them.
Thought about using Selenium to just do this job 1 time per day and clean the inbox, but don't really like this. Any idea how to solve this? Maybe I missed some API feature which can help?
I use the Send API to send the messages back to our customer, but could also not find any option to update the conversation in any way to handle it:
data = {"recipient": {"id": "xxxxx"}, "message": {"text": message}}
response = requests.post('https://graph.facebook.com/v3.2/me/messages?access_token=xxxx', headers=headers, data=json.dumps(data))
Maybe it is possible to move the conversation from the regular inbox to "Done" folder which could solve it?
After doing some research I found a solution to it here:
FbChatBot mark message as Read
You cannot update the unread count, but you can let all conversations automatically move to the "DONE" folder to let them not show up in your inbox anymore by using the "Handover Protocol": https://developers.facebook.com/docs/messenger-platform/handover-protocol
The app has to be set as 'Primary Receiver' and 'Page Inbox' as 'Secondary Receiver'.
All conversations will be moved to "DONE" now. Just make sure to set the correct permissions in the messenger webhook settings:
There will be no error without it, but messages will stay in the inbox and it does not work.

No user messages on Chatbase transcripts

I've been trying to take advantage of the Transcripts feature in Chatbase, but whenever I open a transcript all the user messages are shown as (No content).
The messages sent by the bot are all shown properly and the order of the messages is correct as well (both user and bot). On the messages report tab I can see the user messages so they are being sent across properly.
I'm sending all the messages using the generic message API, with the original text on the message field.
This has been happening consistently for me on all projects, so I'm probably doing something wrong..any ideas?
I work on Chatbase and would be happy to look into your issue. If you could please contact chatbase-support#google.com and provide the api key, the name of the bot, or the email address you used to create the account I will be happy to look into the issue for you.

Firebase (Google) Cloud Messaging (FCM, old GCM) - check message status

I'm trying to find a solution to ensure a push notification to my Chrome extension has been received before sending another one. IF it hasn't been received and another one should go, I would change its content to tell the user he has multiple new informations to check.
So I'm looking for a way to check the previous message status using its ID, or check the queue of messages if using a collapse key, before sending a new one. But I can't find anything related to this, except here : https://support.google.com/googleplay/android-developer/answer/2663268?hl=en there is FCM message status detailed, but no way to get them after the first response.
I am aware receipts can be implemented using XMPP but I would really prefer to remain on the regular HTTP protocol.
Thanks ahead for any help.
XMPP receipts would be the recommended way for you to get an ack that the message was delivered. You can also use the Play Developer console (Android developer console) to view statistics on the status of messages. However this will not be sufficient if you want to automatically resend, you would have to do this manually.

Find Which script or workflow is sending mails

I got a Netsuite CRM system from a client where already there are 100+ workflows and scripts implemented and running.
One of the consumer of client is getting system generated emails from netsuite on Daily basis which they want to stop. Say the mail id is abc#xyz.com
Client asked me the same, now my question is how to find which workflow or script is generating the mails or is there any simpler way to block the mails sent to that id?
Thanks in advance.
Regards
Rahul
Thanks for the reply.
The best option I found was sending that mail id to Netsuite support and asking them which workflow/script is really sending the mails to which they replied.
Once that was done then I found it to be a workflow which had a saved search that was giving the data.
I went to the record from the saved search and I was able to stop the mails.
Any ways thanks for your time.
Glad
In your case, you have to do some dig through with your email and its content.
Check the content of the email and check for the email reason. Ex. Order Completed, Payment Pending
From this you can identify from which record mail is being sent.
Check the Messages sub tab under General tab of the Customer record for the author of the email.
Download all Scheduled Scripts with deploy status as Released and open all the script files and use Find all method with the authoremailid and authorinternalid
Thanks
Frederick
Best way I found:
Get the mail id.
Search it in global search
It will give corresponding record.
Open the record and in bottom go to system information.
Check the Active workfow and check that work flows you will find your answer.
Thanks
Gladiator

Resources