Use this processor when the workflow must interact with an external API, letting you send the request, parse the response, and map the returned data onto Profile attributes.
To fetch the name of the item whose id is 2, write JavaScript that extracts that field from the response:
Extract the response with JavaScript code
When you write JavaScript in the Extract Response section, first run the workflow once, open the queue to inspect the API response, then click Analyze variable.
Analyze the API response
A popup like this appears afterwards:
Review the API response details
Next, tweak the JavaScript to confirm the result meets your needs: