This topic was automatically generated from Slack. You can find the original thread here.
Just wondering if there was any functionality in Pipedream which can monitor workflows and alert with a Slack message if there haven’t been any invocations within a set period of time? E.g. If we have a workflow that should be expected to be running multiple times a day, it would be good to get a warning if for some reason it hasn’t been invoked for 24 hrs, as that might indicate a problem (e.g. with a source or something else).
Hi , So far, there’s no built-in functionality as you described. However, you can build a custom workflow to achieve that.
Assuming you have workflow A that needs monitoring:
Add the final step of your workflow to add workflow execution status to a Datastore. So that whenever it is executed successfully, there’ll be a new record with the execution time added to the Datastore
Then create a new workflow B:
a. Add a step to get the latest records from the data store.
b. Add the Filter step to continue the workflow when the execution time in that record is 1 day ago (meaning that the workflow hasn’t been executed successfully for 1 day)
c. Add the step to send a message to Slack, email and such
I think this needs sufficient coding knowledge to implement. If you’re unsure that you can implement your use case, you can:
Hi you can build your own workflow to montior another using the REST API.
You can emit an event from your workflow at the very end in a Node.js code step, then using this secondary monitoring workflow you can poll the Pipedream REST API and make sure emits have been received in the reasonable time period:
Btw this is definitely something we’ve discussed internally and would definitely make a cool feature! We write a lot of these internal workflows, mainly to monitor other services, but same concept.