# SKU API Call send CSV file to email or one drive

**URL:** <https://community.postman.com/t/sku-api-call-send-csv-file-to-email-or-one-drive/50601>\
**Category:** Help Hub\
**Tags:** export\
**Created:** [August 15, 2023, 7:14pm UTC](https://community.postman.com/t/sku-api-call-send-csv-file-to-email-or-one-drive/50601 "2023-08-15T19:14:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnhritz](https://avatars.discourse-cdn.com/v4/letter/j/8491ac/32.png) [@johnhritz](https://community.postman.com/u/johnhritz)\
**Post date:** [August 15, 2023, 7:14pm UTC](https://community.postman.com/t/sku-api-call-send-csv-file-to-email-or-one-drive/50601/1 "2023-08-15T19:14:24Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![johnhritz](https://avatars.discourse-cdn.com/v4/letter/j/8491ac/32.png) [@johnhritz](https://community.postman.com/u/johnhritz)\
**Post date:** [August 15, 2023, 7:15pm UTC](https://community.postman.com/t/sku-api-call-send-csv-file-to-email-or-one-drive/50601/2 "2023-08-15T19:15:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![kevinc-postman](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/kevinc-postman/32/12774_2.png) [@kevinc-postman](https://community.postman.com/u/kevinc-postman)\
**Post date:** [August 15, 2023, 9:05pm UTC](https://community.postman.com/t/sku-api-call-send-csv-file-to-email-or-one-drive/50601/3 "2023-08-15T21:05:21Z")

</div>

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! 🙂

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [November 13, 2023, 9:06pm UTC](https://community.postman.com/t/sku-api-call-send-csv-file-to-email-or-one-drive/50601/4 "2023-11-13T21:06:17Z")

</div>

Closed on November 13, 2023, 9:06pm UTC

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