Process mining plays a significant role in Robotic Process Automation (RPA) as it helps in identifying the best processes to automate, thereby optimizing the RPA initiatives. Here are some ways through which process mining enhances RPA projects:

1. Uncovering Inefficiencies: Process mining allows companies to uncover inefficiencies in their workflows by identifying bottlenecks, variations, and reworking in real-time, providing greater transparency into how processes actually operate as opposed to how they're presumed to work. 

2. Choosing Suitable Processes for Automation: Because it reveals process inefficiencies, process mining helps in choosing the right and best processes for automation. This not only improves the return on investment (ROI) but also ensures that resources are not wasted on automating unsuitable processes.

3. Performance Measurement: Process mining also facilitates performance measurement. By monitoring and analysing the before-and-after of process automation, it helps in quantifying the impact of the RPA initiatives. 

4. Continuous Monitoring and Improvement: Through process mining, RPA can be continually improved as it provides insights into whether the software robots are performing as expected and identifies opportunities for further process optimization.

5. Compliance: Process mining can highlight non-compliant steps within processes, which can then be corrected by RPA. This ensures that processes are compliant with external regulations and internal policies.

In conclusion, integrating process mining before deploying RPA improves efficiency, ensures compliance, and offers valuable insights for improvement, making it an indispensable tool in successful RPA implementation.