Lecture Notes: Power Automate Approvals with SharePoint
Introduction
- Power Automate is widely used for approvals, especially with SharePoint lists or libraries.
- Challenge: Users might edit or delete items under approval.
- Solution: Define item-level security for creators and approvers in approval workflows.
Setting Up the Approval Process
- Create a New List
- Use "Expense Tracker" list template.
- Add columns:
- Status (Choice): "New", "Approved", "Under Review", "Rejected" (default: New)
- Approval Info (multi-line text): Enable append changes, set enhanced rich text to "yes".
- Form Customization
- Remove "Status" from user-editable fields to restrict changes through the workflow only.
Building the Approval Workflow
- Automated Cloud Flow
- Trigger: When an item is created in SharePoint.
- Connect to SharePoint site, set list to "Expense Tracker".
- Initial Steps:
- Update item: Set status to "Under Review", log initiation details in "Approval Info".
- Approval Action
- Use "Start and wait for an approval" action.
- Approval Type: "Everyone must approve".
- Dynamic approvers using Azure AD group members.
- Handle email addresses using "Select" and "Join" operations.
- Condition check for approval results:
- If approved, update status to "Approved".
- If rejected, update status to "Rejected".
- Logging Approval Details
- Create HTML table from approval responses.
- Style and store in "Approval Info".
Security Considerations
- Stop Inheriting Permissions:
- Restrict members to "Contribute" access, not "Edit".
- Modify Flow for Security:
- Break item permissions upon creation.
- Grant specific users (creator and approvers) view permissions.
Handling Rejected Items
- Modify the flow to trigger on item creation or modification.
- Use trigger conditions to prevent loops:
- Check if status is "New" or "Rejected".
- Ensure creator is the modifier.
- Post-rejection, grant edit permissions to the creator for resubmission.
Process Flow
- Upon item creation:
- Status is "New".
- Changes to "Under Review" on approval start.
- Approvers act:
- Decision changes status to "Approved" or "Rejected".
- If "Rejected":
- Creator can modify and resubmit.
Conclusion
- Once approved, items are locked; approval details are logged.
- Allows dynamic and secure approval processes centered on SharePoint and Power Automate.
Call to Action
- Encouragement to like, comment, and subscribe for more content.
These notes encapsulate the workflow creation, security configurations, and handling of approval statuses using Power Automate with SharePoint lists.