Issue with Scheduled Search Trigger in IDN Workflow

Hello fellow Sailors,

I am encountering an issue when using the scheduled search trigger in an IdentityNow (IDN) workflow. The workflow is intended to use a saved search (which I have created a subscription for) as the trigger for the scheduled search. The search successfully returns a set of identities, and the workflow is supposed to:

  1. Trigger based on the scheduled search.
  2. Retrieve the identities from the search result.
  3. Call our HRIS API.
  4. Send an email to the IAM team.

While the scheduled trigger appears to initiate the workflow, the identities returned from the search are not being recognized by the “Get Identity” action in the workflow. As a result, the workflow is not able to process the identities as expected.

Could you please advise on how I can ensure that the identities returned from the scheduled search (which triggers the workflow) are correctly recognized and processed within the workflow?

Per the workflow execution logs, here’s a snippet of the error I get:

Here’s the error message I get when the workflow is triggered:

{"input":{"_meta":{"invocationId":"dfsdfsd-b78c-sdfsdf-b43b-sdfsdfsdf","subscriptionId":"sdd-d4f7-4dfdf-adbc-sdfsd","triggerType":"FIRE_AND_FORGET"},"fileName":"Search Export.2024-08-19 15'01 GMT","ownerEmail":"[email protected]","ownerName":"John","query":"attributes.compareHireDateAndNow:TRUE AND attributes.compareHireDateAndPast7Days:TRUE","searchName":"Hire Date Within 7 Days","searchResults":}
{"attempts":1,"displayName":"Get Identity","stepName":"getIdentity","task":"sp:get-identity"}
{"displayName":"Get Identity","error":"request failed: 404 - 404 Not Found: ","stepName":"getIdentity","task":"sp:get-identity"}
{"error":"task failed: activity error (type: sp:internal:http, scheduledEventID: 5, startedEventID: 6, identity: dfdsfsf-1135-4b3f-bd1e-sdfsdf): request failed: 404 - 404 Not Found:  (type: HTTP Response Returned a Client Error, retryable: false): request failed: 404 - 404 Not Found (type: fundamental, retryable: true)"}

Hi @adebomol2024

It appears you are using the input to your “Get Identity” step as “$.trigger.identity.id”.
But since your trigger is a scheduled trigger that just initiates the workflow at given time, the trigger has not input to provide to this step (v3/identities/<no value>) As a result the get identity fails. Using this trigger you would need to provide the input either with another step after the schedule or changing your trigger.

It sounds like you want to use a scheduled search instead and then use the result of the search to get that specific identity / identities to continue in the workflow.

The schedule search will return a JSON which you can then reference specific blocks in it to use in the Get Identity step with a JSONPath expression $.trigger.xyz.xyz.

Other considerations would be, your search might return more than one identity but your workflow is only processing one, you may want to consider a loop through the array of identities returned from your search if more than one. i.e. all steps after the trigger will be in a loop until all items have been processed.

I hope that helps

Can you share the details on what you’re inputting on the get identity step?

1 Like

Hi @adebomol2024

Looking at the error, the search results are blank, can you check the search directly and ensure you are getting results:

“searchResults”:}

Irshaad

1 Like

Hi @adebomol2024,

Since your search result returns multiple identities, you would want to loop through each of them.

Here is a draft workflow which you can work on that uses a looping on the search results. It uses the scheduled trigger, then calls the Search API to retrieve the identities and then loop through each of the identities.

Let me know if you need any further assistance on this.

SearchWorkflow20240822.json (2.5 KB)

1 Like

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