PB Import allows you to import content, including nodes and complex paragraph structures, into Drupal using CSV files. It provides features for file management, taxonomy integration, image handling, and robust error tracking to streamline bulk content operations.
PB Import imports content nodes and Slideshow, Accordion or Tabs paragraph structures from CSV files. It is for Drupal site builders who use Paragraphs Bundles.
Typing dozens of slides, tabs or content items by hand is slow. Upload the images by SFTP, register them, upload one CSV file, and PB Import creates the content.
Start here
- Watch part 1 of the PB Import video guide: introduction and overview
- Watch part 2: node import workflow
- Watch part 3: paragraph import
- Watch part 4: advanced features
Features
- Register Uploaded Files: Makes images that you uploaded by SFTP known to Drupal. Enter the folder under the files directory in "Image Folder Relative Path" and click "Register Files". Folder names may use only letters, numbers, and the characters - _ and /, and may not contain "..".
- Import Nodes: Creates one node per CSV row. The form asks for "CSV File", "Image Folder Relative Path", "Content Type" and "Vocabulary Name". Tags are separated with a pipe, as in
Featured|New, and missing terms are created. - Import Paragraphs: Creates a three-level structure for a Slideshow, Accordion or Tabs. The form asks for "Paragraph Type", "CSV File", "Image Folder Relative Path" and "Parent Title". The "Paragraph Type" list shows only the types whose Paragraphs Bundles module is enabled.
- Header checks and row reports: The import stops with a message when the CSV headers do not match, naming the missing and extra headers. A row is skipped when its image is invalid, when it has neither an image nor body text, or when its column count differs from the header. A node row also needs a title.
- Images: Accepts jpg, jpeg, png, gif and webp, with alt text and title from the CSV. A row with an empty image column is imported without an image.
- Menu and help: The three pages sit under Content → PB Import, and the entries also appear in the Drupal sidebar's Content menu. The page titles are singular ("Import Node", "Import Paragraph"), while the menu entries are plural. The module help page is at
/admin/help/pb_import. - Defaults: On Import Nodes, "Content Type" and "Vocabulary Name" both start as
pb_import_node, and "Paragraph Type" on Import Paragraphs starts as Slideshow.
The CSV files
Use a comma as the delimiter and quote any field that contains a comma. The headers must match exactly, with no extra and no missing columns.
For nodes:
csv_image_url,csv_node_title,csv_image_alt,csv_image_title,csv_node_tag,csv_node_bodyFor paragraphs:
csv_image_url,csv_image_alt,csv_image_title,csv_target_title,csv_target_tag,csv_target_bodyWrite image names as file names only, for example product1.jpg.
What an import creates
- Import Nodes uses the content type "PB Import Node" and the vocabulary "PB Import Node". The content type has the fields Body, Image and Tag. Another content type works if it has the same field names.
- Import Paragraphs creates a parent paragraph that holds one section per CSV row. Each section holds one "Target" paragraph with Body, Image and Tag. The tags go into one vocabulary per type: Slideshow, Accordion and Tabs each have their own.
- The imported parent paragraph is not attached to a node. Create a "PB Import Para" node and select the parent paragraph in its "Referenced Paragraph" field.
Permissions
- Register Uploaded Files and Import Nodes need the permission "administer site configuration".
- Import Paragraphs needs the permission "administer content".
Paragraphs List
The list of all paragraphs is part of Paragraphs Bundles 2.x. It is at /admin/content/paragraphs/paragraphs-list and has its own permission, "access paragraphs list". Give that permission to the roles that used the list.
Submodules
- PB Import Node: Adds Import Nodes and the "PB Import Node" content type. It needs PB Import.
- PB Import Paragraph: Adds Import Paragraphs and the "PB Import Para" content type. It needs PB Import and Paragraphs Bundles.
To import paragraphs, enable at least one of the Paragraphs Bundles modules paragraph_bundle_slideshow, paragraph_bundle_accordion or paragraph_bundle_tabs. The form shows a warning that lists the ones that are off.
Installation: get started in 3 steps
- Install the module with Composer:
composer require drupal/pb_import - Enable it on the Extend page, or with Drush:
drush en pb_import pb_import_node pb_import_para - Open "Register Uploaded Files" under Content → PB Import and register the folder that holds your images. Then open "Import Nodes" or "Import Paragraphs" in the same menu and upload your CSV file.
Requirements
- Drupal 11.3 or later, including 12. Drupal 10 sites use the 1.0.x branch.
- The PHP version your Drupal core requires
- Paragraphs
- Entity Reference Revisions
- Paragraphs Bundles 2.x
Composer installs these three projects with PB Import.
Support and maintenance
Questions, ideas, and bug reports are welcome. Please use this project’s issue queue so discussions and solutions remain available to the Drupal community.
Maintainers monitor issues, but response times depend on availability.
Developed and maintained by Alaa Haddad of Flash Web Center, LLC.
AI disclosure: AI tools assisted with drafting and reviewing this project description. The maintainer verified the final content against the project source.
Ask your assistant about Paragraphs Bundles Import
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
- Entity Reference Revisions
- Paragraphs
- Paragraphs Bundles
- block Drupal core
- field Drupal core
- file Drupal core
- filter Drupal core
- image Drupal core
- link Drupal core
- node Drupal core
- options Drupal core
- system Drupal core
- taxonomy Drupal core
- text Drupal core
- user Drupal core
- views Drupal core
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.