Relating entries to assets within an ElementAction
So it seems what I was doing wrong was passing in a single $artistId rather than an array. With the change shown below it works as expected:

foreach ($assets as $asset)
{
    $artistFieldModel = craft()-&gt;fields-&gt;getFieldByHandle('artist');
    craft()-&gt;relations-&gt;saveRelations($artistFieldModel, $asset, [$artistId]);
}