<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=612681139262614&amp;ev=PageView&amp;noscript=1">
Skip to content

Need help? Talk to an expert: phone(904) 638-5743

How to do a Basic HTTP Request with Power Automate

How to do a Basic HTTP Request with Power Automate

In this tutorial from Pragmatic Works, Jonathon Silva walks viewers through a beginner-friendly introduction to using the HTTP action within Power Automate. By leveraging the official Joke API from GitHub, Jonathon demonstrates how to fetch a random joke and send it to Microsoft Teams using a flow. This practical example not only showcases the HTTP action but also how to parse and utilize data returned from external APIs.

 

Use Case: Sending Dad Jokes to Teams

The main goal of the flow is to retrieve a random joke from the GitHub-hosted Joke API and post both the setup and punchline to a user’s Teams chat. The flow is triggered manually and requires the user to input an email address, which determines the Teams recipient.

Key Steps in the Flow

  1. Trigger Setup:
    The flow begins with a manual trigger using the new Power Automate Co-Pilot designer. Jonathon adds an Email input field to specify the Teams recipient.
  2. HTTP Action Configuration:
    The core action is the HTTP action (a premium connector). The request uses the GET method to call the Joke API URL, returning a random joke in JSON format.
  3. Testing the HTTP Request:
    Jonathon tests the flow with a sample email to confirm the connection works, verifying the status code, headers, and JSON body response.
  4. Parsing the JSON Response:
    Since the joke data is embedded in a JSON structure, the Parse JSON action is added. A sample payload is copied from the HTTP output and used to generate the schema.
  5. Posting to Teams (Step 1 - Setup):
    The first message sent to Teams contains the joke setup. Jonathon uses the "Post message in a chat or channel" action and selects "Flow bot" to deliver the message.
  6. Delay Action:
    A short 5-second Delay action is inserted to create a pause between the setup and punchline messages.
  7. Posting to Teams (Step 2 - Punchline):
    A second message is configured using the same post action, this time delivering the punchline from the parsed JSON body.

Important Notes

  • This demo uses a premium connector—make sure your Power Automate plan supports HTTP actions.
  • The Parse JSON action is crucial for extracting individual fields (e.g., setup and punchline) from the API response.
  • Jonathon uses Flow Bot for Teams communication, but you could also opt to post as the user.
  • Future improvements may include automatic retries, error handling, or richer formatting in the Teams messages.

Final Test and Result

After assembling the flow, Jonathon tests it by sending the request to Teams. The result? A quick icebreaker joke—“How do you make a tissue dance? Put a little boogie in it.” This confirms the flow is functioning correctly, retrieving external data and delivering it to Microsoft Teams with ease.

Conclusion

This video illustrates how approachable HTTP requests in Power Automate can be. By combining basic API integration with flow actions like Parse JSON and Teams messaging, users can build powerful workflows even with light programming knowledge. As Jonathon emphasizes, all it takes is knowing the endpoint, what data you’re retrieving, and how you want to use it.

 

Don't forget to check out the Pragmatic Works' on-demand learning platform for more insightful content and training sessions on Power Automate and other Microsoft applications. Be sure to subscribe to the Pragmatic Works YouTube channel to stay up-to-date on the latest tips and tricks. 

Sign-up now and get instant access

Leave a comment

Free Community Plan

On-demand learning

Most Recent

private training

Hackathons, enterprise training, virtual monitoring