A reusable Power Platform snippet

Foreach (Topic)

This is a snippet that demonstrates how to do a foreach loop in Copilot Studio.

Copilot Studio
Preview PNG
Last updated
Aug 7, 2024
Category
Community snippet

From idea to implementation

Make it your own.

Check this snippet's prerequisites, permissions, and licensing before using it. The documentation below comes directly from the snippet README.

This is a snippet that demonstrates how to do a foreach loop in Copilot Studio.

Today, the foreach node isn't exposed in the UX and isn't documented. Using it is hence not formally supported for production use.

Authors

Snippet Author(s)
Foreach (Topic) Henry Jammes (@HenryJammes)

Minimal path to awesome

  1. Open a copilot in Copilot Studio

  2. Select Topics

  3. Select + Create

  4. Select Topic

  5. Select Create from blank

  6. Select the ... in the upper right corner and select Open code editor

  7. Click inside the code editor and CTL + A for Windows or Command-A for Mac to select all rows.

  8. Paste the contents of the YAML-file inside the code editor.

  9. Enter a Name for your Topic.

  10. Select Save

    View of foreach topic in edit mode

Disclaimer

THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.