This already exists. Just use Set Variable and include the Variable token in the data field:
For more information, see the wiki Searching the Forum for Answers section.