The Push to Rock RMS > Launch Workflow step in Clearstream is helpful, but has one limitation. It depends on the Rock Process Workflows job. That results in workflows not being launched instantly when at times that is needed. 

Here's an alternative way to do that. 

Workflow Type Setup

    Screenshot_2024-08-07_at_4.10.47 PM.png

    • Under the default Start activity, add a new action (Attribute Set Value) named Set Workflow Response
      • We need to set the value of the WebhookResponse attribute to the attribute value of RawBody. 

    Screenshot_2024-08-07_at_4.12.17 PM.png

    • Save the Workflow Type


    Webhook to Workflow Setup

    A starting point to look over first is here: https://community.rockrms.com/documentation/bookcontent/12/304#configuringawebhooktoaworkflow

    • Under the Defined Types, open the Workflow Webhook type.
    • Add a new defined value and name it Clearstream Keyword 
    • In the process request field, you can add some lava to filter requests. For example, the lava {% assign rawBody = RawBody | FromJSON %}{% assign keyword = rawBody.data.keyword.name %}{% if keyword == 'devotional' %}True{% else %}False{% endif %} would filter in our case to Clearstream triggers with that keyword. 
    • Under Workflow Type, select the workflow type created in the previous step. 
    • Under Workflow Attributes, set RawBody to {{ RawBody }}, which will pass the body of the request into our workflow. There are other variables you can use in your workflow as well, which are documented in the Defined Type help text.
    • Save the value. 


    Clearstream Setup

    • While logged in as an admin on Clearstream, visit https://app.clearstream.io/settings/api 
    • Click on Create Webhook 
    • Set the action to keyword.used 
    • Create the webhook with the URL in this format, replacing your domain and workflowtypeid from the created workflow: https://rocksolidchurch.com/Webhooks/LaunchWorkflow.ashx?WorkflowTypeId=1172&
    • Click Create Webhook and you'll be taken to the manage webhook page. 
    • Text your keyword and you should see Clearstream pick it up as SUCCEEDED. 
    • If the previous test was successful, you will also see a workflow run in Rock.