You can use the Workflow API to work with payloads via a custom workflow step. You can get information such as the JCR path of the payload, etc. Furthermore - you can use other AEM APIs - like AssetManager API - to work with a given payload at the API level. To see a good example - see this - where ...