'doing a task after a looping YAML template-ized azure devOps pipeline

I have a YAML Azure DevOps pipeline that loops through series of configurations, copying artifacts to various places. What I want to do is, after the looping is done, to do something else (I'd like to send an email, but the question is more general than that).

But I can't insert anything after the looping part of the YAML, at least not with any of the experiments I've tried. Here's the YAML that calls the YAML template, with a comment for where I'd like to do another step. How might I do this?

parameters: 
  - name: configuration
    type: object
    default: 
    - Texas
    - Japan
    - Russia
    - Spaghetti
    - Philosophy
      
trigger: 
  - dev
  - master

resources: 
  repositories:
  - repository: templates
    name:  BuildTemplates
    type: git

stages:  
  - ${{ each configuration in parameters.configuration }}: 
    - template: build.yml@templates
      parameters: 
        configuration: ${{ configuration }}
        appName: all

 # Where I'd like to have another task or job or step or stage that can send an email or perhaps other things


Solution 1:[1]

Just define a new stage:

stages:  
  - ${{ each configuration in parameters.configuration }}: 
    - template: build.yml@templates
      parameters: 
        configuration: ${{ configuration }}
        appName: all

  - stage: secondStage
    jobs:
      - job: jobOne
        steps:
          - task: PowerShell@2

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Vince Bowdren