How to trigger Nextcloud to index files, generate thumbnails for newly created files by Syncthing (External storage)

You will need to script occ to scan for changes. See examples in other threads like Automatically do a files:scan on that specific file when a new file is added - #13 by ChineseAegis