Regarding  SFTP Flow action

sanjeevkumar
Tera Contributor

I am currently using the SFTP Flow action step with command "copy file to this instance" from a remote server. However, I am encountering the following error:

 

 

[{"file_name":"InstallbaseI-2024-06-13.csv","error":"Error creating Attachment InstallbaseI-2024-06-13.csv : Method failed: (/api/now/v1/attachment/file) with code: 40"}]

 Could you please help me debug this issue?

1 REPLY 1

AbinC
Tera Contributor

Hi @sanjeevkumr

: The error code 40 typically indicates a "Payload content type is not supported" or "Invalid file type" error in ServiceNow.

Possible Causes
1. *File Type*: The file type being uploaded might not be supported or correctly identified by ServiceNow.
2. *File Size*: The file size might be exceeding the maximum allowed limit.
3. *Attachment Configuration*: The attachment configuration in ServiceNow might not be set up correctly.

Debugging Steps
1. *Verify File Type*: Check if the file type (CSV) is supported by ServiceNow and if the file is not corrupted.
2. *Check File Size*: Ensure the file size is within the allowed limit.
3. *Attachment Configuration*: Review the attachment configuration in ServiceNow to ensure it's set up correctly.

SFTP Flow Action Step Configuration
1. *File Path*: Verify the file path in the SFTP Flow action step is correct.
2. *File Name*: Ensure the file name is correctly specified and matches the file being uploaded.

Additional Troubleshooting
1. *Check ServiceNow Logs*: Review the ServiceNow logs for more detailed error messages.
2. *Test with a Different File*: Try uploading a different file to see if the issue is specific to the file or the SFTP Flow action step.

API Endpoint
The error message mentions the `/api/now/v1/attachment/file` endpoint. Ensure this endpoint is correctly configured and accessible.

If none of these steps resolve the issue, please provide more details about your SFTP Flow action step configuration and the ServiceNow setup for further assistanceThe error code 40 typically indicates a "Payload content type is not supported" or "Invalid file type" error in ServiceNow.

Possible Causes
1. *File Type*: The file type being uploaded might not be supported or correctly identified by ServiceNow.
2. *File Size*: The file size might be exceeding the maximum allowed limit.
3. *Attachment Configuration*: The attachment configuration in ServiceNow might not be set up correctly.

Debugging Steps
1. *Verify File Type*: Check if the file type (CSV) is supported by ServiceNow and if the file is not corrupted.
2. *Check File Size*: Ensure the file size is within the allowed limit.
3. *Attachment Configuration*: Review the attachment configuration in ServiceNow to ensure it's set up correctly.

SFTP Flow Action Step Configuration
1. *File Path*: Verify the file path in the SFTP Flow action step is correct.
2. *File Name*: Ensure the file name is correctly specified and matches the file being uploaded.

Additional Troubleshooting
1. *Check ServiceNow Logs*: Review the ServiceNow logs for more detailed error messages.
2. *Test with a Different File*: Try uploading a different file to see if the issue is specific to the file or the SFTP Flow action step.

API Endpoint
The error message mentions the `/api/now/v1/attachment/file` endpoint. Ensure this endpoint is correctly configured and accessible.

If none of these steps resolve the issue, please provide more details about your SFTP Flow action step configuration and the ServiceNow setup for further assistance.

 

If you find this answer helpful please do mark it as helpful and accept the solution 

 

Thanks,

Abin