Dialog Username to PlayerHead help

I'm trying to make a datapack that gives the player a PlayerHead of whoever they type but it isn't working (im extremely new to making datapacks so any help at all is appreciated!) Code: { "type": "minecraft:multi_action", "title": "Player Head Giver", "body": [ { "type": "plain_message", "contents": "Enter the player name to get their head." } ], "inputs": [ { "type": "minecraft:text", "key": "username", "label": "Player Name:" } ], "actions": [ { "type": "run_command", "label": { "text": "Spawn Head" }, "command": "give @s player_head{profile = ['$(username)']}" }, { "type": "close", "label": { "text": "Cancel" } } ] }
Continue to help post