How to extract a node's type?

Hi team,
is there a way with a code node using javascript to extract a node’s type, I want to create a node that will enrich the data with a value based on if the trigger was a webhook, manual, etc.
Cheers

You can set a common variable based on workflow trigger, something like

Thanks, that is what I have done at the moment I’m just hoping to simplify the workflow that caters for 4 triggers.

You can try this

Let me ask what is the use case for having so many different triggers? You could just simplify this all. For example, if you have a webhook node and a manual node for testing, then you can get rid of the manual node and pin some test data to the webhook, and then debug from there using the play button when you hover over the webhook.

If for example you have many webhooks for the same resource IE, POST, GET, PUT, you can also simply use a single webhook with the setting set like below for using Multiple methods

Ideally you should keep your workflows simple and stick to a single functionality.