The "Find Channels" activity enables you to locate channels based on specific criteria or explicitly defined channel names.
Finding channels using expressions
When searching for channels using expressions, you need to construct query conditions. For detailed information on creating search conditions, please refer to the "Condition Searching in Workflow Activities" guide.
When conducting a channel search, you have access to the following field:
- display_name: The name of the channel.
Example
Here's an example of searching for two channels named "Networks" and "Customers." It's important to note that neither of these channels needs to exist for this method to work. If neither channel is found, no results will be returned. This approach proves useful when you don't know the specific channels to which you will send Heed messages while creating the workflow, and you need to determine them at runtime.
To implement this method:
- Add a new Find Channels activity to your workflow.
- In this example, we are searching for channels with the names "Networks" or "Customers," so we will need to select the Or composition mode.
- Click Add Conditions to add the first condition.
- Enter the first "equals" condition for "Networks."
- Click Add Condition and repeat the same process for "Customers."
- Once both conditions are added, click Save.
Results
This search method will yield the following output:
- channels: An array of channels, each with properties including "display_name," an array of tags, and an object or array of custom attributes.
- count: The number of channels found.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article