Flow Logging
Flows can be powerful and make your users more productive, but with great power... you know the rest. Sometimes we need to know who is running the flows we build, how often the flows are being run, which options/paths are selected, and what the data looks like while the flow is running for audit or debug purposes. Tracking these things can be simple by setting up a Flow Log object and utilizing a reusable sub-flow within your flows as a logging step. Together the Flow Log object and the sub-flow enable Debugging, Auditing, and Usage Statistics.
Setup
Setup is super simple to enable this functionality. Just create a new object named Flow Log(s) and add as many custom fields as needed. I recommend auto-number for the Name field. In this example I created fields for the Flow Name, Flow Step, and Debug Message. I can capture user information just by utilizing the Created By field. Created Date gives me a time stamp also.
I prefer utilizing a sub-flow for logging because it feels like a built in tool in the palette.
Usage Statistics
Adding a logging step to each of flows can allow you to determine which flows are being used the most/least. Knowing which flows are used the most/least can be very helpful in determining the impact of a change. Usage stats can also be helpful in determining adoption. Is everyone aware of that awesome new flow you built? Are they using it? With usage stats you can answer those questions and determine if additional training/promotion is necessary.
Here is an example of a flow that has each path logged so I can determine how many times the flow has been run and which paths were taken:
Debugging
If a flow fails, admins receive a very detailed email explaining every step of the flow. But, if you are trying to diagnose the behavior of a flow that is not failing it can very hard to peek inside. By adding logging checkpoints within your flow you can inspect variable values or options that were selected.
Audit
Similar to debug logs, adding an auditing step to a flow can make it simple to answer questions about who executed certain tasks. Some of the tasks that a flow performs could be sensitive or restricted in some way. By adding an auditing step you add the ability to report on user behavior.