Low Code User Management with Power Automate

Think about how you can work on integrations without deep programming skills.

Header with workflow picture

Staffbase offers many methods to manage users automatically on your Staffbase platform, such as CSV import, User API, SCIM, SSO, or a combination of these methods.

Many organizations manage their user base through a classic CSV file due to a variety of reasons, such as:

  • Not all users have an SSO account
  • No identity provider (IdP) set up for the organization
  • IdP is not set up to be available outside the internal network of the organization
  • IdP is managed by a third-party service
  • CSV is the format of choice that the source system (for example, HR system) can provide

Through this blog post, I want to give you an idea of how to automate user onboarding using a CSV file and Power Automate as part of the Microsoft Power Platform.

For most organizations, Microsoft's cloud environment has become the central infrastructure of choice because of its wide range of products and services. So, it might make sense to use Power Automate, especially if you want to automate a business process but don't have the resources to code an automated process using tools like PowerShell or other scripting/programming technologies.

High-level steps

  • Your user data is provided as a CSV file. See CSV file examples here.
  • Power Automate retrieves the file from the source location.
  • Power Automate makes the file available to Staffbase using the CSV Import API.

A few considerations

  • What is the trigger for your import? For example, is it on a schedule like every Monday at 8:00 p.m. UTC?
  • What is the source location of your CSV file that needs to be processed by Power Automate?
  • Do you need specific mappings or other configurations for the import into your Staffbase platform?

Let's take an example

Your HR system exports a CSV file every Monday afternoon and uploads it to an FTP server that's ready no later than 6:00 p.m. UTC.

A way from FTP to Staffbase via Power Automate

  1. Create a new flow and define a scheduled trigger to start the flow.

    Image showing a scheduled trigger in Power Automate
  2. To process the file, define some helper variables using the Initialize variable.

The helper variables are used to define values that can later be used to post to the Staffbase API.

Image showing helper variables
  1. To process the file, first load the file. In this example, the default Power Automate FTP connector is used. Of course, you could choose another connector if the CSV has a different source.
Image showing a FTP connector
  1. Prepare the body for the CSV upload by initializing a new variable of type Object. Depending on whether you are using the partialImportTag or not, you may want to construct the body differently.
Image showing generation of body
  1. Once the body is defined, use the HTTP action to post the CSV file to the upload endpoint of CSV Import API.
Image showing the CSV upload action
  1. Trigger a CSV update of the uploaded information. In preparation for the update, it may be helpful to URL-encode the profile mappings, as they must be provided in a URL-encoded form.
Image showing the encoding and CSV update action
  1. Run the flow to update your user base.

To wrap it all up

As stated in the introduction, this blog post is meant to spark ideas. It's not meant to be a detailed step-by-step tutorial. The intent is to give you an option on how a low-code platform such as Power Automate can help you simplify your processes by taking advantage of tools you already have.

You can easily customize the flow shown above to your needs, such as adding actions to notify you of the outcome of the flow through the channel of your choice.

Ultimately, it's about figuring out what processes you could automate using a low-code platform like Microsoft Power Automate that can interact with different systems and simplify your business processes. Use this idea to extend low-code automation beyond user onboarding and management.