I want to successfully import Category of collection type "Relation" from CSV



System Information
  • Strapi Version: 3.6.8
  • Operating System: mac monterey 12.1
  • Database: postgreSQL
  • Node Version: 14.18.1
  • NPM Version: 6.14.15
  • Yarn Version: 1.22.17

I am using “strapi-plugin-import-export-content”.

I want to set the category set in the collection type Relation to the category of the post collection.

I have succeeded in importing the values set for Post in CSV.

title,slug,description,thumbnail However, the import of category does not work.

On my screen, the first category name I set is set by itself.

The first image is the CSV information that I plan to import. The second image shows the information actually imported into Strapi.

Category is different.


Hi there!

What does your Category column look like in your csv? I believe the values in this column should be an integer mapping to the category id.

1 Like

thanks!

I put the name of the category in the CSV that I import.

I think it should be the id of the category instead of the category name

1 Like

Thanks!I have successfully set it up by entering my ID.
It would be useful to be able to set it up with a categoty name, is there a better way?

No worries!
Yes that would be useful! None out-of-the-box that I know of.

I am using a plugin called IMPORT / EXPORT CONTENT to import.

I put an ID item in the CSV.
I put the values from 0 to 48 in the header called “id”.
However, I could not import it.

Is it possible to set the ID by myself?

No, I don’t think so, as the id is auto-generated by the database / strapi database provider