I'm trying to write an attachment from an email to OneDrive and it keeps erroring with
Solved! Go to Solution.
I found the problem - it was not related to the content or the content-type; the resolution was to use the 'picker' to select the file location instead of the 'shared link' to the folder location; this removed the protocol and some of the root path information and put it directly into onedrive -- I've only tested it once, so don't know if it'll keep running, but the file path value appears to have been the issue.
Can you show what you are using when you create the file in OneDrive? The JSON for the file content should include $Content and $Content-Type.
The $content-type value isn't always application/octet-stream. There are specific content-types for different types of files.
These are currently all PDF files I’m trying to save from email so I can then take the next automated step- so I presume in this case the content type will be the same. Does the content type have anything to do with the error?
Or does the fact that I’m using my account to do this and there is MFA on it cause this?
The error you are getting is because the $content-type isn't in the file contents you are using to create the file. The file Contents field when creating a file should have both a $content-type value and a $content value. In your flow you only have a $content value.
not sure I'm following because the result has both a content type and content :
I found the problem - it was not related to the content or the content-type; the resolution was to use the 'picker' to select the file location instead of the 'shared link' to the folder location; this removed the protocol and some of the root path information and put it directly into onedrive -- I've only tested it once, so don't know if it'll keep running, but the file path value appears to have been the issue.
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |