For vars
setGlobal('Name',name);
Or strings
setGlobal('Name',"name");
var result = JSON.parse(local('input'));
setLocal('name',result.name);
setLocal('country',result.available_markets.join(','));
flashLong( local('name')+local('country'));
Make sure your input is correctly set, try using local variables.
So for example Set local, %input to %HTTPD before you run the scriptlet and if needed add some extra toasts in your scriplet to see what's happening.
If its still failing maybe post your XML so we can take a look.
<TaskerData sr="" dvi="1" tv="4.6b3m">
<Task sr="task165">
<cdate>1416137070215</cdate>
<edate>1416439552656</edate>
<id>165</id>
<nme>WebAPI</nme>
<pri>10</pri>
<Action sr="act0" ve="7">
<code>118</code>
<Str sr="arg0" ve="3">https://api.spotify.com</Str>
<Str sr="arg1" ve="3">v1/search</Str>
<Str sr="arg2" ve="3">q=drive
type=track</Str>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Int sr="arg5" val="10"/>
<Str sr="arg6" ve="3"/>
<Str sr="arg7" ve="3"/>
<Int sr="arg8" val="0"/>
</Action>
<Action sr="act1" ve="7">
<code>547</code>
<Str sr="arg0" ve="3">%Results</Str>
<Str sr="arg1" ve="3">%HTTPD</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act2" ve="7">
<code>547</code>
<Str sr="arg0" ve="3">%input</Str>
<Str sr="arg1" ve="3">%HTTPD</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act3" ve="7">
<code>129</code>
<Str sr="arg0" ve="3">var result = JSON.parse(local('input'));
setLocal('name',result.name);
setLocal('country',result.available_markets.join(','));
flashLong( local('name')+local('country'));</Str>
<Str sr="arg1" ve="3"/>
<Int sr="arg2" val="1"/>
<Int sr="arg3" val="45"/>
</Action>
<Action sr="act4" ve="7">
<code>548</code>
<Str sr="arg0" ve="3">%country</Str>
<Int sr="arg1" val="0"/>
</Action>
</Task>
</TaskerData>