How-To Guides
Flows Guides
Subscribe to Topics with Flows
4min
you have the following options for subscribing to topics in flows subscribe to a single topic the following steps describe how to subscribe to a single topic from a connected devicehub device see the following to learn more connect a device docid\ ish7bqhzxswtdx8vbnszb add tags docid\ xgwokqbtpevii7or82ll0 to subscribe to a single topic get the topic name to configure the datahub subscribe node in flows go to devicehub and select the tags pane from the navigation menu click the copy icon next to the raw topic from which you wish to receive data in the navigation menu, click flows manager to access an existing flow canvas, click the go to flow definition icon next to the flow status for creating a new flow, refer to step 2 create individual flow in create a flow docid\ veyyte7xdcangglzbqya0 to learn more the flow canvas opens in a new browser tab drag the datahub subscribe node and debug node on the canvas and connect them double click the datahub subscribe node to open the edit datahub subscribe node dialog box configure the node by following these steps paste the topic name previously copied into the topic field if needed, configure the datahub subscribe connection see the step 3 configure connector nodes section in create a flow docid\ veyyte7xdcangglzbqya0 to learn more enter a name in the name field and click done to save the flow, click deploy expand the message window beneath the flow click the debug icon to view the data output review the data payload in the message window subscribe to multiple topics using wildcards use wildcards to subscribe to multiple topics at once wildcard usage \> wildcard character use the > wildcard character to subscribe to messages from multiple tags example devicehub alias > will subscribe to every topic in the devicehub wildcard character use the wildcard character to match a single topic between characters in tags example devicehub alias matches topics with two character sequences after each of the two characters note using just the > wildcard character subscribes to all topics, which can cause slowdowns when sending data to databases or clouds consider using function nodes docid\ yhe2mmgd35ayhkvwodyh8 to trim data or file nodes for efficiency use wildcards to subscribe to multiple topics to subscribe to multiple topics in flows, replace the topic name in step five of "subscribe to a single topic" with the information about topic wildcards as below to use wildcards to subscribe to multiple topics complete steps 1 5 from "subscribe to a single topic" above replace the topic name with the desired wildcard based topic syntax examples devicehub alias > (subscribe to all topics in devicehub) devicehub alias {device id} > (subscribe to all tags from a specific devicehub device) devicehub alias test tag (subscribe to all tags named test tag from every deivcehub device) click done and save the flow by clicking the deploy button at the top right corner of the screen expand the message window beneath the flow click the debug icon to view the data output review the data payload in the message window