I am creating a subscription to a list in Microsoft SharePoint and everything works well. Anytime make a change in the list I'm subscribed to, I get a notification.
But I would like to be able to see which item was changed instead of just seeing that there was a change in the list. For example, I made a subscription to a list and changed some metadata in one of the items that were in that list. Microsoft sent me this as the notification: Notification from change in SharePoint list. The most useful information in this message is the resource, but that is just the path the list that I am subscribed to.
The only way that I have found so that I can find what item was changed is if I make a GET request on Microsoft Graph Explorer that says: https://graph.microsoft.com/beta/sites/{domain name}.sharepoint.com:/sites/{SiteName}:/lists/{listID}/activities
This gives me all the recent events that happened in the list, shown here. It includes the notification id, the user who made the change, and the time that it happened. This information is nice to have, but it doesn't directly lead me to finding out which item was changed.
I had an idea that I could look at the time that a notification happened at (given by the GET request that shows recent activities in the list), and then try to match that with the the lastModifiedDateTime of one of the items in my list. However, I tried this a few times and found that the time that a notification occurred did not always completely match the lastModifiedDateTime of the item that I changed.
Has anyone found a better way to do this? I would ideally like to be able to find the ID of the item that changed, but anything that is more reliable than the modification time would be great.
I don't see a way to do this. The ideal solution would be to have the resource data in the change notification. Because this is currently not supported, I suggest you create a feature request here for it so that it may be implemented in future.
Related
I am importing/creating drafts in Gmail using the Gmail API. After creation I'd like to redirect the user to the Gmail UI with the opened Draft in the composer window.
I made it work properly for https://mail.google.com/mail/#drafts?compose=[MESSAGE ID]. Other urls I found here also worked well. Gmail is doing some redirects and eventually the composer window is opened with the draft.
Now my issue:
If the user has not enabled "Conversation view" this will not work at all. The redirect will then result in https://mail.google.com/mail/u/0/#drafts?compose=new and only an empty, new composer window is shown and a new draft is created by the UI.
If I open the draft directly the ID-format is different. https://mail.google.com/mail/u/0/#drafts?compose=hJzgZpSqgLQcCWgZqnlNRzRBfMbjZVnZklzvcFxhQCdwT... and I have no idea if this format can be generated somehow.
Does anybody has an idea or experience to also make it work with this UI setting. How I can force Gmail to load the draft into the composer window?
Thanks in advance.
If you have Email Threading > Conversation View enabled
Make use of the following URL
https://mail.google.com/mail/u/0/#inbox?compose=DRAFT_MESSAGE_ID
If you have disabled the Email Threading > Conversation View option
Make use of the following URL
https://mail.google.com/mail/u/0/#inbox/DRAFT_MESSAGE_ID
Additional information
The main difference between them is that the first is treated as a conversation while the second example is not.
You can use #drafts instead of #inbox in the URL.
The number after .../mail/u/ is the session you have opened
You can retrieve the DRAFT_MESSAGE_ID by making a request to the API
You can approximately generate the compose ID by yourself, there are some examples out there (not recommended). I strongly recommend you to use the DRAFT_MESSAGE_ID instead.
This appears to still be an issue the one solution I did find was that you can find your draft directly (even though it would be the last draft) and go through multiple accounts by redirecting to
https://accounts.google.com/AccountChooser?authuser={user account}&Email={email account}&continue=https://mail.google.com/mail/#search/rfc822msgid:CAMU-31NcJCVHyGNsAycRKfuS0nMonoaZ6wFMD90Sej996qjuPQ#mail.gmail.com
You need to get your message id toi replace the area from <> from your draft. So you'll have to create the draft first. Get the google message ID, then use that with messages/get to get the Global Message Id (also referred to as message id) and then use that with a search. At this point you'll open a page with a search to a single draft but it will not be opened. Your users will have to click on the one message. Unfortunately there does not seem to be a way to have the good way work for conversation view, and this way work for non.
I tried many different URLS and nothing worked. As noted in the original question, it might work that you could link to the full URL but I see no way to get that. If you spend long enough working with an email you'll even find that ID changes so they aren't even stable within a single day.
Another solution that could work is as explained:
https://mail.google.com/mail/u/0/#inbox/DRAFT_MESSAGE_ID
But as noted this does not open the draft on the first time you go there. It seems you have to travel to that link 2 times in a row to get the message to appear. I guess you could go to the page maybe inject some javascript to go to the page again but I don't know how to do that.
I have a simple notification use-case: Coaches need to approve their user's weekly check-in logs. When the log is approved, the user gets a notification.
The issue is that I don't understand how to add the activity without adding it to the coach's notification feed also by targeting the notification with the TO field. If I do that, then I need to exclude the copied activity from the coach's feed, because the coach doesn't need a notification of the activity they just took. Also, I then have an issue with the unread counts, and I would either need to automatically mark notifications that one user sends to another as read so that it doesn't distort the unread count for the sender.
Anyway, the question I have is am I setting this up correctly? Is there an easier way to achieve the result I want?
If the feed ID and activity actor are the same, you can use discard rules to achieve this.
For instance:
If the notification feed is called notification:$choach-id and the activity verb is set to $coach-id then discard rules will make this work.
More information about this is available https://getstream.io/docs/discard_rules/
I am getting all the history from Basecamp and putting it into a database. However when I get everybody events history it doesn't include people who have been removed and are in the trashed folder.
I used "people/trashed.json" to get everyone who has been trashed. However when I put in their id like "people/userID/events.json" it comes back with nothing, I also tried "people/trashed/userID/events.json" but still nothing. On the api documentation (https://github.com/basecamp/bcx-api/blob/master/sections/people.md) it mentions how to get the people who are in the trashed part but not if it is possible to get their events history.
Does anyone know if getting a trashed persons event history is possible and if so how do you get it?
Thank you.
It seems it's not possible. I removed one user and invited him again, but the new user profile has different id. I also do not see an option to move user from trash.
My idea was to add user again to one, test project and delete again after fetching events.
You can try to ask Basecamp support about it.
The only way I have found to get the data is to go through every campaign and get their events. The events include ones from the people who are trashed. Also if you get the id's of the campaigns that are trashed you can still get the events off them, therefore it might be a bit tedious but you are able to get all of the events of trashed people this way.
Lets hope there is a better way in Basecamp 3.
I have a streaming notifications listener that's subscribed to multiple mailboxes. When a creation notification comes in, I bind to the created item to try to learn more about it.
I try to look at the ParentDirectoryID.Mailbox to try to figure out where the item is being created in, but it's null. The API says that the Folder ID and the FolderName/Mailbox properties are mutually exclusive.
So, how do I load the FolderName/Mailbox properties?
I suggest you should go with the following approach to solve your problem:
You can maintain a List or Dictionary (it's up to you) to store entries of SubscriptionId and MailBox at the time of subscription, once you received notification, extract SubscriptionId and map to your stored List/Dictonary to get mailbox.
This solution is convenient if you don't need any extra details from Exchange, as is makes fewer calls to Exchange.
You can get MailBox details from passing ExtendedPropertyDefination details and make call using extracted ItemId from notification.
I believe you get both of the approaches.
We use Lotusnotes 6.5 as email client. We wil have around 1600+ mails for 9 hrs. If a mail not checked , we have face serious issues with our client. Can any script can be written to check whether all mails are checked and replied?
Update:
We have already tried moving the mails to another folder.But has this mailbox handled by team of persons, we noticed lot of human error happening like moving a unread mail, sometimes they would have read mail but forget to reply it etc.etc.
So I was looking out for a script solution, will your other options. Also one more thing we do is we cc our mailbox mail id for all outgoing emails to have a track of all replied mails, will this could help in any way to find out which mails was missed?
If you need to track unread marks, I second the aforementioned nsftools solution, which works in Domino 7.x too. However, this is very much Notes ID-dependent. A folder would be better.
Note that 6.5x is well out of support, and that Domino 7.x officially died this week: use something at least vaguely modern!
There's an easier non-programmatic way. Just move the email from the inbox into another folder once the email has been responded to. That is more reliable than any programmatic solution, and keeps your inbox tidy (which will certainly be necessary if you get nearly 200 emails per hour!)
That said, here are some other ideas.
Determining if the document was read
Unread marks are not your friend here, unless you'll be accessing the mail file from the same client. Also they tend to get out of sync and would likely prove unreliable at some point, especially given the number of incoming emails. Instead you'll need to have some information that is saved within the individual mail document, such as the last accessed property or a custom item you manage via scripts/formulas.
You can see if an email has been read by checking the Last Accessed property of the mail document. According to IBM's technote (https://www-304.ibm.com/support/docview.wss?uid=swg21086670), the property will be updated when the document is read.
You could write a script in the QueryOpen event that stamps a value on the document and saves it.
Determining if the email was responded to
First off, I'd suggest you save all sent emails in case you need a record of what was sent to the client. That won't give you a way to see which emails have not been responded to, however.
Instead you could add script to the reply action within the memo form. When someone click's reply it could update the current memo, stamping an item on it to say who replied and at what time, for instance. Then you can create a view to show any emails that don't have that item, and another view to show emails that do grouped by who responded. The second view could even show how many emails each person responded to, something that might be used as a measurement of performance perhaps.
"Unread mark" checking is not exposed in the API.
I did find 2 links, this one is a basic implementation, where as this link does have more robust code and is implemented as an object in LotusScript. It should be compatible with Notes 6.5+.
I found the second link through nsftools website which has lots of great snippets that solve various problems. You should at least be able to detect if a mail has been read or not. Note that it requires making API level calls. You should be able to create a new script library and copy/paste the code into it.