{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","results":{"codes":[]},"settings":"","params":[]},"next":{"description":"","pages":[]},"title":"Direct Message a Node","type":"basic","slug":"direct-message-a-node","excerpt":"How to send a message directly to a node in the flow","body":"Octoblu will look for a specific key in your message in order to send a message directly to a flow.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Send Message\"\n}\n[/block]\n`metadata.to` must contain `flowId` and `nodeId` in order to directly message a node in the flow.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"metadata\\\": {\\n    \\\"to\\\": {\\n      \\\"flowId\\\": \\\"the-flow-id\\\",\\n      \\\"nodeId\\\": \\\"the-node-id\\\"\\n    }\\n  }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"meshblu message\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Replying Directly to a Node\"\n}\n[/block]\nYour 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.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"schemas\\\": {\\n    \\\"version\\\": \\\"2.0.0\\\",\\n    \\\"message\\\": {\\n      \\\"SomeAction\\\": {\\n        \\\"title\\\": \\\"Some Action\\\",\\n        \\\"type\\\": \\\"object\\\",\\n      \\t\\\"properties\\\": {\\n          \\\"metadata\\\": {\\n            \\\"type\\\": \\\"object\\\",\\n            \\\"properties\\\": {\\n              \\\"respondTo\\\": {\\n              }\\n            }\\n          }\\n        },\\n        \\\"required\\\": [\\n          \\\"metadata\\\"\\n        ]\\n      }\\n    }\\n  }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"schema example\"\n    }\n  ]\n}\n[/block]","updates":[],"order":999,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5792abdf366dd20e004736cc","user":"5564f227f0f70f0d00a9ab20","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Octoblu APIs","slug":"the-octoblu-platform","order":0,"from_sync":false,"reference":false,"_id":"573f3f6c87cbd20e00208e44","createdAt":"2016-05-19T16:56:14.991Z","project":"573f3f6c87cbd20e00208e41","version":"573f3f6c87cbd20e00208e42","__v":0},"version":{"version":"1.0","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["573f3f6c87cbd20e00208e44","573f3f6c87cbd20e00208e43","573f3f6c87cbd20e00208e45","573f3f6c87cbd20e00208e46","573f3f6c87cbd20e00208e47","573f3f6c87cbd20e00208e48","573f3f6c87cbd20e00208e49","573f3f6c87cbd20e00208e4a","573f3f6c87cbd20e00208e4b","579a382265f89a170099946f","57bce03036eff81700666963"],"_id":"573f3f6c87cbd20e00208e42","createdAt":"2016-05-18T20:59:16.635Z","releaseDate":"2016-05-18T20:59:16.635Z","__v":2,"project":"573f3f6c87cbd20e00208e41"},"__v":0,"githubsync":"","project":"573f3f6c87cbd20e00208e41","createdAt":"2016-07-22T23:27:27.396Z"}

Direct Message a Node

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. [block:api-header] { "type": "basic", "title": "Send Message" } [/block] `metadata.to` must contain `flowId` and `nodeId` in order to directly message a node in the flow. [block:code] { "codes": [ { "code": "{\n \"metadata\": {\n \"to\": {\n \"flowId\": \"the-flow-id\",\n \"nodeId\": \"the-node-id\"\n }\n }\n}", "language": "json", "name": "meshblu message" } ] } [/block] [block:api-header] { "type": "basic", "title": "Replying Directly to a Node" } [/block] 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. [block:code] { "codes": [ { "code": "{\n \"schemas\": {\n \"version\": \"2.0.0\",\n \"message\": {\n \"SomeAction\": {\n \"title\": \"Some Action\",\n \"type\": \"object\",\n \t\"properties\": {\n \"metadata\": {\n \"type\": \"object\",\n \"properties\": {\n \"respondTo\": {\n }\n }\n }\n },\n \"required\": [\n \"metadata\"\n ]\n }\n }\n }\n}", "language": "json", "name": "schema example" } ] } [/block]