For anyone stumbling across this post who uses PowerShell, I've created a similar script based on the good work by MartinLL above. The script is slightly different as it retrieves an existing payload template that you have in the Meraki dashboard and creates a new one based off this that is org-wide. Link to script here.
... View more