I don't use NewRelic, so I can't really test it, but that error your getting in your long hand version indicates you need to use a subexpression for that value:
"deployment[revision]"= "$($OctopusParameters['Octopus.Release.Number'])"
If the release number is already as string, you might get by with just:
"deployment[revision]" = $OctopusParameters['Octopus.Release.Number']