I got a little stuck the other day trying to upload files from Power Automate to a “file” filed in Dataverse – it turned out all the functionality was there, I was simply looking in the wrong place.
CDS (current environment) connector has a couple of special actions to work with the file/image attributes:
This might be a little confusing at first, since, when trying to use “Update” action, File/Image attributes don’t even show up:
And those are the only attributes that show up for the 2 actions above:
So, well, don’t make the same mistake as I did trying to update File attributes through the regular Update action.
That begs a question of why would I need File attribute if I can use Sharepoint, and, to be fair, there is no definitive answer, but there are a cuople of considerations:
- Unlike files in Sharepoint, files and images stored in File/Image attributes are protected by the standard Dataverse security model (including field security if needed)
- Files stored in Sharepoint (through the out of the box integration) are not structured at all – that’s just a bunch of files associated with the Dataverse record. With the actual table columns in Dataverse, we (and the users) would know for sure what kind of file is stored in which attribute.
Those are, probably, the main two reasons.
Of course we are using file storage instead of Sharepoint storage, so the costs can be different, and that’s, also, something to keep in mind.
However, those would be project-specific decisions. And, as far as technology goes, just keep in mind Power Automate CDS (current environment) connector offers two separate actions specifically for File/Image columns.
One more thing to pay attention is that the file input/output parameters for CDS (or Dataverse) connectors use Base64 and the other connectors use binary and occasionally, base64toBinary() function is required to convert the type.
Thank you! This was my exact issue.