- Configure workflow transition to have a post function, that generates an event.
- Plugin listens to said event. https://developer.atlassian.com/server/jira/platform/writing-jira-event-listeners-with-the-atlassian-event-library/
- Plugin uses Confluence Server REST API to get the content required.
- Plugin saves the data, with https://developer.atlassian.com/server/framework/atlassian-sdk/store-and-retrieve-plugin-data/ or What is the best way to store data in a Jira Plugin? - #3 by t.neychev