Gelato Network
Search
K

Monitoring Automate Tasks

Learn how to monitor your Web3 Function Task
Deprecation Notice: Gelato Functions is set to replace Automate, providing enhanced automation capabilities, access to off-chain data, unified payments across networks, and a performance boost. Migrate your tasks to Gelato Functions before Legacy Automate's end of life on June 30th, 2024 for uninterrupted service.
Besides the task logs available in the UI, Gelato Web3 Functions offer a more detailed and granular monitoring system providing status and logs APIs.

Task Status URL

Provided the ChainId and taskId, this API will return the current Task status
https://api.gelato.digital/tasks/automate/networks/{chainId}/tasks/{taskId}/status
For example, if your chainId, taskId are:
chainId: 137
taskId: 0x1d029e6ac412e7b4544bb07a8f12ffc33c668d5ddfa3d479def13d548cd72c4b
Then the URL to go to is:
https://api.gelato.digital/tasks/automate/networks/137/tasks/0x1d029e6ac412e7b4544bb07a8f12ffc33c668d5ddfa3d479def13d548cd72c4b/status
For this taskId, here is the returned task information:
{
"task {
"chainId":137,
"taskId":
"0x1d029e6ac412e7b4544bb07a8f12ffc33c668d5ddfa3d479def13d548cd72c4b",
"taskState":"CheckPending",
"creationDate":"2022-10-27T09:22:01.434Z",
"lastCheckDate":"2023-06-15T06:03:05.501Z",
"lastCheckMessage":"!canExec"
}
}
The first thing to look at is the taskState key:

Task states:

For the taskState key, these are the possible values:
  • CheckPending: the task is pending simulation.
  • ExecPending: the task is executable and is awaiting inclusion into the blockchain.
  • WaitingForConfirmation: the task was included into the blockchain but is still awaiting the required amount of blocks confirmations.
  • ExecSuccess: the task has been successfully executed.
  • Cancelled: the task has been canceled by the owner
  • ExecReverted: the task transaction has been reverted.

Task Logs URL

Provided the ChainId and taskId, this API will return the logs in the last 24 hours, the query param limit is optional
https://api.gelato.digital/tasks/automate/networks/{chainId}/tasks/{taskId}/logs?limit=NrLogs
For example, if your chainId, taskId and NrLogs are:
chainId: 137
taskId: 0x1d029e6ac412e7b4544bb07a8f12ffc33c668d5ddfa3d479def13d548cd72c4b
NrLogs:2
Then the URL to go to is:
https://api.gelato.digital/tasks/automate/networks/137/tasks/0x1d029e6ac412e7b4544bb07a8f12ffc33c668d5ddfa3d479def13d548cd72c4b/logs?limit=2
For this taskId, here is the returned task information:
{
"logs":[
{
"date":"2023-06-15T06:05:38.975Z",
"state":"CheckPending",
"type":"ResolverCheck",
"message":"!canExec"
},
{
"date":"2023-06-15T06:05:24.349Z",
"state":"CheckPending",
"type":"ResolverCheck",
"message":"!canExec"
}
]
}