Send overdue features to Slack

overdue features to Slack
Warning: Warning: sample URLs! Please make sure to replace

https://hooks.slack.com/services/xxxxx/yyyyyy/zzzzzzzzztGRAKwHLfm4kw

with your Slack Webhook URL and https://youraccount.tpondemand.com/ with your Targetprocess URL
[
  {
    "type": "source:schedule",
    "schedule": {
      "kind": "interval",
      "unit": "hour",
      "value": 24
    }
  },
  {
    "type": "action:JavaScript",
    "script": "const api = context.getService(\"targetprocess/api/v2\");\n\n//get the list of overdue features\nconst features = await api.queryAsync(\"Feature\", {\n  select: \"{id, name}\",\n  where: ___PROTECTED_4___\n});\n\n//IMPORTANT: Change the account name below\nconst featureLinks = features.map(feature => {\n  return ___PROTECTED_5___;\n});\n\n//IMPORTANT: Update Slack link below\nreturn {\n  command: \"SendHttpRequest\",\n  payload: {\n    url: \"https://hooks.slack.com/services/xxxxx/yyyyyy/zzzzzzzzztGRAKwHLfm4kw\",\n    body: {\n      text: ___PROTECTED_6___,\n      username: \"TP\"\n    }\n  }\n};"
  }
]