A reusable Power Platform snippet

icanhazdadjoke - Fetch a random dad joke (Action with AI Generated Message)

This is a snippet that demonstrates how to use the icanhazdadjoke - fetch a random dad joke action in an action.

Copilot Studio
Preview PNG
Last updated
Jul 9, 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 use the icanhazdadjoke - fetch a random dad joke action in an action. It uses an AI generated message as an output.

A view of an example of the output of the action in the test pane in Microsoft Copilot Studio

Authors

Snippet Author(s)
icanhazdadjoke - Fetch a random dad joke (Action with AI Generated Message) Daniel Laskewitz (@laskewitz)

Minimal path to awesome

  1. Open a copilot in Copilot Studio

  2. Select Actions

  3. Select + Add an action

  4. Search for Fetch a random dad joke and select the Search button

  5. Select the Fetch a random dad joke action from the icanhazdadjoke (Independent Publisher) connector

  6. Scroll down a little and select Copilot author authentication under End user authentication

  7. Select Next

  8. Select Finish

  9. Select the icanhazdadjoke (Independent Publisher) - Fetch a random dad joke action in the list (select the name)

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

  11. Make sure to copy the name of the connection reference and keep it somewhere safe (you need it later)

    View of the code editor with a red line around the connection reference name

  12. Replace the code in the code editor with the contents of the YAML-file

  13. Replace { REPLACE-WITH-CONNECTION-REFERENCE-NAME } with the connection reference name you copied earlier

  14. Save the action

  15. Select Settings

  16. Select Generative AI

  17. Select Generative (preview) in the How should your copilot decide how to respond? section

  18. Select the Save button at the top

  19. Test out the action by using the Test copilot pane

    A view of an example of the output of the plugin action in the test pane in Microsoft Copilot Studio

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.