Apex trigger will not be invoked as a result of initiating or completing an approval process.
Help Article:
https://help.salesforce.com/s/articleView?id=000383878&type=1
Similarly, it is not supported for record-triggered Salesforce Flows.
Idea for this feature:
https://ideas.salesforce.com/s/idea/a0B8W00000GdeyQUAR/allow-an-approval-process-to-trigger-a-flow
Please vote for the above idea to avoid customization.
Workaround:
- Create a checkbox field in the object where Approval Process is developed.
- Use a Field Update to set the checkbox to true when the record is submitted for approval, approved, rejected or recalled. This will field update will trigger the Salesforce record-triggered flow.
- In the record-triggered flow, set the checkbox field to false.
In this video, I have used Process Instance and Approval Request objects to get the awaiting approver details to update the record which was submitted for Approval.