How to use the "create an account for someone else"'s returned object when user already exists

Hi all,
I’m using the “create an account for someone else action” and I’ve enabled the “return the user if the account already exists” option.

Here’s what I’m looking to do in my workflow after the “create an account for someone else action” step:
1/ I would like to send email A to users who were newly created as a result of “create an account for someone else action”
2/ I would like to send email B (different from A) to users who already existed.

How can I know whether the user existed or not? And how can I access the returned user if they existed? (Note that i have privacy rules on users so I don’t want to do a search for all users etc.)

Potential solutions:
Potential solution 1/ This post suggests to use the workflow event “an unhandled error occurs and error code is USED_EMAIL”. But the problem with that workflow is that I can’t access the existing user that got the workflow “create an account for someone else to fail”, so i can’t send email B.

Potential solution 2/ This approach checks the created date of the user. If it was just created (a few seconds or minutes ago), then it’s considered a newly created user. And if not, it’s an existing user. Not great because it’s not super accurate.

Potential solution 3/ @NigelG suggested in this post to use an “only when” condition to check whether a step triggered. That sounds promising but how can I achieve that?

thank you !

If you want to make work both option you have to uncheck this condition or create demo users database and after validate the user in safe way ,run “create an account for someone else”

This topic was automatically closed after 70 days. New replies are no longer allowed.