Hi,
Thank you very much for pointing me in the right direction. I've solved the problem using the Compose component as you suggested. 
When receiving a message from the queue I run the following code to decode the message to a string:
"@base64tostring(triggerBody()?['ContentData'])"
The string can not be converted to a json-object since it contains to much information so I needed to take a substring from the first '{' to the last '}' (both included).
The index of the first '{' is found in a component called "FirstIndex" by:
"@indexof(base64tostring(triggerBody()?['ContentData']),'{')"
And the index of the last '}' is found in a component called "LastIndex" by:
"@lastindexof(base64tostring(triggerBody()?['ContentData']),'}')"
Putting it all together to get a string that can be parsed as a json object, we get:
"@substring(base64tostring(triggerBody()?['ContentData']),outputs('FirstIndex'), add(sub(outputs('LastIndex'),outputs('FirstIndex')),1))"
Then the individual parameters in the output from "SubString" can be accessed by:
"@json(outputs('SubString'))?.DeviceId" (where 'DeviceId' is the name of the parameter) in a component called "DeviceId". Then the device Id can be accessed by inserting the following in a field in the component for creating a record in Dynamics 365 for Operations:
"@outputs('DeviceId')"
The " " around the code MUST be included - otherwise it won't work (and yes, they're not visible when the flow has been saved).
All in all it looks like this: