You must ensure that the user id used for automation (or a group it belongs to) has access to all the spaces and page that need to be reported or acted on. Normally, the automation user id should have System Administrator global permission so it has full access to all spaces and pages. If this is not possible (for instance, when using Cloud), then make sure the default space permissions allow full access. Space administrators should be instructed to not remove this permission. Unfortunately, without System Administrator permission, it is possible for page level view restrictions to prevent access by automation and these pages will not be available to report on.