How to send a message directly to a node in the flow

Octoblu will look for a specific key in your message in order to send a message directly to a flow.

Send Message

metadata.to must contain flowId and nodeId in order to directly message a node in the flow.

{
  "metadata": {
    "to": {
      "flowId": "the-flow-id",
      "nodeId": "the-node-id"
    }
  }
}

Replying Directly to a Node

Your device can reply directly to a particular node in the designer. If your device has a schema that supports metadata.respondTo, Octoblu will automatically populate it with the information needed to directly reply to the node. Take all the properties listed in metadata.respondTo and place it in the metadata.to of your response message.

{
  "schemas": {
    "version": "2.0.0",
    "message": {
      "SomeAction": {
        "title": "Some Action",
        "type": "object",
        "properties": {
          "metadata": {
            "type": "object",
            "properties": {
              "respondTo": {
              }
            }
          }
        },
        "required": [
          "metadata"
        ]
      }
    }
  }
}