Is there a way to get the trigger that run the automation? We checked the payload and it contains fields like “recipeId” and “integrationId” which didn’t give any idea of the trigger.
I think using the “recipeId” we can get the custom recipe and get the trigger. But for the custom actions which can be added to any trigger, how to get the trigger in this case?
Any automation needs a trigger, either a standard built-in trigger or a custom one. Using a built-in trigger monday will post to your action endpoint. When using a custom trigger you need to have a subscribe and an unsubscribe endpoint. Those are called when the integration is added / deleted from a board.
In the subscribe endpoint you create a webhook that points to another endpoint from your app. When the trigger fires this endpoint will be called and you can post to the subscriptionURL (needs to be stored somewhere from your subscribe endpoint).
We are using built-in triggers with custom actions. In this scenario is there a way to get the trigger?
for eg. if the recipe is → When COLUMN changes, copy files from COLUMN1 to COLUMN2.
here → “When COLUMN changes” is a built-in trigger, and “copy files from COLUMN1 to COLUMN2” is a custom action.
So, when a user run this recipe, we want to get the trigger. Is this possible to get it?
Currently getting the below object in payload and there is no details of the trigger.
{
“payload”: {
“blockKind”: “action”,
“inboundFieldValues”: {
“shoes”: “shoe1”,
“listSocks”: "socks_2,
“login”: “abc1234”,
“boo”: true,
“myNumber”: 10
},
“inputFields”: {
“shoes”: “shoe1”,
“listSocks”: “socks_2”,
“login”: “abc1234”,
“boo”: true,
“myNumber”: 10
},
“recipeId”: 629280,
“integrationId”: 398528596
},
“runtimeMetadata”: {
“actionUuid”: “3b0a86dcb5a1d05e8aff1e4791cafde5”,
“triggerUuid”: “bd661564c1d1968d5e56c67051cf7511”
}
}
We have an app name Copy Files Pro live on monday marketplace. The app have recipes to copy and rename files which eliminates the effort of manual downloading and then copying or renaming file and then reupload.
We are thinking of storing data like, on which trigger the automation run, the file type, the monday.com account user who run the automation, etc, details. So in future, at the month end, we can give users a detailed report about which trigger they used most, the file type they mainly worked with, the number of files copied/renamed by different users, etc.
So, this is the idea behind getting the trigger. We found out how to get the other details(file type, user id, etc), only the “get the trigger” remains.
I don’t see how to achieve this. You have the recipeId but that can change if users delete / add the recipe to their board. I don’t see how to relate the trigger and the action in code.