Blog/ Using Feeds to Create Content With CSV Files

The Feeds module is a general purpose import solution. Out of the box, it supports RSS, CSV, OPML and XML from local files and HTTP. But additional formats and data source types are provided in contributed modules. Feeds are easy to work and develop with.
Steps for creating content with CSV files by using feeds:

  1. Download  Feeds and other required modules.
  2. Enable the modules CTools, Job Scheduler, Feeds, Feeds Admin UI & Feeds Import
  3. Navigate to "Structure" -> "Feeds Importers"
  4. Click on "Add importer". Enter the name and description.

We can create as many Feeds importer configurations as we need to.
Here are a couple of things that are important to understand in order to get started with Feeds:

  1. Every importer configuration consists of basic settings, a fetcher, a parser, a processor and their settings.
  2. The basic settings define the general behavior of the importer. Fetchers are responsible for loading data, parsers for organizing it and processors for "doing stuff" with it, usually storing it.
  3. In "Basic settings", you can attach an importer configuration to a content type. This is useful when many imports of a kind should be created. For example, in an RSS aggregation scenario. If you don't attach a configuration to a content type, you can use it on the import page.
  4. Imports can be scheduled periodically.
  5. Processors can have mappings in addition to settings. Mappings allow you to define what elements of a data feed should be mapped to what content fields on a granular level. For instance, you can specify that a feed item's author should be mapped to a node's body.

Create CSV File
You can use MS Excel to create a CSV file.
The first row will be the headers that will describe the content. The other rows in the CSV file will be the content for the nodes.
For example, we can have a CSV file that looks like this:

Note: The headers must match your Mapping fields

Basic Settings

  • Fetcher: Choose file upload. (Settings – leave the allowed file extensions txt, csv, tsv, xml & opml)
  • Parser: Select CSV parser. (Settings – leave the comma as default field delimiter)
  • Processor: leave as node processor.

               (Settings:  choose update existing nodes
                                  choose a text format
                                  choose a content type
                                  Expire Nodes – never)

  • Mapping: Your CSV column headers must match to the fields in your content type. The column header that you import must be added to the page.

Click Save and your feeds will be imported as nodes.

 
Ready to get started?REQUEST A QUOTE