logo
Documents & Forms
Microsoft 365 & SharePoint Tools
Classic SharePoint Tools
Documents
Apr 08, 2020
Automatically generate HR documents for onboarding remote employees by using SharePoint and Power Automate
Angelika Cherina
Angelika Cherina
Lead Marketing Specialist

In two past months, many companies found themselves in need to take projects remotely. SharePoint Online could be a solution to collaborate with a remote team. You may have already discovered SharePoint for yourself as a manager for employees working from home.

In this article, we’ll describe how to create employment documents from the SharePoint list item with the help of Plumsail Documents in Power Automate.

1

Create employees list in SharePoint

Let’s suppose you have a list on the SharePoint team site with all the employees. If not, create it. When you hire a new remote employee, add a new item to this list. It will contain information about a newcomer.

Here is our sample Employees list:

2

These are list columns we added:

3

Customize SharePoint form (optional)

This step is optional. You can use a standard SharePoint form. However, if you want nice looking and user-friendly form, take a look.

With the help of Plumsail SharePoint Forms, we have adjusted forms. Now when adding a new item, or editing the current one, or just opening to view the info, Personal and Job information are in the separate tabs.

Plumsail Forms for SharePoint allow customizing forms for any SharePoint list or library. Learn more in the documentation.

The following two steps are:

  • Configure the process to generate a working contract from a DOCX template
  • Set the Power Automate Flow to start this process for a particular employee

Create a document generation process

Processes are an easy way to automate the creation of documents from templates.

First, we create a new process. For that, we log in to the Plumsail account.

Let’s call our process Employment contracts.

5

Create a contract Word template

We upload an employment contract template in a DOCX format. The DOCX template has tokens. They will be replaced by data from the SharePoint list item.

6

Here is our sample hiring contract template for download. Use it for testing, customizing. Or create your own template — place tokens in employment contracts you use in your company. Check out the documentation on how DOCX templates work for more information.

Set result contract name and type

On the next step Configure template, we define the result agreement name and its type.

Use tokens to make the result file name precise and recognizable. For instance, we assigned the following name Employment agreement {{employeeName}}. It will turn out the Employment agreement Jessica Adams in our sample case.

7

Configure saving contract to SharePoint

The next step is setting deliveries. The process saves the result file depending on its delivery settings. We suggest adding SharePoint delivery to store the result working contract in the SharePoint document library.

8

Configure sending contract by email

Then you can add Send email delivery to send a ready employment agreement to the employee for information.

9

Configure starting of process on selected employee

You can start a process manually, but we suggest configure a Power Automate Flow to start it on a selected SharePoint list item.

For example, we have hired a new marketing manager Jessica Adams; we need to create an employment agreement for her. For that, we select her in the Employees list and start our Flow “Generate hire documents”:

10

Below is a picture of the complete Flow:

11

Trigger Flow on a selected item

We trigger the Flow with a SharePoint connector trigger — For a selected item. It allows us to start the Flow for any item in the SharePoint list.

Get information about selected employee

This action from the SharePoint connector retrieves the information about the selected employee. The outputs are dynamic and present all the list columns like Full Name, Position, Salary — all we added for our needs. We’ll use these outputs in the next step.

12

Start contract generation process

This action is from the Plumsail Documents connector. It starts our Process of creating employment contracts from a DOCX template.

Using the action for the first time, you need to create a connection. Type any name for the connection name — for example, Plumsail Documents. Then create an API key in your Plumsail Account. Copy and paste it to the Access Key field.

13

Start document generation process action has two parameters:

  • Process name. Select the process you need from available ones.
  • Template data. Specify source data in JSON format:

14

This object contains information from our SharePoint item. We selected the dynamic content from the output of SharePoint — Get item action.

Conclusion

You can use this approach to create any document based on SharePoint list data.

We have other useful stuff for optimizing documents flow for remote teams:

Getting started

Sign up and get a 30-day trial for free if you don’t have Plumsail Documents yet.

Note: The post has been originally published at Medium:
Have any questions?
Join our community or contact the support team: