Tip of the week #2: How to create Drupal nodes in batch from an XLS, CSV file or from an RSS feed?

I searched high and wide at the Drupal Modules on a solution that would allow me to create new nodes either from an RSS feed (so I could automatically create new pages based on my Google Alerts that I set for my topic of interest) or from a spreadsheet (where I kept track of a list of items of interests in the past.) In my search amongst the modules I used keywords like batch, create,  xls but none of them yielded any useful results on the first few pages. Then a friend of mine was showing a project he was working on and I noticed that he was using a module I was not familiar with: Feeds. Reading its description I realized that I should have used “import” as keyword.
Feeds is great: in 5 minutes I created hundreds of nodes from my spreadsheet in my Drupal 7 site and it exists for Drupal 6 too. (I saw no news yet ow/whether/when there will be a Drupl 8 version). Feeds requires two modules: Chaos Tools, which I already had) and Job Scheduler. I was a bit hesitant installing the latter as its latest version is only an alpha, but seeing that almost 40,000 site has it gave back my confidence.
A side note:  Before adding nodes in a batch you have to take care of two things:

  1. You have to have your content type ready for the importing, be it a page, post, book or a custom one. By “ready” I mean it should have all the fields with the proper formatting you want to import into.
  2. You have to have clean data in the document you are importing from. E.g. if it is a spreadsheet, make sure that all the content in all the cells is exactly what you want. Otherwise you will end up with less then ideal nodes in your Drupal.

After installation I had to create a “Feeds importer”. To do so I went in my admin menu to Stucture -> Feeds importers -> Add importer, aka at /admin/structure/feeds/create. I will not go through all the possible settings and configuration of the importer as for that you can find excellent sources online, e.g. this video and its slides or the official documentation. You probably want to play with it on a development site to learn all the nuances. They are not that complicated.

You may also like...

3 Responses

  1. January 25, 2013

    […] I also spent a few hours working on my sites. I added 10 books to the FilmandReligion.com, kept adding the films that Jewish film festivals are playing this year, so the site now has the full listing for 9 festivals this year. I have the data already tabulated for dozens of festivals, it is just a slow process to actually them to the site. I also added a few pointers to job opportunities and obituaries to my Forestvile blog. The tip of the week for my professional blog at VisionNest.com was on “How to create Drupal nodes in batch from an XLS, CSV file or from an RSS feed?” […]

  2. June 24, 2014

    […] un video, una presentación y un enlace a la documentación oficial de Feeds, así como el enlace a la página en la que leí por primera vez acerca de Feeds como solución a la importación de […]

  3. July 3, 2014

    […] les dejo un pequeño tutorial sobre lo que hay que hacer para crear nodos desde ficheros […]

Leave a Reply

Your email address will not be published. Required fields are marked *