Feature request: slack integration

Slack is useful for getting notification when someone adds a citation to a group library via the RSS and atom feed tools.

It would be really cool if it were possible to post a citation in a slack channel and have it added to a group library, as well.

Is anyone aware of any work along those lines being done at the moment? Or can anyone make suggestions about how that might work?
  • You'd create a bot that calls the Zotero API. But what exactly would be posted on the slack channel? A DOI or somesuch? That should be doable. You'd have to host the bot somewhere, but if this is low-traffic, Heroku would suffice.

    Not sure what this would add beyond just having someone adding it to the group library?
  • That's handy - thanks for the roadmap.

    As to what would be posted, I'll have to see what the Zotero API requires, and how authentication works, but yes, I was imagining that someone would post a DOI or PMID, and a reference would be made in a group library.

    To my mind, this would add a couple things - easing the process for adding to group library (wouldn't require user to have zotero on their machine or a web login for adding a ref), and might make it easier for all the participants in a slack channel or workspace to be notified of the addition. Basically, the more I can do in slack, the better for me!
  • From the perspective of running a large collaborative group in a team that relies on Slack a lot, I'm somewhat skeptical. We have an "add to Zotero" channel that we have RAs periodically go through to add items to the Zotero library.

    The reason for that is that a) metadata isn't always perfect and it's best to fix right on import and b) you'll want to file & tag items right away and by the time you've added collection support to Zotero in Slack you've established such a complex syntax that it's probably easier to just use Zotero.
  • That "add to Zotero" channel seems like a good approach. I agree that shooting for full feature support is not a good way to go, and it likely would be a bad idea for a "large collaborative group".

    But I think it's mostly a question of scaleability - if I've got a small group that's mostly sharing pub med IDs, it would be a useful niche. Not a general purpose tool, for sure, but something small could be handy. I'll try to kick the tires a bit and see what I can come up with.
  • You could add them in a Google sheet. There's a translator that will import a csv with pmids in one go.
  • Are there APIs to translators? It looks like the Zotero API allows read/write, but if I understand the write documentation correctly (https://www.zotero.org/support/dev/web_api/v3/write_requests), it looks like I'd need to populate the JSON from the PMID using a translator. If there are APIs to translators, can anyone point me to the documentation?
  • Zotero doesn't provide a translator API (a major reason being that all the translators would be running on the same IP and many sites and even APIs will impose rate limiting).

    The Zotero translation server is fairly easy to set up: https://github.com/zotero/translation-server

    Or Wikimedia, which uses Zotero + translators in the background, does offer an API for their Citoid service:
    https://en.wikipedia.org/api/rest_v1/#/Citation/getCitation
  • Fantastic! Thanks @adamsmith - I bet I can build something using the Citoid API. Translation server does look reasonable, too, but I'd like to keep my bot serverless if possible. I suspect a bot that takes a /cite PMIDFOO string and uses the Citoid API to generate a Zotero write may be reasonable...
  • Any news on this? And also the other way around (Slack notifications, if articles are added to a Zotero group library)?

    This is something we could use for our group as well.
  • Slack notifications for articles added to Zotero is already possible. Technically, Slack should be able to read straight from an RSS feed, but that's been buggy for me, so instead I'm using an IFTTT recipe that posts to slack every time a new item appears in the RSS feed of the Zotero group.

    You can get the RSS feed for a group on the group library page here on the website.
  • I implemented it, but it's mostly as a toy - I coded in R, dockerized it, and deployed with heroku. Probably not a production-scale approach, and not best practices. I'll add it to a github repo and share it later this week if that's useful, though.
  • edited June 30, 2020
    I have integrated slack and zotero via RSS feed following great directions given here
    https://michaelmccarthy.netlify.app/post/integrating-slack-and-zotero-with-rss/
    It posts the update and clicking on it takes one to the zotero page on the browser.
    But I am wondering if there is anyway to connect this to papership (third aprty app for zotero) and if anyone has any wisdom to share on that topic.
    I appreciate any clues on that
    thanks


  • @benheavner - did you ever end up making your zotero bot public? I'm looking to make something similar for a small group and would love to avoid starting from scratch. I'll make whatever I come up publicly available, of course. Thanks!
Sign In or Register to comment.