You can use the Download Validation step to perform advanced validations of PowerPoint files such as number of slides and content.

Example code:

var zip = new JSZip(fileBuffer);
var doc = new Docxtemplater();
const slides = Object.keys(
  fileName =>
    _.startsWith(fileName, "ppt/slides/") && _.endsWith(fileName, ".xml")
console.log("Num of slides:", slides.length);

if (slides.length !== parseInt(excpectedNumOfSlides)) {
  return false;

expectedText = JSON.parse(expectedText);

expectedText.forEach(item => {
  const { slideIndex, text } = item;
  const slideText = doc.getFullText(slides[slideIndex]);
  if (!slideText.includes(text)) {
    throw new Error(`Failed to find ${text} in slide index: ${slideIndex}`);

Parameters - Packages and JavaScript used in this example:

  1. name: Docxtemplater, type: Package, value: docxtemplater@3.9.5
  2. name: jszip, type: Package, value: docxtemplater@2.*
  3. name: expectedText, type: JavaScript, value: '[{"slideIndex":0,"text":"Sample PowerPoint File"},{"slideIndex":1,"text":"This is a Sample Slide"}]'
  4. name: _, type: Package, value: lodash@4.17.11
  5. name: excpectedNumOfSlides, type: JavaScript, value: '2'

see screenshot:

Did this answer your question?