Memories must be defined to be used in workflows. This is a useful requirement to prevent this very common type of error from being published in a live flow.
Perform Action steps may have memories defined outside of the workflow, since a single action may be called from many different actions.
External Memories is a step designed to be used in sub-actions. This step should go at the top of the sub-action to define which memories are available in that flow passed in externally from the parent.