Hi,
I am trying to create a flow for automatic notification about some activities on files in specific state in workflow. The only thing I miss to complete this flow is to add comment from file to my email. Is there any option to extract the comment added during document state change and put it into newly created email?
Thanks,
Kamil
Hello,
it is possible with the "Execute WSG request", you can build a custom GET request to fetch audit trail records.
The request should be something like that :
https://<HOST>/ws/v2.8/Repositories/<<REPOSITORY>>/PW_WSG/Document/<<Document GUID>>?$select=DocumentAuditTrail-forward-AuditTrail!poly.*,*
Thanks Benjamin.
DocumentAuditTrail-forward-AuditTrail!poly.*,* doesn't work for me. The flow failed.
I used DocumentAuditTrail-forward-AuditTrail.* as in the post https://communities.bentley.com/products/betas/projectwise-design-integration-connector-for-microsoft-flow-early-access/w/pw-integration-connector-wiki/43464/2-3-executing-wsg-requests but this extract me full output so whole json file.
I am stuck now because what I need is just "comment" from this json.
Yes, you need to filter it.
Not sure about a possibility to do that in the request (I didn't succeed).
In any case you can take the json output and try to parse it with some flow action to extract what you need.
Yes it works. I did parse json and filter with Apply to each the "comment" parameter and then compose imput and append to string variable :) thanks for help. First of your answers was really helpful