Workflow to send email after an account Creation

Hello,

We are trying to create Workflows to send an email to the user when a new account is created by IdentityNow for him in a source, so that we can send him the details to access the system.

I have created for this a workflow with Provisioning Completed trigger and the following filter :
‘$[?($.accountRequests[0].source.name == “Source Name” && $.accountRequests[0].accountOperation == “Create” && $.accountRequests[0].provisioningResult == “SUCCESS” )]’

But we are never entering the workflow, I cannot understand why.
Any idea ?

Regards

2 Likes

Have you checked your JSON input from the Workflow? It’s possible that the trigger returns more than one account requests and maybe the [0]th one isn’t the Create operation on the source that you are comparing to.

If you remove this filter, are you able to execute the workflow?

1 Like

Try this filter:

$.accountRequests[?(@.source.name == “Source Name” && @.accountOperation == “Create” && @.provisioningResult == “SUCCESS”)]

1 Like

Yes i’ve check using documentation and also tried to run the workflow without filter. You were right there is multiple element in accountRequest.

$.accountRequests[?(@.source.name == “Source Name” && @.accountOperation == “Create” && @.provisioningResult == “SUCCESS”)]

This filter is not accepted in the trigger block.Maybe i should use the loop block to go through the accountRequests attribute ?

Regards

1 Like

What is the error you are getting?

1 Like

This filter works for me.

Make sure when you copy paste it, replace the quotes/white spaces.

1 Like

Wow, it was tricky to view that the quotes were not the same.
But as of now, the workflow is not started when doing a create account.

2 Likes

I am creating a similar workflow, and it is not trigger for me either when the account is being created. I also changed fixed the formatting it still isn’t working.

Do you have a JSON file that we can use?

1 Like

No, I don’t have one for this trigger.

Try using the documentation here to test your filter.

1 Like

Is there a reason the filter wouldn’t work for us, but only for you?

1 Like

I didn’t execute it, i just verified the JSON expression didn’t have any error.

1 Like

Oh I see so you recommend finding one that works!

2 Likes

Hi Alexandre,

We did a similar workflow using the following trigger (code comes from the JSON directly) :

"trigger": {
		"type": "EVENT",
		"attributes": {
			"filter.$": "$.accountRequests[?(@.accountOperation == \"Create\" && @.provisioningResult ==\"committed\" && (@.provisioningTarget ==\"NAME OF YOUR SOURCE A\" || @.provisioningTarget ==\"NAME OF YOUR SOURCE B\" ))]",
			"id": "idn:post-provisioning"
		}
	}
2 Likes

Hello Thibault,

Thanks for your answer ! I have done a test and it works !
Huge thanks to all of you for your help.

2 Likes

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