Creation of Document Sets

Hi,

We are currently working on a system using PowerAutomate to pull together ProjectWise, P6 and Offline PM data to automate some of our delivery workflow.

Is there a way in the current PowerAutomate connectors to generate a Document Set rather than a Document? We've successfully managed to create a document in the environment via Automate, but cannot find a way to make a set instead.

Any help apprecitated.

Parents
  • Hi,

    Is there a variation of this which would allow for an update to an existing set, rather than creating a new one? 

    Thanks 

  • Hi,

    If you want to add or remove documents from a Flat Set this Execute WSG Action with these examples might help you:

    Example: POST {Datasource}/PW_WSG/FlatSet/{flatsetId}
    Add document to FlatSet:
    {
      "instance": {
          "instanceId": "{flatsetId}",
          "schemaName": "PW_WSG",
          "className": "FlatSet",
          "properties": {},
          "relationshipInstances": [
            {
              "instanceId": "",
              "schemaName": "PW_WSG",
              "className": "SetDocument",
              "direction": "forward",
              "properties": {},
              "relatedInstance": {
                "instanceId": {documentId},
                "schemaName": "PW_WSG",
                "className": "Document",
                "properties": {}
              }
            }
          ]
      }
    }
    Remove document from FlatSet:
    {
      "instance": {
          "instanceId": {flatsetId},
          "schemaName": "PW_WSG",
          "className": "FlatSet",
          "properties": {},
          "relationshipInstances": [
            {
              "instanceId": {setMemberId},
              "schemaName": "PW_WSG",
              "className": "SetDocument",
              "changeState": "Deleted",
              "direction": "forward",
              "properties": {},
              "relatedInstance": {
                "instanceId": {documentId},
                "schemaName": "PW_WSG",
                "className": "Document",
                "properties": {}
              }
            }
          ]
      }
    }
    - Delete FlatSet
    Example: DELETE {Datasource}/PW_WSG/FlatSet/{flatsetId}

  • Brilliant thank you! This worked for me to add to a Set:

Reply Children
No Data