Welcome,
How Can We Help You?

How to collect JSON-Data in an Online XLS-File

PowerAutomate offers you the possibility to collect JSON data from your Lawlift template in an online XLS file.

Info

This feature is only available in the unlimited plan.

 

Here is how you sent JSON-Data to an online XLS-File:

1. Go to PowerAutomate and create a new flow.

As soon as you have logged in to PowerAutomate with your Microsoft account, you can create a new flow. How to set up a new flow in Power Automate, in general, is explained in the article Power automate + LAWLIFT.

First, select the Lawlift Export Trigger as the starting point for your flow and select "Parse JSON" in the next step.


 

2. Create a schema 

At this point, you define the schema of the JSON file. To do this, download the JSON file from your Lawlift template where you inserted the Data-Tab. The Data-Tab can look for example like this:

After you enter the required data the exported JSON file will look like this:

{"PowerBI HR Dashboard": {
	"email":"john@doe.com",
	"Firstname":"John",
	"Lastname":"Doe",
	"Gender":"Female",
	"Residence":"Berlin",
	"Salary":2500,
	"Startdate":"December 01, 2023",
	"Minijob":"No",
	"Probationary_period":"Yes",
	"Field_of_application":"Job title",
	"Place_of_activity":"Place"
	}
}

Now you must add the following addition: {"Metadata": { __JSON-file__ }}

Don't forget to add the closing curled bracket after the code.

 
{"Metadata": {
	"PowerBI HR Dashboard": {
		"email":"john@doe.com",
		"Firstname":"John",
		"Lastname":"Doe",
		"Gender":"Female",
		"Residence":"Berlin",
		"Salary":2500,
		"Startdate":"December 01, 2023",
		"Minijob":"No",
		"Probationary_period":"Yes",
		"Field_of_application":"Job title",
		"Place_of_activity":"Place"
		}
	}
}

2. Setting up the PowerAutomate Workflow:

Now you are ready to create a new Flow in PowerAutomate. The starting point is the LAWLIFT trigger for exporting documents. From here on you create the approval process.

The next step is to prepare PowerAutomate to use your metadata. To do this, select "Parse JSON" as the next step. Then you have to select “Custom data object” as the Content in the first line and generate a schema from an example. To do this you have to click on “Use sample payload to generate schema”.

 

You will now be asked for the example JSON file that we created earlier. You can insert it in this window. 

If you click on "Done", the specified format is changed so that it can be read by Power Automate. In the end our schema will look like this:

 

With this, you have prepared the groundwork for integrating the metadata into your flow. Note: If you specify a file type for all variables ("string" or "integer"), values have to be inserted for the respective variables for each export. Otherwise the flow will not work.

3. Create an Excel file:

To begin, create an Excel file and save to Sharepoint in your desired location.

Next, insert columns in the Excel file that match the contents from the JSON file.

 

4. Add Excel to your flow:

As the next step in your flow, select "Add rows into a table". You will find this action when you click on “Excel Online (Business)” and then select “Add a row into a table”

 

You can now select the Excel file you just created.

Now you can select the contents defined in the schema and add them to the step in your flow.

5. Select the Flow in the LAWLIFT-Publication

After you have saved the flow, you can go to the settings of your publication and select the corresponding flow. You may need to give the trigger "When documents are exported" a name (in this case "Insert Row to Excel"):

You will then find the name of the flow in the publication in the settings under "Advanced":

6. Insert data into the Excel file

The flow is now triggered for each export of your publication and the data is inserted into the specified Excel file.

 

 

Was this article helpful?

Can't find what you're looking for?

Our award-winning customer care team is here for you.

Contact Support