
Capturing LRS-like data from an elearning course is a ultimate utopia for elearning developers and admins. LMS, along with SCORM, is usually restricted to a limited set of communication. Most LMSs are only configured to accept just the ‘Complete/Incomplete‘ like statements. xAPI? Well, we need LRS for that, and it needs another level of know-how. Here is a method that can capture parameters from a SCORM file and LMS, push to an Excel using Power Automate. And what all data can be transferred is up to your imagination. Opportunities are limitless.
Prerequisites:
- Articulate Storyline (a trial subscription will work)
- Microsoft Power Automate (comes with a Microsoft Business subscription)
- Microsoft OneDrive for Business (comes with a Microsoft Business subscription)
- Microsoft Excel
- Your Persistence (sometimes it takes more than one try for success, that’s life).
Step 1: Prep the Excel
- Create a New Excel file on OneDrive for Business.
- Add the following columns, and name the Table as “Data”

Step 2: Prep the Storyline File
- In a Storyline file, add the corresponding variables:

Note: You may see few variables such as scorepercent and TotalScore that are not in Excel. They are not needed for the Data Push.
- In the first slide, add Execute JavaScript when the Timeline Starts on the Slide trigger, and put the following code in JavaScript window:
var lmsAPI = parent;
var name = lmsAPI.GetStudentName();
var stid = lmsAPI.GetStudentID();
//Arranging to First Name and Last Name
var nameArray = name.split(", ");
var firstName = nameArray[1];
var lastName = nameArray [0];
nameArray[0] = firstName;
nameArray[1] = lastName;
name = nameArray.join(" ");
//Pushing the LMS Data to Storyline Variable
var player = GetPlayer();
player.SetVar("StudentName",name);
player.SetVar("EmpToken",stid);
- Once the quiz ends, transfer all the quiz data to Excel using the following JavaScript code in .story file:
var player = GetPlayer();
// Capture Employee Token
var empToken = player.GetVar("EmpToken");
// Generate Timestamp in IST
var currentDate = new Date();
var ISTOffset = 5.5 * 60 * 60 * 1000; // Convert hours to milliseconds
var ISTDate = new Date(currentDate.getTime() + ISTOffset);
var ISTTimestamp = ISTDate.toISOString().slice(0, 19).replace("T", " ");
var course = "Excel Skill Sprint";
// Capture Survey Responses
var surveyData = {
"CourseName":course,
"EmpToken": empToken,
"Timestamp": ISTTimestamp, // Now in IST
"LMSorLXP": player.GetVar("LMSorLXP"), //Tested successfully on SAP SuccessFactor LMS and SCORM cloud.
"StudentName": player.GetVar("StudentName"),
"Q1": player.GetVar("Q1"),
"Q2": player.GetVar("Q2"),
"Q3": player.GetVar("Q3"),
"Q4": player.GetVar("Q4"),
"Q5": player.GetVar("Q5"),
"Q6": player.GetVar("Q6"),
"Q7": player.GetVar("Q7"),
"Q8": player.GetVar("Q8"),
"Q9": player.GetVar("Q9"),
"Q10": player.GetVar("Q10"),
"Q11": player.GetVar("Q11"),
"Q12": player.GetVar("Q12"),
"Q13": player.GetVar("Q13"),
"Q14": player.GetVar("Q14"),
"Q15": player.GetVar("Q15")
};
// Power Automate HTTP URL (Replace with your actual flow URL)
var flowURL = "Insert Power Automate URL here";
// Send Data to Power Automate
fetch(flowURL, {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(surveyData)
})
.then(response => response.text())
.then(data => console.log("Success:", data))
.catch(error => console.error("Error:", error));
- Keep the flowURL section empty. We will fill it once we setup the PowerAutomate flow.
Step 3: Setup the Power Automate
Step 4: Link the Power Automate to JS
After setting up Power Automate successfully, copy the HTTP URL to the JavaScript in the Storyline file.
Step 5: Publish and Upload
Publish the file and upload the SCORM zip to the LMS.
That’s it!
Note: I have kept the JSON schema in the Power Automate as empty, resulting in all the data accumulating in the first column as a data array. That’s alright! As our objective is to capture the data. Optimization comes later, and can be done by PowerQuery in Excel easily.
Excel File: LMS to Excel Push.xlsx
Story File: What’s Your QuizScore__v1.story