How to build an approval assistant with Power Apps / Power Platform
This tutorial shows how to build an approval assistant in Power Apps / Power Platform: an application to initiate requests, send approval notifications and record decisions. It is useful to digitize simple approval flows without writing complex code.
Prerequisites
- Account with Power Apps and Power Automate active.
- SharePoint Online (list) or Dataverse available to store records.
- Basic knowledge of Canvas Apps and creating a flow in Power Automate.
Step 1: Create the SharePoint list for records
Create a SharePoint list named "Aprovações" with essential columns to store the request and its status. This allows persisting who requested it, the status and approver comments.
Lista: Aprovações
Colunas:
- Title (Único) — Texto (ex.: Número do pedido)
- Solicitante — Pessoa
- Descrição — Múltiplas linhas de texto
- Estado — Escolha (Pendente, Aprovado, Rejeitado)
- Aprovador — Pessoa
- ComentárioAprovador — Múltiplas linhas de texto
- DataResposta — Data e hora
Step 2: Create the Canvas App to initiate requests
In Power Apps create a Canvas app from blank (phone or tablet). Add a form to submit the request and a button that creates the item in the SharePoint list using SubmitForm or Patch.
// Exemplo com Patch no botão Submit:
Patch(Aprovações, Defaults(Aprovações), {
Title: "REQ-" & Text(Now(), "yyyymmddhhmmss"),
Solicitante: { 'Claims': User().Email },
Descrição: txtDescricao.Text,
Estado: "Pendente",
Aprovador: cmbAprovador.Selected, // combo com pessoas
DataResposta: Blank()
});
Notify("Pedido criado", NotificationType.Success);
ResetForm(frmPedido);
Step 3: Create a Power Automate to notify the approver
Create a flow of the type "When an item is created" (SharePoint connector). Add an action to send an email or an Adaptive Card via Microsoft Teams with Approve/Reject buttons. Configure the response to update the list when the approver replies.
Trigger: When an item is created (SharePoint)
Action: Send an Adaptive Card to user (Teams) or Send email with actionable message
Action (On response): Update item (SharePoint) -> Estado = Aprovado/Rejeitado, ComentárioAprovador = resposta, DataResposta = utcNow()
Step 4: Handle the response and update the app
In Power Automate, after receiving the approver's choice, update the item in the list. The Canvas App can use Refresh(Aprovações) and filter by Solicitante to show the updated status in a gallery.
// Exemplo de actualizar o estado no flow:
Update item (SiteAddress, ListName, Id: @{triggerOutputs()?['body/ID']}, Estado: 'Aprovado')
// Na App, botão para refrescar:
OnSelect: Refresh(Aprovações)
// Galeria Items:
Filter(Aprovações, Solicitante.Email = User().Email)
Step 5: Record history and handle common errors
Add a history list or table if you need multiple approval rounds. Handle common errors: permissions in SharePoint (read/write), Teams connector without permissions, and timeouts in Power Automate when using Adaptive Cards.
// Exemplo simples de histórico como comentário concatenado
Patch(Aprovações, LookUp(Aprovações, ID = varItemID), {
ComentárioAprovador: Concat(ComentárioAprovador, "\n[", User().FullName, "] ", txtResposta.Text)
});
Verify the result
Create a request in the app and confirm that: 1) an item is created in the SharePoint list with Estado = Pendente; 2) the approver receives the notification (Teams or email); 3) when the approver chooses Aprovado/Rejeitado, the item in the list is updated and the Canvas App shows the new status after Refresh. Also check the Power Automate run history for failures.
Conclusion
You now have a basic approval assistant using Power Apps, SharePoint and Power Automate to notify approvers and record decisions. Next steps: add approval levels, integrate with Dataverse for more complex rules, or use dynamic Adaptive Cards. Tip: testing with different users and permissions prevents surprises in production.