Wellnomics HR Import with Azure Automation

Modified on Wed, 04 Oct 2023 at 09:48 AM

Overview

The Wellnomics automated HR Import process is fairly simple, use our provided PowerShell script of application to upload a UTF-8 CSV to the uploader site. This file is then placed on the server and will be automatically imported according to the set schedule. As customers move away from using on premise servers, we've worked to create a solution that can be entirely cloud based. The method described below has been developed so customers can store their HR Import file in an Azure storage container and use an Azure automation runbook to schedule the upload process. 


You must contact Wellnomics Support to be provided the script and upload credentials.


Set-up

The script preforms three main functions. 

  1. It first logs into a specific website using given credentials.
  2. Fetches a blob, a UTF-8 CSV file, from an Azure Storage Account.
  3. Uploads this fetched blob to the aforementioned website.


To get this script to run in an Azure Runbook, follow these instructions:


1. Set up your Azure Automation Account

Ensure you have an Azure Automation Account created.


2. Upload necessary modules

The script uses Az.Storage module commands. Ensure the module is available in your Automation Account.

3. Create Runbook

  • Under the "Process Automation" section, click on "Runbooks".
  • Click on "+ Create a runbook".
  • Give it a name and select "PowerShell" as the runbook type. This was created and tested using PowerShell 5.1
  • Click on "Create".


4. Paste the Script

Paste the provided script into the editor.


5. Add Automation Assets

The script uses both Get-AutomationPSCredential and Get-AutomationVariable. These pull in Automation Assets that should already be set up in the Automation Account.

  • Under the "Shared Resources" section in your Automation Account:
  • Click on "Credentials". Add a credential with the name 'hrsender' which will have the email and password needed for the website login. Wellnomics Support will provide those details. 
  • Click on "Variables". Add a variable with the name 'storekey' which will have the Azure Storage Account key.


6. Test the Runbook

  • Save the runbook.
  • Click on "Test pane".
  • Click on "Start" to test the runbook. Ensure that it works correctly without errors.
  • Communicate with Wellnomics Support so we can verify the file has been properly uploaded.


7. Publish and Schedule

If the test succeeds:

  • Close the Test pane.
  • Click on "Publish" to make the runbook live.
  • Optionally, you can schedule the runbook to run at specific intervals using the "Link to schedule" option.


8. Monitor and Logs

Make sure to monitor your runbook. Check the logs regularly to ensure it's working as expected.



With these steps, your script should be running within an Azure Runbook.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article