We will email the user if we have a valid email ID:
- Let's add an Email Send action. In the To address field, we add the EmailID variable and a Subject and Message body, as shown in the following screenshot. In the Send email as property, choose Outlook (not shown). You must have Outlook on your machine for the bot to be able to send an email with this option:
- Let's also add a Log File action to the ExecutionLog.txt file path with the text $System:Machine$-INFO - User Creation failed. Email sent to User.
We are mostly done with our automation. Let's now add a couple of steps to the Catch block we created at the beginning.