The clear gel like substance is mucous and normally helps lubricate the intestines. It indicates inflammation in the intestines which can occur for many reasons including parasites like worms or protozoan infections such as coccidia or giardia or even something he ate that disagreed with him or any number of different toxic substances and even organ failure.
If he is eating and drinking normally and not vomiting, then I would try adding some canned pumpkin (not pie filling) to his food to try and firm up the stool. You just need a spoon full. This should absorb excess fluid in the bowels and slow the movement of fecal matter and firm it up.
Dogs also have anal glands that can start leaking from the rectal area which can also be a clear liquid and smells horrible. If the glands are overfull, they will sometimes leak. Read about these here:
If he hasn't been dewormed for some time, you might go ahead and take a stool sample into you vet so it can be checked for worms and protozoan infections if this continues. For additional information about worms, see this site
I also want to give you information on coccidia and giardia as well. Coccidia manifests as mild or severe diarrhea depending on how infected they are. If it is severe, there may be blood and mucous in the stool along with vomitng and loss of appetite leading to dehydration You can read about it here:
Information on giardia can be found here:
Symptoms of giardia are diarrhea with possible terrible smell, mucousy stool and sometimes bouts of vomiting.
Given he is diabetic and an older dog, you might just have a senior check up done but it doesn't sound like an emergency if he is eating and drinking.
I hope this information is helpful to you. If you would like any additional information or have more questions please don’t hesitate to press the reply to expert or continue conversation button so I can address any issues you still have . If you do find this helpful, please take this opportunity to rate my answer positively so I am compensated for my time.