To link nodes or sub-graphs, click an output point of a node (sub-graph) and drag the line. Input points with corresponding sockets will highlight. Release the mouse button over the applicable input point of another node (sub-graph) you need.
If you hover the mouse cursor above an input/output point, a socket type will pop up. In this example, both output (1) sendMessage and input (2) incomingMessage have the same socket type: Communications.Message, aka Message type in Communications socket group. You may check this in node`s (sub-graph`s) IO settings.
You may arrange a connection line for a clearer view:
Click the line, and a yellow spot will appear. Drag this spot to change the line`s curve.
When creating a provisional node, you may not know what socket to use. Choose a Common socket with AnyData type.
If you deploy these changes by clicking RUN (or if you reload a browser tab), you will see AnyData changed to the type of the corresponding connection point.