Store it in unfeaturized slots. Unfeaturized slots don’t interfere with prediction.
Say you want to store it in an unfeaturized slot called metadata, you can set the slot via calls to the tracker API, or sending a message like this to the Rasa API: /greeting{"metadata":"save the data you need later here"} (Where greeting is an intent)
To retrieve the data in your custom action, use tracker.getslot('metadata')