This is a confluence trigger to do automation task on TSD pages.
Tasks:
- Extract the "AccountID" and "OpportunityID" from links and insert them back to the table
- Update labels according to properties of "Solution Type", "Industry", Horizontal", "Cloud Platform" and "Status"
- Export and upload the pdf file to TSDs folder
Here are some of my finding:
- Confluence Cloud does not offer an API for exporting PDFs.
- Therefore, we need to simulate a multi-step browser behavior to export and download the PDF file.
- Atlassian's serverless app development platform, Forge, currently only supports Node.js.
- Forge's requestConfluence() method is based on "node-fetch," which does not support HTTP sessions.
- I attempted to add HTTP session support to the requestConfluence() method for the PDF exporting process, but it did not work.
- There is an open-source project called atlassian-python-api that offers PDF export features in Python.
Based on above finding, I chose to use an AWS Lambda application for handling the exporting and uploading, so this trigger just needs to send the pageId to the Lambda app.
Please check se-oppts-automation-pdf for more detail about the AWS Lambda app.