SKU API Call send CSV file to email or one drive

Can I set up a API call to automatically send me a csv file in email at a set time each week?

Maybe what I want to say is I want to send a CSV file of a response automatically to my email, is this possible

Hi @johnhritz !

Thanks for reaching out with your question. While you can schedule collection runs with a Postman Monitor or the Collection Runner, the ability to automatically send an email with a CSV attachment based on a Postman request isn’t built directly into Postman.

However, you can definitely achieve this with a combination of Postman’s features and external services.

Here’s a general outline of how you might accomplish this:

  1. Schedule your collection:
  • Set up a Postman Monitor or use the Collection Runner to run your collection at a desired frequency.
  1. Transform JSON to CSV in Postman:
  • In the “Tests” tab of your request, write a script to transform the JSON response into CSV format and save it in an environment variable.
  1. Use an email API to send the CSV:
  • Create a new request to an email API endpoint (e.g., SendGrid).
  • Set up the email API with the required headers and body, using the CSV data from your environment variable as the email attachment content.
  1. (Optional) Save to OneDrive:
  • Use Microsoft Flow to trigger on an HTTP request.
  • Configure Flow to save the provided content to OneDrive.

Hope this helps! :slight_smile:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.