I recently created some Automator based Services using python instead of the default shell scriptimg languages.
It is not obvious, but you can use Python3 string manipulation and regex very easily with Automator.
I published some Python code used inside the Automator Shell Script module on github as public gists.
Not all contain a full installation guide in the comments, feel free to browse through the content.
You find the Installation guide in e.g. Logseq_tags_to_Zotero.workflow.py
There are also some Python Snippets for the Pythonista Keyboard a custom keyboard for iOS using Python based snippets of code to work with selected text or create insertions
Sorry for the lousy docs here, but my guts said: share it, I found so much here…