Direct proof of use
The Spanish Air Force identifies its Airbus Helicopter AS332 Super Puma and AS532 Cougar fleet as a transport and search-and-rescue helicopter force assigned to Ala 48, including 803 Squadron. Its aircraft-history page states that 803 Squadron Super Puma helicopters were at the Herat Forward Support Base in Afghanistan under the International Security Assistance Force, carrying out limited CSAR, MEDEVAC, and SASEVAC missions.
A Spanish Air Force CIMA profile for Superpuma HD 21-12 gives a more specific aircraft-level record: the helicopter served with 803 Squadron, deployed on ISAF missions several times from 2005 to 2013, was hit by Kalashnikov fire near Siwashan on 9 July 2008 during a real night mission, and later suffered the accident that led to its retirement during a night MEDEVAC on 3 August 2012.
Sources: Spanish Air Force AS332 Super Puma and AS532 Cougar, Spanish Air Force Superpuma HD 21-12
Timeline
Spanish Air Force source material places the Super Puma/Cougar Afghanistan deployment inside the ISAF period rather than the later Resolute Support phase. The HD 21-12 aircraft profile gives the broad deployment window as 2005 to 2013, with two dated operational events: a small-arms-damage incident near Siwashan in July 2008 and a night MEDEVAC accident in August 2012.
The same HD 21-12 profile records 5,160 total flight hours and 226 MEDEVAC operations for that aircraft, while the fleet page describes the Herat detachment's mission set as limited CSAR, MEDEVAC, and SASEVAC.
Sources: Spanish Air Force AS332 Super Puma and AS532 Cougar, Spanish Air Force Superpuma HD 21-12
Narrative
In Afghanistan, the documented Spanish Super Puma/Cougar role was combat-support aviation rather than attack-helicopter employment. The Spanish Air Force lists the AS332 Super Puma and AS532 Cougar mission category as transport and SAR, and its Afghanistan entry ties the 803 Squadron detachment to personnel-recovery and evacuation tasks from Herat.
The available Spanish Air Force accounts support deployment, mission type, and aircraft-level exposure to hostile fire, but they do not identify offensive weapons use by the Super Puma/Cougar in Afghanistan. The sourced role for this conflict is therefore rotary-wing mobility, recovery, and medical evacuation support for ISAF.
Sources: Spanish Air Force AS332 Super Puma and AS532 Cougar, Spanish Air Force Superpuma HD 21-12