APM requires the APM categories to be created in the GN4 database. APM uses the APM categories to know which page is to be processed next, in case that you process all the pages of the given category. Moreover, APM uses the APM categories to know which object libraries are to be used on pages of the given category.
You need to prepare the APM categories before hand.