Skip to content

Commit 3f34c59

Browse files
authored
Merge pull request #111042 from ecfan/sftp-ssh
Add info about missing file after creation error
2 parents 1e1dd85 + 7ae387a commit 3f34c59

File tree

1 file changed

+32
-4
lines changed

1 file changed

+32
-4
lines changed

articles/connectors/connectors-sftp-ssh.md

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ description: Automate tasks that monitor, create, manage, send, and receive file
44
services: logic-apps
55
ms.suite: integration
66
author: divyaswarnkar
7-
ms.reviewer: estfan, klam, logicappspm
7+
ms.reviewer: estfan, logicappspm
88
ms.topic: article
9-
ms.date: 03/7/2020
9+
ms.date: 04/13/2020
1010
tags: connectors
1111
---
1212

@@ -147,6 +147,16 @@ If your private key is in PuTTY format, which uses the .ppk (PuTTY Private Key)
147147

148148
1. Save the private key file with the `.pem` file name extension.
149149

150+
## Considerations
151+
152+
This section describes considerations to review for this connector's triggers and actions.
153+
154+
<a name="create-file"></a>
155+
156+
### Create file
157+
158+
To create a file on your SFTP server, you can use the SFTP-SSH **Create file** action. When this action creates the file, the Logic Apps service also automatically calls your SFTP server to get the file's metadata. However, if you move the newly created file before the Logic Apps service can make the call to get the metadata, you get a `404` error message, `'A reference was made to a file or folder which does not exist'`. To skip reading the file's metadata after file creation, follow the steps to [add and set the **Get all file metadata** property to **No**](#file-does-not-exist).
159+
150160
<a name="connect"></a>
151161

152162
## Connect to SFTP with SSH
@@ -213,9 +223,27 @@ This trigger starts a logic app workflow when a file is added or changed on an S
213223

214224
<a name="get-content"></a>
215225

216-
### SFTP - SSH action: Get content using path
226+
### SFTP - SSH action: Get file content using path
227+
228+
This action gets the content from a file on an SFTP server by specifying the file path. So for example, you can add the trigger from the previous example and a condition that the file's content must meet. If the condition is true, the action that gets the content can run.
229+
230+
<a name="troubleshooting-errors"></a>
231+
232+
## Troubleshoot errors
233+
234+
This section describes possible solutions to common errors or problems.
235+
236+
<a name="file-does-not-exist"></a>
237+
238+
### 404 error: "A reference was made to a file or folder which does not exist"
239+
240+
This error can happen when your logic app creates a new file on your SFTP server through the SFTP-SSH **Create file** action, but the newly created file is then immediately moved before the Logic Apps service can get the file's metadata. When your logic app runs the **Create file** action, the Logic Apps service also automatically calls your SFTP server to get the file's metadata. However, if the file is moved, the Logic Apps service can no longer find the file so you get the `404` error message.
241+
242+
If you can't avoid or delay moving the file, you can skip reading the file's metadata after file creation instead by following these steps:
243+
244+
1. In the **Create file** action, open the **Add new parameter** list, select the **Get all file metadata** property, and set the value to **No**.
217245

218-
This action gets the content from a file on an SFTP server. So for example, you can add the trigger from the previous example and a condition that the file's content must meet. If the condition is true, the action that gets the content can run.
246+
1. If you need this file metadata later, you can use the **Get file metadata** action.
219247

220248
## Connector reference
221249

0 commit comments

Comments
 (0)