Scan to Sharepoint

YSoft SafeQ is able to upload document into Microsoft Sharepoint using the Scan to Script scanning workflow. The script whose path is provided in the administrator workflow parameter script is called for each scanned file done by user while scanning on the terminal.

How to setup:

  1. Enable scanning with terminal embedded and use predefined scanning workflows that will be used with the MFP (see help for more information about "Workflow scanning").

  2. Download Curl (http://curl.haxx.se/), unzip and copy content into folder "C:\SafeQ5\scan\". Another option is ask Customer Support Services to provide it.

  3. Import scanning workflow with this content:

    <scan>
     <name>Sharepoint</name>
     <destination>script</destination>
     <description>Scan to Sharepoint with fixed path</description>
     <options>
        <resolution>normal</resolution>
        <sides>1</sides>
        <color>auto</color>
        <fileType>pdf</fileType>
      </options>
      <admin>
        <parameter>
           <pname>script</pname>
           <type>string</type>
           <label>Script command call</label>
           <required>true</required>
           <default>C:/SafeQ5/Scan/ScanToSharepoint.cmd %file% %sharepointpath% %subfolder%</default>
        </parameter>
        <parameter>
           <pname>targetDir</pname>
           <type>string</type>
           <label>Target directory</label>
           <required>true</required>
           <default>C:/SafeQ5/scan</default>
        </parameter>
        <parameter>
           <pname>sharepointpath</pname>
           <type>string</type>
           <label>Sharepoint path</label>
           <required>true</required>
           <default>http://sharepoint/test/</default>
        </parameter>
      </admin>
      <user>
        <!-- using this parameter, users may enter the sub-folder name on the terminal -->
        <parameter>
           <type>string</type>
           <pname>subfolder</pname>
           <label>Sub-folder name</label>
           <required>false</required>
           <default>Scan_From_SafeQ</default>
        </parameter>
      </user>
    </scan>
  4. Create ScanToSharepoint.cmd in SafeQ5\scan\

    rem Optional change of username and password
    set username=user@domain.local
    set password=sercret_password
     
    @echo off
    C:/SafeQ5/Scan/curl --ntlm -u : -X MKCOL %2/%3/
    C:/SafeQ5/Scan/curl -T %1 --ntlm -u %username%:%password% %2/%3/
  5. Make sure that: 

    1. sharepoint path in xml definition is valid.

    2. user used for files upload has write access right into MS Sharepoint site.

How to use:

  1. Authenticate at YSoft SafeQ terminal embedded

  2. Choose YSoft SafeQ application and press "YSoft Scan" button on the MFP panel

  3. Select your Sharepoint workflow

  4. Optional:

    1. Edit a Subfolder name where scan will be stored

  5. Start your scan

  6. Log off the embedded terminal

Troubleshooting:

See cml.log and sharepoint.log in <SafeQ_HOME>\logs folder.

Log to file missing.

Limitations

Scans are stored in defined Sharepoint address and also in directory C:/SafeQ5/Scan/

  • For deleting jobs in directory C:/SafeQ5/Scan/ additional script is needed

Script ScanToSharepoint.cmd stores username and password and it can be easily read

  • To hide user credentials use .exe file which cannot be read
    images/s/-3eliqb/8502/404359a7d2ab19c9c7c58d12013124a386b28257/_/images/icons/emoticons/information.svg Using .exe file needs additional changes in scanworkflow template