First decide whether this needs a vet
Contact your vet promptly if diarrhoea is severe, persistent, contains blood, comes with repeated vomiting, marked lethargy, pain, dehydration concerns or anything else that makes you worried. Puppies, older dogs and dogs with other health problems may need help sooner.
This page is about feeding routine, not diagnosing the cause of diarrhoea.