Autotask always return events is not iterable when connect with Sentinel

:computer: Environment

I'm using openzeppelin defender template


I create an autotaks that connect with sentinel by the following code:

exports.handler = async function(payload) {
  const conditionRequest = payload.request.body;
  const matches = [];
  const events =;
  for(const evt of events) {

    // add custom logic for matching here

    // metadata can be any JSON-marshalable object (or undefined)
       hash: evt.hash,
       metadata: {
        "id": "customId",
        "timestamp": new Date().getTime(),
        "numberVal": 5,
        "nested": { "example": { "here": true } }
  return { matches }

i copy these codes from
But when sentinel trigger the autotask always throw error that events can not be loop
but i try with sentinel webhook, it works
:1234: Code to reproduce