Happy Friday! When you are trying to track ROI, you need data. One easy way to start gathering usage and ROI data is to set up a webhook with an application like Slack. The process is very similar to how we integrated a webhook in our plug-ins. If you haven’t used webhooks with Slack, check out their documentation.
We will have four inputs to the node: the name of the script, the telemetry URL, ROI information (in minutes), and an additional message. The telemetry URL will come from your Slack application and can be copied and pasted into a string node in Dynamo. When the script is run, we send a number of messages to Slack via the webhook. First we send the message that we started, then we take care of some formatting.
We reformat the ROI input from minutes to hours so we can compile it into one concise statement. Then we can concatenate the string to add the text entered in the message input.
There are a few pieces of additional information we want to collect: the username of the person running the script and the current date and time. We also declare our variable for the formatted message so we can combine all this information. Our formattedMessage will start by listing the name of the script (from the node input) and then the username and current date and time we just collected. We can then add our ROI message after. If there is other data you want to collect, you can customize the inputs and information to send additional data.
Now that we have our message with all the information we want to collect, we can create a StringContent object so that the library can correctly send our message. We pass through the message string, our string encoding (UTF8), and the data format (application/json). Then we can send it to our webhook URL. It will then post to the Slack channel that we have set up with our application. For our node, we want to return the message as a string so we know it ran successfully.
When you need to collect some basic information on Dynamo script usage, you can use a node that sends data via webhook to an application like Slack. It is a fast and easy way to start tracking script usage and to collect ROI information.
Disclaimer: This post is intended to explain how to collect data relevant to tracking and understanding ROI. Please review any relevant privacy and protection policies before collecting data.