admin管理员组

文章数量:1312782

I am using the DownloadAttachment action on the SharePoint Connector with the following default configuration:

{
  "RemoteFile": "/sites/xyz/Shared Documents/General/sharepoint-file.txt",
  "HasBytes": false
}

From the logs, I can see that the generated URL for the request is correct:

[11123|Q-Id] [HTTP|Req: 11490] GET (@v)/$value?@v='%2Fsites%2Fxyz%2FShared%20Documents%2FGeneral%2Fsharepoint-files.txt'

The request also successfully goes through, as seen in the logs:

[11123|Q-Id] [HTTP|Res: 11490] HTTP/1.1 200 OK, 3129 Bytes Transferred

The number of bytes matches the file size, and I can download the file manually using the URL in a browser. However, the integration fails to fetch the file, and no Content field is set in the response. The output of connectorOutputPayload() is:

[
  {
    "Success": "False"
  }
]

I expected connectorOutputPayload() to return the Content field with the file data, but it does not. There are no errors in the logs either.

What I Have Tried:

  • Verified that the file exists and is accessible via the generated URL.
  • Confirmed that the request completes successfully with a 200 OK response and the correct byte count.
  • Checked the browser download, which works fine.
  • Ensured that no additional permissions are required.

Questions:

  • Why is the Content field missing from connectorOutputPayload()?
  • Is there any additional configuration needed to properly retrieve the file content?
  • Could HasBytes: false be affecting the response?

Any insights would be greatly appreciated!

I am using the DownloadAttachment action on the SharePoint Connector with the following default configuration:

{
  "RemoteFile": "/sites/xyz/Shared Documents/General/sharepoint-file.txt",
  "HasBytes": false
}

From the logs, I can see that the generated URL for the request is correct:

[11123|Q-Id] [HTTP|Req: 11490] GET https://mydomain.sharepoint/sites/xyz/_api/web/GetFileByServerRelativeUrl(@v)/$value?@v='%2Fsites%2Fxyz%2FShared%20Documents%2FGeneral%2Fsharepoint-files.txt'

The request also successfully goes through, as seen in the logs:

[11123|Q-Id] [HTTP|Res: 11490] HTTP/1.1 200 OK, 3129 Bytes Transferred

The number of bytes matches the file size, and I can download the file manually using the URL in a browser. However, the integration fails to fetch the file, and no Content field is set in the response. The output of connectorOutputPayload() is:

[
  {
    "Success": "False"
  }
]

I expected connectorOutputPayload() to return the Content field with the file data, but it does not. There are no errors in the logs either.

What I Have Tried:

  • Verified that the file exists and is accessible via the generated URL.
  • Confirmed that the request completes successfully with a 200 OK response and the correct byte count.
  • Checked the browser download, which works fine.
  • Ensured that no additional permissions are required.

Questions:

  • Why is the Content field missing from connectorOutputPayload()?
  • Is there any additional configuration needed to properly retrieve the file content?
  • Could HasBytes: false be affecting the response?

Any insights would be greatly appreciated!

Share Improve this question edited Feb 1 at 8:00 Daniyal Khan 155 bronze badges asked Jan 31 at 20:04 KrisrettiwtKrisrettiwt 173 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Though text files are not generally considered binary files, you can still try to set the HasBytes:false into HasBytes:true to instruct the connector that it should treat the response as binary data and return it in the Content field, encoded as base64.z. Otherwise, you can eliminate the HasBytes:false as stated in to this example of downloading an attachment:

{
"RemoteFile": "/sites/xyz/Shared Documents/General/sharepoint-file.txt"
}

本文标签: google cloud platformSharePoint Connector DownloadAttachment Action Not Returning ContentStack Overflow