Newbie help request: SFTP Remote Directory Watcher not triggering

I’m having trouble getting the SFTP Remote Directory Watcher to trigger correctly.

I believe I am connecting successfully to the remote server because my initial errors when attempting to do so no longer appear in the log. However, when I make changes to the specified root Remote Directory (like adding or deleting a file + then waiting at least 15 minutes), the flow does not trigger. At this point I’m stuck and could use some help:

  • Is there a way for me to get more diagnostic information from the Remote Directory Watcher trigger step? eg. could it list the remote files it sees?
  • I thought of trying to fork the code and add more console commands, but don’t know how to incorporate / replace the built-in Remote Directory Watcher with my forked code.

Any thoughts / comments / advice much appreciated.

PS. Is there a way to clear the log?

Hi @jpeytonj

First off, welcome to the Pipedream community. Happy to have you!

However, when I make changes to the specified root Remote Directory (like adding or deleting a file + then waiting at least 15 minutes), the flow does not trigger.

Can you tell us which type of trigger you’re using specifically? Which app is it categorized under in the Pipedream trigger search?

  • Is there a way for me to get more diagnostic information from the Remote Directory Watcher trigger step? eg. could it list the remote files it sees?

The logs in the Sources area might tell you more. It’s available in your dashboard under https://pipedream.com/sources.

  • I thought of trying to fork the code and add more console commands, but don’t know how to incorporate / replace the built-in Remote Directory Watcher with my forked code.

Yes you can absolutely do that. You can deploy your own sources and actions to your personal account using PD CLI: Overview

Thank you for the warm welcome!

  • The specific trigger search was ‘SFTP (password based auth) source…’ which brings up the ‘New Remote Directory Watcher’ trigger which I configured for my remote account.
  • I did look at the logs in Sources which was how I was able to debug my initial connection and selection of root directory. Previously I got errors: List: No such file. Now I’ve resolved that (no more errors in the log), yet changes to the remote root directory do not seem to trigger an event.

Thanks for the pointer re how to fork, modify, and deploy code. I will give it a go!

Hi @jpeytonj of course happy to help!

I linked you to the Components Development documentation, but to actually deploy your forks you can use the CLI which is documented here: Installing the CLI

If you’d like to open a bug report on a specific component, you can do so here: Sign in to GitHub · GitHub

And if you solve the issue yourself, we’d be happy to grant you an invocation bonus for the trouble :slight_smile: otherwise, someone on our team can take a look.

Thanks for the helpful suggestions and links.

I’m still (sporadically!) trying to investigate this and ftp functionality more generally.
I see examples in the code of sftp.cwd(), sftp.list(), sftp.put(fileData, params.remotePath), but where can I find the documentation on these and other ftp functions that are presumably available, eg. sftp.get(), sftp.cd() etc?

The code seems to import “ssh2-sftp-client” which is perhaps where the functions are defined, but I can’t seem to find this. Any pointers?