Tray Platform / Accounts / Tasks and analytics
Tasks and analytics
Tray.io Analytics allows you to explore and visualize the tasks used by you and your team.
You can find the analytics page by either going to the analytics URL: https://app.tray.io/analytics, or by selecting analytics from the main menu in the dashboard of the organization workspace:
What is a task?
Tray.io Analytics is all about exploring how your workflows are executing tasks.
The simplest way to think of a task, is to imagine it as equivalent to a step in a workflow.
When a workflow runs it executes each of its steps and each one becomes a task. A task does not necessarily correspond directly to the number of calls to a service that are made. For example, a Tray.io connector may make several calls to an API when it executes but this only counts as a single task.
The processing that occurs within these connectors is therefore referred to as a 'Task'.
Tasks are therefore the core metrics used when determining the local data throughput necessary in order to perform Tray.io's logical operations.
Tasks also are the highest consumer of all relevant metrics on our servers (internal calls, memory allocation, processing power, etc.)
We have broken down the step by step process of all the Tasks executed in the example workflow below for further clarity:
A trigger was fired which brought back a list of 2 data elements.
A call to Clearbit was made.
The first list element was passed to the loop.
The first list element was evaluated in a boolean.
The first list element was sent to Slack in the form of a notification.
The second list element was passed to the loop.
The second list element was evaluated in a boolean.
The second list element was sent to Slack in the form of a notification.
The loop connector checked to ensure the last piece of data was processed. The check was TRUE, and the process exited.
Using Tray.io Analytics
The default view in Tray.io Analytics displays tasks over the past 7 days. This is up and including the last complete day so you won't see partial data for today's date. The bar at the top provides a description of the graph.
The tables below the graph show the workflows and connectors with the most tasks. Note that a 'User table' is also available to the team owner.
You can click on the items within these tables to see even more details.
For example, if we select a connector from the Connector table we can see the volume of tasks completed by said connector over the last 7-30 days:
If we select 'Show tasks by workflow' we will see which workflows are using the selected connector.
Clicking on either a colour in the graph or a row in the table, will then filter by the selected workflow.
Estimating your message count
The initial contributor to the total message count is the trigger.
A single HTTP call or receipt of a WebHook counts as a single task. Tray.io must communicate with your service of choice in order to establish a secure connection, which makes this one of our more complex tasks.
However a single call is still treated as a single task.
In workflow diagrammed below, this step labeled as:
Connectors and Looping
Each logical operation Tray.io performs to each piece of your data requires a task to be run.
These connectors can be found under our 'Core' and 'Helpers' sections in the left-hand panel of our connectors platform.
Depending on how you configure your logic, Tasks may run multiple times in a single instance of a workflow. In the workflow diagrammed below, these steps labeled as:
<loop 2 times> and
Tray.io allows you to pass your newly formatted and logically grouped data to the service of your choice.
Each connection requires a task to run in order to establish a secure connection and pass the appropriate data through.
In the workflow diagrammed below, these steps labeled as:
<Clearbit query> and
The above query has 5 connectors included. This makes for a minimum of 5 tasks required to run a single instance of the flow.
In our example, we have a loop. Two data elements have come in from our trigger, which requires our loop to apply the entire logical set contained within the loop to each element. Therefore, this instance of the flow consists of 9 tasks.
Another way to see how many tasks were required for a single execution of your flow is by going to the debugger.
At the top of the workflow builder, click the Debug tab.
In the Workflow Logs, you will see each instance of your workflow that has been executed. Click on the instance to see the entire list of tasks required.
In the 'Run logs', you will see each Task executed for a single instance of a workflow. Click on the Task to see the data that was processed.