@Blaired79 what would really help us out would be if you could put a screen shot of your flow (blank our sensitive data) in the original post for this thread.
Also, I've done this previously, and remember it's a bit of toil and trouble.
@mahoneypat, I didn't want to say anything, but I remember Twilio being a right pain, the SMS data is buried in an array of data. Whilst Adding the Parse JSON will help, it might not obviously result in the data for Blaired, but I do think it's a valid solution.
Piecemeal Solution
@Blaired79 , without seeing your flow, you can try this. Assuming that your Twilio instance is firing at an HTTP trigger in flow, then place a Filter action after it, like so:

From:
@triggerBody()?['$formdata']
Condition:
@or(equals(item()?['key'], 'From'),equals(item()?['key'], 'Body'))
Getting the Data From The Filter
After this, I would unfortunately need my flow to be working (it isn't, because my Twilio lapsed) to get the rest. This said, looking at my old flow, I think each array entry is a part of the text data, there are more elegant ways to do this, but I made this before I knew them ... also ... will need to see your flow to apply the elegance anyway. 😉
Either way, run an Apply to each action, which should run twice for the two matching entries that the Filter actions creates.
Inside that, place a Switch action, that runs on the 'key' key (😩) value, and make two cases:
- Body - If the 'key' is Body, then it will set the smsBodyVAR variable.
- From - If the 'key' is From, then it will set the txtFromVAR variable.

After this Apply to each has run (which should be swift) then you'll have the values you need.