Skip to content

Latest commit

 

History

History
121 lines (94 loc) · 4.21 KB

parttwo.md

File metadata and controls

121 lines (94 loc) · 4.21 KB

Sure! Let's break down the process into detailed steps for automating the creation of new matter sites and creating custom forms for document management in SharePoint using Power Apps and Power Automate.

1. Automated Matter Site Creation

Step 1: Create a Power App

  1. Open Power Apps:

    • Go to Power Apps and sign in with your Microsoft account.
  2. Create a New App:

    • Click on Create > Canvas app from blank.
    • Name your app (e.g., "Matter Site Creator") and choose the layout (Tablet or Phone).
  3. Design the App:

    • Add input fields for the necessary information (e.g., Client Name, Matter Type).
    • Add a button to trigger the site creation process.

Step 2: Build a Power Automate Flow

  1. Create a New Flow:

    • Go to Power Automate and sign in.
    • Click on Create > Automated flow.
  2. Set the Trigger:

    • Choose PowerApps as the trigger.
  3. Add Actions to Create the Site:

    • Add the Send an HTTP request to SharePoint action.
    • Configure the action to create a new site. Here’s an example of the JSON body:
{
  "request": {
    "Title": "@{triggerBody()?['ClientName']} - @{triggerBody()?['MatterType']}",
    "Url": "https://yourdomain.sharepoint.com/sites/@{triggerBody()?['ClientName']}-@{triggerBody()?['MatterType']}",
    "Lcid": 1033,
    "ShareByEmailEnabled": false,
    "Description": "Site for @{triggerBody()?['ClientName']} - @{triggerBody()?['MatterType']}",
    "WebTemplate": "STS#3",
    "Owner": "[email protected]"
  }
}
  1. Populate the Site:

    • Add actions to create document libraries, calendars, and tasks.
    • Use the Send an HTTP request to SharePoint action to set permissions.
  2. Apply a Site Template:

    • If you have a site design template, use the template ID in your flow to apply it to the new site.

Step 3: Connect Power App to Power Automate

  1. Add a Flow to the Button:
    • In Power Apps, select the button you added earlier.
    • Go to the Action tab and select Power Automate.
    • Choose the flow you created and configure it to pass the input fields (Client Name, Matter Type) to the flow.

2. Custom Forms for Document Management

Step 1: Design Custom Forms in Power Apps

  1. Create a New Form:

    • In Power Apps, create a new form with fields for metadata (e.g., Document Type, Client Name, Case Number).
  2. Add a Submit Button:

    • Add a button to submit the form and trigger a Power Automate flow.

Step 2: Build a Power Automate Flow for Document Submission

  1. Create a New Flow:

    • Go to Power Automate and create a new flow with PowerApps as the trigger.
  2. Add Actions to Upload the Document:

    • Use the Create file action to upload the document to the appropriate document library.
    • Use the Update file properties action to set metadata.
  3. Trigger Workflows:

    • Add actions to start specific workflows based on the document type or other criteria.

Example Power Automate Flow for Document Submission

{
  "trigger": {
    "type": "PowerApps"
  },
  "actions": [
    {
      "type": "CreateFile",
      "library": "Documents",
      "fileName": "@{triggerBody()?['FileName']}",
      "fileContent": "@{triggerBody()?['FileContent']}"
    },
    {
      "type": "UpdateFileProperties",
      "library": "Documents",
      "fileName": "@{triggerBody()?['FileName']}",
      "metadata": {
        "ClientName": "@{triggerBody()?['ClientName']}",
        "CaseNumber": "@{triggerBody()?['CaseNumber']}"
      }
    },
    {
      "type": "StartWorkflow",
      "workflowName": "DocumentApproval",
      "parameters": {
        "DocumentID": "@{triggerBody()?['DocumentID']}"
      }
    }
  ]
}

Benefits

  • Consistency: Ensures all matter sites and documents are created with a standardized structure.
  • Efficiency: Automates repetitive tasks, saving time and reducing errors.
  • Organization: Keeps all documents and sites well-organized and easily accessible.

By following these steps, you can automate the creation of new matter sites and streamline document management processes, ensuring consistency and reducing the chance of errors. If you need more detailed guidance or run into any issues, feel free to ask!