# Access Request Decision trigger

**URL:** <https://developer.sailpoint.com/discuss/t/access-request-decision-trigger/5834>\
**Category:** SHF Discussion and Questions\
**Tags:** workflows\
**Created:** [September 17, 2022, 4:57pm UTC](https://developer.sailpoint.com/discuss/t/access-request-decision-trigger/5834 "2022-09-17T16:57:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manju22](https://avatars.discourse-cdn.com/v4/letter/m/45deac/32.png) [@Manju22](https://developer.sailpoint.com/discuss/u/Manju22)\
**Post date:** [September 17, 2022, 4:57pm UTC](https://developer.sailpoint.com/discuss/t/access-request-decision-trigger/5834/1 "2022-09-17T16:57:48Z")

</div>

What could be the trigger for the “Access Request Decision” in the workflow?

I want to filter the access requests approved or denied only for the selected source. If the particular source-related access request is approved, I want to send a custom email.

 ![image](https://global.discourse-cdn.com/sailpoint/original/2X/6/606947750e7c59fa2a9f05f91116c474fa81d75c.png)

---

<div class="post-metadata">

**Author:** ![colin\_mckibben](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/colin_mckibben/32/37182_2.png) [@colin\_mckibben](https://developer.sailpoint.com/discuss/u/colin_mckibben)\
**Post date:** [September 19, 2022, 1:41pm UTC](https://developer.sailpoint.com/discuss/t/access-request-decision-trigger/5834/2 "2022-09-19T13:41:52Z")

</div>

The Access Request Decision trigger is documented [here](https://developer.sailpoint.com/idn/docs/event-triggers/triggers/access-request-postapproval). This trigger will send the following payload to the workflow:

```json
{
  "accessRequestId": "2c91808b6ef1d43e016efba0ce470904",
  "requestedFor": {
    "type": "IDENTITY",
    "id": "2c91808568c529c60168cca6f90c1313",
    "name": "William Wilson"
  },
  "requestedItemsStatus": [
    {
      "id": "2c91808b6ef1d43e016efba0ce470904",
      "name": "Engineering Access",
      "description": "Access to engineering database",
      "type": "ACCESS_PROFILE",
      "operation": "Add",
      "comment": "William needs this access to do his job.",
      "clientMetadata": {
        "applicationName": "My application"
      },
      "approvalInfo": [
        {
          "approvalComment": "This access looks good. Approved.",
          "approvalDecision": "APPROVED",
          "approverName": "Stephen.Austin",
          "approver": {
            "type": "IDENTITY",
            "id": "2c91808568c529c60168cca6f90c1313",
            "name": "William Wilson"
          }
        }
      ]
    }
  ],
  "requestedBy": {
    "type": "IDENTITY",
    "id": "2c91808568c529c60168cca6f90c1313",
    "name": "William Wilson"
  }
}

```

The `sourceId` is not included in the payload, so there is no way to filter out events based on the source of the access. There is a way to get the `sourceId` for access requests and then do a comparison operator to filter out any requests that don’t match the target source, but it will require loops and variable insertion, which are not yet available in Workflows.

---

<div class="post-metadata">

**Author:** ![NMcGary76](https://avatars.discourse-cdn.com/v4/letter/n/3ab097/32.png) [@NMcGary76](https://developer.sailpoint.com/discuss/u/NMcGary76)\
**Post date:** [November 9, 2022, 4:38pm UTC](https://developer.sailpoint.com/discuss/t/access-request-decision-trigger/5834/3 "2022-11-09T16:38:26Z")

</div>

Is there a clear answer on what the actual Json looks like in the “Access Request Decision” box? I have read through the document posted below and it provide no insight. It would be helpful to know that small detail.

---

<div class="post-metadata">

**Author:** ![colin\_mckibben](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/colin_mckibben/32/37182_2.png) [@colin\_mckibben](https://developer.sailpoint.com/discuss/u/colin_mckibben)\
**Post date:** [November 11, 2022, 4:09pm UTC](https://developer.sailpoint.com/discuss/t/access-request-decision-trigger/5834/4 "2022-11-11T16:09:38Z")

</div>

Welcome to the developer community Nicole.

The text area on each trigger is for a JSONpath filter expression. You might find it helpful to read up on trigger filters here: [Filtering Events | SailPoint Developer Community](https://developer.sailpoint.com/idn/docs/event-triggers/filtering-events). You have to look at what the payload of a trigger will be in order to understand what fields are available to filter on.

Here is an example filter expression to only send Access Request Decision events that contain an access item with a specific name.

`$.requestedItemsStatus[?(@.name == "Engineering Access")]`

---

<div class="post-metadata">

**Author:** ![colin\_mckibben](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/colin_mckibben/32/37182_2.png) [@colin\_mckibben](https://developer.sailpoint.com/discuss/u/colin_mckibben)\
**Post date:** [February 16, 2023, 1:56pm UTC](https://developer.sailpoint.com/discuss/t/access-request-decision-trigger/5834/5 "2023-02-16T13:56:58Z")

</div>

A post was split to a new topic: [Filter event trigger on more than one item](https://developer.sailpoint.com/discuss/t/filter-event-trigger-on-more-than-one-item/8282)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [July 19, 2023, 2:23pm UTC](https://developer.sailpoint.com/discuss/t/access-request-decision-trigger/5834/6 "2023-07-19T14:23:36Z")

</div>


