# Receive message

**Receive message** layer template is designed to allow you to receive message from various receivers such as UDP, TCP or OSC and trigger different actions based on them.

## Variables

### Default

<div align="left"><figure><img src="/files/dr71EN7fTvN0uaSqL1Ln" alt=""><figcaption></figcaption></figure></div>

* **Device**: Select the device which you want to use as the receiver of the message.

## Setting up

### **1. Create the appropriate Device node**

<div align="left"><figure><img src="/files/Q94bq9AFIU9Xtxd5eMGv" alt=""><figcaption></figcaption></figure></div>

In the Devices window, create an appropriate *Receiver* device node. Set it up the way you want and check the **Receive** checkbox. For more information you might want to refer to the [Network page](/integrations/network.md).

### **2. Inserting the layer**

**Through the right click menu**

Right click in the *Timeline*, select *Control* category and choose **Receive message** layer.

### **3. Set up the layer**

Set up the variables of the layer and choose the device you created in step 1.

### **4. Open the Layout**

<div align="left"><figure><img src="/files/pqz3cuZK05v5JACjCXeU" alt=""><figcaption></figcaption></figure></div>

Open the Layout by double clicking on the layer. In the *Logic* group of nodes, you see a number of *Switch Case* nodes. They are designed to trigger a different Lifeline output pin depending on the input.

Connect the desired *Case* output of the selected *Switch Case* node with the desired action node, such as *Go to marker* or *Go to section* node.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lightact.com/layers-and-layouts/stock-layer-templates/control-layer-templates/receive-message.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
