Customer Forum

SFTP Summary Report Script

Sam (Workbooks Online) Posted: 2018-11-12 09:18

How to set up and use the SFTP Summary Report Script

This Scripts allows a Scheduled Process to summarise Imports created through an SFTP Process. This information can be produced in a Report; this Report can then be used within a Scheduled Email to inform you that Errors or Warnings have been encountered by the SFTP Process. Allowing you to monitor the performance of your Imports into Workbooks.

This Script will work with either FTP or SFTP Scripts.


Stage 1 - Create the Process

The Script uses a Scheduled Process to look up the Imports that have been successful and then analyses their Performance. To create the Scheduled Process you will need to go to Start > Configuration > Automation > Processes > Scheduled Processes, once on this page select New Scheduled Process.

You will need to Name the Process, we would suggest naming it “SFTP Summary Process”. After this, on the Script section choose the Script Library option and find the ‘SFTP Import Summary’ Script. Using the Script Library version allows you to stay up to date with any changes made by our Development Team in the future.


You will need to decide on how often the Process runs. This is entirely up to you, as you will want to consider on how often your SFTP Process creates Imports and how quickly you want to be informed of any potential issues. 

We would always recommend that in your Access Settings the ‘Run As’ is set to the Automation User. This prevents User related issues such as Accounts or Passwords no longer being valid which will reduce the chances of the Process not running.

Finally, you must decide what actions you want the Process to take if it fails, whether it needs to Run again or disable itself and which User needs to be notified.


Stage 2  - Configure the Report

We have created a Template Report for this Process to work with, however you may want to make some amendments to the Report Criteria to work with your specific requirements.

The Report Template can be found from Start > New > Report > Create a Report from a Template Report, then select “Template - API Data - SFTP Import Summary Report”.

This will load the Report shown below:


Criteria that you may want to consider

  • Only show Imports with Errors - The Report contains a Calculated Column “Errors Encountered”, this performs a total of the number of the Total Error and Total Warnings. Applying Calculated Criteria to show where this Column is “Yes”.
  • Only show Imports created in a given time frame - A Criteria can be applied to the Created at to only show Imports Created Today, or within the last 2 hours, this Criteria may vary depending on how often your SFTP Imports run and how often you may want to review the Errors and Warnings.


Step 3 - Set up a Scheduled Email

Rather than having to periodically check the email to review Imports, you can create a Scheduled Email to send through the details of failed Imports. Details on how to setup and configure Scheduled Emails can be found on our Knowledge Base

When setting up this Scheduled Email you will want to consider how often you want to be notified of these errors - this will need to work in line with your Report’s criteria and who should be notified. We would also recommend only sending the Report when it is not empty, especially if you are running this frequently.

All of these tools should now provide you with a method to better monitor your SFTP Imports and any potential issues with your data you might encounter.