Get metadata returned from my Autotask in custom notification settings

I am running some code with my autotask, triggered by a function call from my sentinel, i am passing some extra data in the metadata from my autotask function. and would like to display them in my notification.
:computer: Environment

Using Autotask to run a simple code that is triggered by sentinnel.
:memo:Details

After returning the metadata from my autotask, i am unable to access it with matchReasons.0.metadata, doing that results in [failed to resolve {{ matchReasons.0.metadata }}]

:1234: Code to reproduce

const { DefenderRelaySigner, DefenderRelayProvider } = require('defender-relay-client/lib/ethers');
const ethers = require('ethers');

exports.handler = async function(event) {
  const provider = new DefenderRelayProvider(event);
  const signer = new DefenderRelaySigner(event, provider, { speed: 'fast' });
  const matches = [];
  // Use provider and signer for querying or sending txs from ethers, for example...
  const ADDRESS = ""
  const ABI = [
    "function sayversion() pure external returns (string memory)",
    "function balanceOf(address account) external view returns (uint256)",
  ]
  const contract = new ethers.Contract(ADDRESS, ABI, signer);
  console.log(await contract.sayversion());
  const requestEvents = event.request.body
  const events = requestEvents.events;
  const balance = await contract.balanceOf(ADDRESS)
  for(const evt of events) {
    matches.push({
      hash: evt.hash,
      metadata: {
        "id": "1",
        "timestamp": new Date().getTime(),
        "contract Balance": balance,
        "nested": { "example": { "here": true } }
      }
    });
  }
 return { matches };
}

And in the custom notifications setting, doing something like this
{{ matchReasons.0.metadata }}
which results in
[failed to resolve {{ matchReasons.0.metadata }}]

Hi @Prometheo,

Sorry for the late response. I believe the syntax you are looking for is {{ metadata.id }}. Its not possible to log out an object like {{ metadata }}, you must reference each property individually.

Also there is a bug in UI which will show [failed to resolve {{ metadata.id }}], but the message should arrive to your notification platform with the correct format. We have a fix already in the works for the UI issue.