Short answer: You can list labels in Gmail by hand from its own interface, but it won’t repeat itself. On TinyCommand, add the Gmail List Labels action to a workflow, map its 0 inputs from any upstream app, and it runs automatically every time the trigger fires. No code, and a free tier to start.
{}
{"labels": [{"id": "INBOX","name": "INBOX","type": "system"},{"id": "SENT","name": "SENT","type": "system"},{"id": "TRASH","name": "TRASH","type": "system"},{"id": "Label_42","name": "Projects/Active","type": "user","labelListVisibility": "labelShow","messageListVisibility": "show"}]}
Use these fields in downstream nodes for routing, logging, or error handling.
Any of these apps can fire this action as part of a workflow.