Get response of a public API sent to email or text message

Is there a way to get the response of a public API endpoint recurringly sent to me in an email or text message, lets say on an hourly basis? I have been using Postman to get responses manually a few times each day. But haven’t found a way to automate this simple use case. From what I’ve read in the docs it seems like Postman will only send you alerts for API request failures. Am I missing something? Is there a way to do this?

Thank you in advance. Working on a case involving getting number of items in stock for essential medical supplies.

Hello there,
What I understand from your question is you want to get some data from the public API and then you want to send that data to you via email or text message.
If this is the case, you can do it easily using postman monitors.

  1. First call the public API endpoint then store the required data in an env variable or global variable.
  2. Then create a new POST request in the same collection or folder, use the previously saved data and pass it to the body as raw JSON to a different API endpoint[Twilio API(to send SMS) or SendGrid API(to send emails].
  3. and then add postman monitors to your collection, so that you can automate this process and run it according to your requirement.

I have done something similar to do this before but using slack and sendgrip api, you can take a look over here

I hope this will help you
If you have any other questions, feel free to ask.
Best Regards,
Rishi Purwar

1 Like

Thank you Rishi! This sounds like exactly what I’m trying to achieve. Will try out the approach that you’ve described.

1 Like

One more thing is that you don’t need to use only these two api’s, you can use any API’s to send emails, but these are the most popular one’s.
Keep up the good work :+1:

1 Like

@thefierycoder can you please share your collection. The one you provided is not opening anymore

Hello @pargat83, Welcome to the Postman Community!

Please check out this collection.

I hope this will help you
If you have any other questions, feel free to ask.

Thanks,
Rishi

Thanks @thefierycoder. When i try to access this collection I’m getting permission error.

@pargat83 I made it public. Please check it now.

Rishi, not sure if you’re still active, however, on the SendGrid side of things I setup a Dynamic Template but it isn’t e-mailing the dynamic_template_data. Here is what is being passed along as the sendGridobj via POST (I’ve obfuscated the data somewhat):

{“personalizations”:[{“to”:[{“email":"test@test.com”,“name”:“Test”}],“dynamic_template_data”:{“0”:“Louisana”,“1”:“Michigan”,“2”:“California”,“3”:“Alabama”}}],“from”:{“email":"test@test.com”,“name”:“Test”},“template_id”:“d-d63e1xxxxxxxxxxxxxxxxx”}

The e-mail gets generated and it IS using the template. Within the template I have an HTML module that references {{ dynamic_template_data }}. Is that not correct? And ideally, is there a way to pass along the array within the object as single column table?

Thank You!