# Workflow HTTP Request - Identity Attribute Variable Insertion

**URL:** <https://developer.sailpoint.com/discuss/t/workflow-http-request-identity-attribute-variable-insertion/70489>\
**Category:** SHF Discussion and Questions\
**Tags:** workflows, sailpoint-identity-security\
**Created:** [July 1, 2024, 6:49pm UTC](https://developer.sailpoint.com/discuss/t/workflow-http-request-identity-attribute-variable-insertion/70489 "2024-07-01T18:49:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jacobg241](https://avatars.discourse-cdn.com/v4/letter/j/bbce88/32.png) [@jacobg241](https://developer.sailpoint.com/discuss/u/jacobg241)\
**Post date:** [July 1, 2024, 6:49pm UTC](https://developer.sailpoint.com/discuss/t/workflow-http-request-identity-attribute-variable-insertion/70489/1 "2024-07-01T18:49:17Z")

</div>

I have created a workflow that uses the HTTP Request Action to create ServiceNow REQ’s. I have noticed that when trying to pass an identity attribute in the body of the HTTP Request, it is showing the variable name instead of the actual value:

**{{$.trigger.identity.attributes.firstname}}**

Here is the body of the request:

```auto
              "jsonRequestBody": {
                "items": [
                  {
                    "sysparm_id": "samplesysparmid545",
                    "variables": {
                      "description": " SailPoint Department Name Change",
                      "opened_by": "test1234567",
                      "req_description": "Service Request created by SailPoint ",
                      "requested_for": "test123456",
                      "short_description": "SailPoint Access Request Change in Department Name {{$.trigger.identity.attributes.firstname}}"
                    }
                  }
                ]
              }

```

When i change the variable name to: **{{$.trigger.identity.name}}** , that gets displayed properly in the ServiceNow REQ, but i need to be able to use different identity attribute values on the triggered identity.

There must be a different way you need to set identity attribute values when using a nested json object.

---

<div class="post-metadata">

**Author:** ![bcariaga](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/bcariaga/32/1890_2.png) [@bcariaga](https://developer.sailpoint.com/discuss/u/bcariaga)\
**Post date:** [July 1, 2024, 7:26pm UTC](https://developer.sailpoint.com/discuss/t/workflow-http-request-identity-attribute-variable-insertion/70489/2 "2024-07-01T19:26:32Z")

</div>

Hello @jacobg241,

Welcome back to the Developer Community 🙂

What is the trigger used for this? Typically, all of the identity attributes are not available in the trigger. To get around this, you can use a “Get Identity” node after the trigger to fetch all of the identity attributes while passing in the `$.trigger.identity.id`.

Once that node is in place you can use `$.getIdentity.attributes.firstname` in the request body.

Check out the [trigger documentation](https://documentation.sailpoint.com/saas/help/workflows/workflow-triggers.html) for sample JSON for what is provided by each trigger.

---

<div class="post-metadata">

**Author:** ![jacobg241](https://avatars.discourse-cdn.com/v4/letter/j/bbce88/32.png) [@jacobg241](https://developer.sailpoint.com/discuss/u/jacobg241)\
**Post date:** [July 1, 2024, 7:39pm UTC](https://developer.sailpoint.com/discuss/t/workflow-http-request-identity-attribute-variable-insertion/70489/3 "2024-07-01T19:39:22Z")

</div>

Hey Braden,

I have included a new Get Identity Action and that did the trick.

Thank you!

---

<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:** [August 30, 2024, 7:40pm UTC](https://developer.sailpoint.com/discuss/t/workflow-http-request-identity-attribute-variable-insertion/70489/4 "2024-08-30T19:40:06Z")

</div>

Closed on August 30, 2024, 7:40pm UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
