Wednesday, February 2, 2011

Populate LinkedIn Publications using PubMed IDs

Note:  The LinkedIn-PubMed script has been updated and is discussed here.

LinkedIn now gives you the ability to add publications to your LinkedIn profile. Currently, each publication must be added manually including title, author list, data, abstract, etc. which can be a real drag if you need to enter more than a couple publications. If you're a Firefox user, you can use this simple script to fill in publication data by entering only a PubMed ID.

To install the script:
  1. Install the GreaseMonkey Firefox extension by going here and hitting "Add to Firefox".
  2. Install the LinkedIn-PubMed ID Lookup script by going here and hitting "Install".
  3. Edit your profile on the LinkedIn site and go down to the link that says "Add a publication". This link will come after your "Experience" section.
  4. You should see at the top of the form an input box for PubMed ID. Enter your id and hit the search button. The form should be filled out with the publication information as acquired from PubMed. If you're happy with the results, hit submit. Otherwise, edit to your liking and hit submit.

Here are screen shots of what the LinkedIn page looks like before you install the script:

and after:

Here's what the form looks like after submitting a PubmedId:

Some Technical Details

I imagine it's only a matter of time before LinkedIn adds PubMed look up or an equivalent convenience, so I didn't want to invest a huge amount of time in this endeavor. GreaseMonkey was a natural choice as it's designed for the task of enhancing existing web sites and doing mash-ups. In this case, I needed to make calls out to Entrez's EFetch, parse the XML response and populate the fields in the LinkedIn form. GreaseMonkey made the PubMed look up a snap, as its GM_xmlhttpRequest method allows for cross-site http requests, something normal JavaScript disallows for security reasons. GreaseMonkey scripts are written in JavaScript and I also brought in jQuery to facilitate manipulating the website's DOM.

As it turned out, the hardest part of the whole project was dealing with the author list. First, LinkedIn automatically includes the LinkedIn user's name in the authors list, so I needed to try to identify and remove the user in the authors reported by PubMed so that it wouldn't appear twice. My simple minded check has been working for my publications, but will surely slip up in some harder cases. The second problem was working with LinkedIn's own JavaScript used to make the author list dynamically increase or decrease as authors get added. In the end, blowing away their scripting and replacing it with my own seemed like the most expedient route. I borrowed heavily from their code to do this and the end result is a bit of an ugly jQuery/straight DOM jumble.

I was able to successfully enter all my publications, but I am certain there will be instances where it falls flat. Let me know how it works for you!


Anonymous said...

Lots of beneficial reading here, thanks! I had been browsing on yahoo when I observed your article, I’m going to add your feed to Google Reader, I look forward to much more from you.

Greg Benison said...

A useful script - I used it today. Thanks!

Anonymous said...

Just downloaded and used it today. Worked fine for my publications! Nice script!

valegi├▓ said...

thank you!!! it's very very usefull! Now I hope Linkedin alloew us to change authors order !

Valentina said...

Very very usefull!!!! Thank you!!!!

Herve said...

Nice idea, but I tried in both Firefox and Chrome with GreaseMonkey plugins install... and sadly it does not work (probably due to new version of web browser or page on linkedin not being the one recognise by the script...) shame, because it was an excellent idea!!

Herve said...

I tried it in both Firefox and Chrome with GreaseMonkey installed and it does not work anymore, probably due to new version of the web browser or linkedin pages... shame because it is extremely useful!!

mr.AA said...

Hi Herve,

I was afraid that the new changes in LinkedIn might break things. I'll work on this over the weekend and post an update.

Thanks for letting me know about the issue!


py shih said...

I meet same issue as Herve. It doesn't work now...

py shih said...

I meet same issue as Herve. It doesn't work now...

mr.AA said...

I just uploaded an update at It should now work with LinkedIn's new profiles. I also added DOI lookups.

Please let me know if you run into any problems.


Skye said...

I have only one publication out there an I'm the fourth author and I would like to add it to my Linkedin account. You seem like you have some experience in this field, here is my question: What is the graceful way to add a publication to linkedin so that I don't look like the first author?


mr.AA said...

Hi Skye,

Yes, it's a shame LinkedIn doesn't preserve author order. I'm no expert, but here are two philosophies:
1. Folks that use LinkedIn will know about this shortcoming and won't fault you for appearing first, or
2. I've seen some folks include in the Description section a disclaimer saying that they are not first author and that this is LinkedIn's behavior.

Hope that helps!

lechu said...

I've just come across this script and it seems to do exactly what I need. since is down I downloaded it from unfortunately, although it does create the "PubMed ID or DOI" search form in the "add publication" box, it does not perform any search on pubmed ids nor dois, or maybe it does but it does not fill the form. anyway, I'm sure it has to be due to recent changes on the web, since the first this I had to do in order to make it run was to edit the script in order to accept* at the @include section along with*, but even if that made the script to work on that page the results are not displayed. is there any quick change we can do on the script, or is there anything you can update?

thanks a lot for such a great idea. wouldn't it be good to be able to link google scholar or researchgate information on linkedin?

mr.AA said...

Hi Lechu,

Thanks for the comment! Yes, is now defunct. Here's a link to the latest version of the PubMed tool:

With this update I relocated the script and fixed it to handle some of the new wrinkles LinkedIn made to their profile page. I hope this works for you!


P.S. Yes, I agree that LI could do a lot more to make the profiles "academic" friendly including the links you mention!

lechu said...

I've just followed your comment's advice, installed the updated script, populated my LinkedIn's publications section with the only minor hassle that you have to add each paper one by one, and wrote public comments on LinkedIn, Facebook and Biostars (a bioinformatics centric forum) for my contacts to be aware of such a great tool. thanks a lot for your effort!