Expand my Community achievements bar.

SOLVED

Bulk tags creation in aem from json

Avatar

Level 4

Hello,

 

I have this service creation requirement of tags creation.

i am using aem 6.5 version.

we have data in nested json format for creating tags.

eg: 

{

     "abc":{

           "jcr:title":"Abc",

           "pqr":{

                   "jcr:title":"PQR"

           },

           "xyz":{

                   "jcr:title":"XYZ"

           }

     }

}

from this json, my requirement is to create abc as parent tag then its title property. Child element of abc as pqr and xyz and in some scenarios we might have child elements of abc node as well

 

is it possible to create such tags hierarchy in aem under /content/cq:tags

please help.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

If you are doing this manually

you can convert json to excel : https://json-csv.com/

and use ACS Commons Tag Creator Feature

In your AEM

Go to Tools --> ACS AEM Commons --> Manage Controlled Processes --> Start Process --> Tag Creator

http://localhost:4502/apps/acs-commons/content/manage-controlled-processes.html

 

you can upload the excel file and Start will generate / create Tags as expected.

View solution in original post

4 Replies

Avatar

Correct answer by
Community Advisor

If you are doing this manually

you can convert json to excel : https://json-csv.com/

and use ACS Commons Tag Creator Feature

In your AEM

Go to Tools --> ACS AEM Commons --> Manage Controlled Processes --> Start Process --> Tag Creator

http://localhost:4502/apps/acs-commons/content/manage-controlled-processes.html

 

you can upload the excel file and Start will generate / create Tags as expected.

Avatar

Level 4

Yes this looks good but problem is along with tag title i have to add more  properties in specific tag like jcr:description or custom properties.

Kindly help with this as well.

Avatar

Level 2

gojo1_0-1671460129958.png

I tried doing with Tag creator, but its stuck in this loop. Didn't work at all. Any solution for this?

Avatar

Level 4
com.day.cq.tagging.TagManager.createTagByTitle(String namespace,String tagPath)

This method takes complete tag path and creates the complete hierarchy of tags.