Adding to Esteban's response.
If you need more than one variable in your task, you can avoid using Content variable, and use the variables mappings of the task node.
When you execute the code Esteban posted, you will receive a map with these variables.
Regards,
Demian