Best answer

Convert JSON to CSV and then send by email

  • 20 July 2020
  • 3 replies
  • 2922 views

Userlevel 1

Hi all, I am pretty new to Zapier and I am trying to figure out if this kind of workflow is possible:

 

  1. I have the end point of an API which I need to call and get a JSON as response
  2. I would like than to convert this JSON to a CSV
  3. I would like to email this CSV file

this should be a recurring task (daily) and possibly I need to pass to the step # 1 a date dynamically.

 

I hope my question is clear and thanks a lot in advance to anyone who could help me,

 

-Vinz

icon

Best answer by ikbelkirasan 23 July 2020, 21:30

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

3 replies

Userlevel 7
Badge +8

Hi all, I am pretty new to Zapier and I am trying to figure out if this kind of workflow is possible:

 

  1. I have the end point of an API which I need to call and get a JSON as response
  2. I would like than to convert this JSON to a CSV
  3. I would like to email this CSV file

this should be a recurring task (daily) and possibly I need to pass to the step # 1 a date dynamically.

 

I hope my question is clear and thanks a lot in advance to anyone who could help me,

 

-Vinz

 

Hi Vinz, thanks for being patient. One of our Zapier Experts, Andy had suggested the following:

You can do it with a webhook or code step. Code is possible to convert to a CSV - but would normally rely on libraries to do this - So it might be a big uplift for a zap. I’d recommend that they retrieve the data and populate a Google Sheet with the JSON response.

 

Please let us know if that helped or if you have any further questions. Thanks!

Userlevel 7
Badge +12

@Vinz - In addition to the answer above, I would like to share my new integration which might be helpful for you. You can read more about it here: 

 

Userlevel 7
Badge +3

Hi @Vinz ! Tim here from Zapier Support - I just wanted to add some more context in case you’re still working on this.

There isn’t currently a way in the public apps on Zapier to create a .CSV file itself, so @ikbelkirasan ‘s by-invite integration looks like a good option to be able to achieve that part of your workflow.

For the rest, I’d recommend using Schedule by Zapier as the Trigger, and probably Code by Zapier as the best option for doing the API call and exporting the JSON in the format you need to then pass it to the @ikbelkirasan ‘s Advanced Utilities CSV Action.

From there you’ll have a File object that can be attached to a Send Email action in various email apps like Gmail.