Skip to main content

[New Integration] Advanced Utilities


ikbelkirasan
Forum|alt.badge.img+12

Hey everyone,

I would like to share a custom Zapier integration I built to solve a few problems. The integration provides the following action steps. I hope you find it helpful. :)

---

Run JavaScript Code: This is kind of a clone of the regular Code Step. Nothing fancy, it just comes with some useful tools available in the global scope. It also supports modern JavaScript async/await.

The global scope includes the following utilities:

  • moment: The well-known moment.js library that helps when dealing with date/time.
  • _: Lodash library that makes it easier to work with objects and arrays.
  • JSON: this replaces the built-in JSON.parse function with the more advanced JSON5 library.
  • toCSV: A function that converts an object to CSV.

 

---

Export to CSV: This action makes it easy to convert JSON data or line items to a CSV string or file.

 

---

If you’re interested in trying it, here’s the invite link: https://zapier.com/developer/public-invite/112461/039174f595539444ce5c14e114c1dc1e/

 

Known issues:

  • The code field in Run JavaScript Code action doesn’t highlight code.

Feel free to report any other issues and let me know if you there’s any other library that you wish you could use in a Code Step.

Did this topic help you find an answer to your question?
64% found this helpful

39 replies

AndrewJDavison_Luhhu
Forum|alt.badge.img+10

Really cool stuff @ikbelkirasan!


ikbelkirasan
Forum|alt.badge.img+12
  • Author
  • Zapier Expert
  • 555 replies
  • July 23, 2020

nicksimard
Forum|alt.badge.img+11
  • Zapier Staff
  • 2115 replies
  • July 23, 2020

This is awesome, @ikbelkirasan! Thanks for creating this and sharing with the Community!


ikbelkirasan
Forum|alt.badge.img+12
  • Author
  • Zapier Expert
  • 555 replies
  • July 23, 2020

Thank you @nicksimard ! :D


Liz_Roberts
Forum|alt.badge.img+8
  • Zapier Staff
  • 1366 replies
  • July 24, 2020

Amazing- thanks for sharing @ikbelkirasan !!:clap_tone3:


ikbelkirasan
Forum|alt.badge.img+12
  • Author
  • Zapier Expert
  • 555 replies
  • July 24, 2020

Thank you @Liz_Roberts  :D


  • New
  • 1 reply
  • July 31, 2020

Hi there.  

I tried the link, but I can’t find it after I get redirected.  Is this still available?

Thanks buddy!


AndrewJDavison_Luhhu
Forum|alt.badge.img+10

@Jimwinner 

If you’re building a zap and you can’t find the app in the app selector dropdown, this is a known issue.

Refresh the page and the app should magically appear in the dropdown.


  • New
  • 1 reply
  • August 4, 2020

Is this safe to use. What happens when I accept the invite? 


andywingrave
Forum|alt.badge.img+9
  • Zapier Expert
  • 854 replies
  • August 5, 2020

Amazing stuff @ikbelkirasan 


ikbelkirasan
Forum|alt.badge.img+12
  • Author
  • Zapier Expert
  • 555 replies
  • August 5, 2020

Thanks @andywingrave :)

@CreekFire - Yes, it’s safe to use this integration. When you accept the invite, this integration will be added to your available integrations menu.


Forum|alt.badge.img
  • New
  • 11 replies
  • September 18, 2020

I have data that looks like this:

[{"Product":"8 \"","Quantity":"2","Flavour":"B Choc"},{"Product":"10\"","Quantity":"1","Flavour":"Lemon"},{"Product":"10\"","Quantity":"1","Flavour":"Vanilla"},{"Product":"12\"","Quantity":"2","Flavour":"Carrot"}]

It can be a variable size, this one happens to have 4 entries.

What I need is this:

Product: 8",10",10",12"

Quantity: 2,1,1,2

Flavour: B Choc,Lemon,Vanilla, Carrot

 

Can Export CSV do this?


Forum|alt.badge.img
  • New
  • 11 replies
  • September 19, 2020

It did this very well. I just need it the other way around.

 


  • Beginner
  • 7 replies
  • November 11, 2020
chrisboat wrote:

It did this very well. I just need it the other way around.

 

@ikbelkirasan I second this… I’m looking for something to Convert CSV to JSON (need it to Execute JSON API Requests - Typically I can use Webhooks by zapier ‘Form’, but not when it’s a nested request)


ikbelkirasan
Forum|alt.badge.img+12
  • Author
  • Zapier Expert
  • 555 replies
  • November 11, 2020

Hi @chrisboat and @eden - I’m going to add a CSV to JSON feature in the next few days. 


  • Beginner
  • 7 replies
  • November 11, 2020

@ikbelkirasan  Awesome!

I’m a bit of a newb - I’m wondering how it would work with Nested JSON to execute nested JSON requests


ikbelkirasan
Forum|alt.badge.img+12
  • Author
  • Zapier Expert
  • 555 replies
  • November 11, 2020

@eden - Could you show me an example CSV and the expected JSON output so I can be sure we’re on the same page? Thanks!


  • Beginner
  • 7 replies
  • November 11, 2020

@ikbelkirasan  I’m trying to create multiple subtasks in Asana from a google sheet which will list the subtasks and submit them via an Asana Batch API Request 

Thanks!


jphorn
Forum|alt.badge.img+1
  • Builder
  • 23 replies
  • November 18, 2020

Thanks for the great add-on!


Thanks for the effort!  Advanced Utilities is exciting to me because of the CSV functionality!  However, the invite link seems to be broken and although it shows up in Zapier, it still says Invite Only .  Any ideas?


ikbelkirasan
Forum|alt.badge.img+12
  • Author
  • Zapier Expert
  • 555 replies
  • November 25, 2020

Hi @gootecks@crosscounter.tv - Can you show me a screenshot of what you’re seeing? Advanced Utilities is currently a private app so you’ll need to open the invite link to have access to it. Once done, refresh the page and you’ll be able to select it in your zap. Make sure you don’t use it as the first step because it doesn’t have any triggers.


  • New
  • 1 reply
  • December 2, 2020

Hi @ikbelkirasan 

 

Thanks for this awesome add-on.

However, I’m getting an error when exporting to CSV File using a specific JSON input:

 

Got 400 - <?xml version="1.0" encoding="UTF-8"?><Error><Code>MalformedPOSTRequest</Code><Message>The body of your POST request is not well-formed multipart/form-data.</Message><RequestId>9A94538C0DA3B304</RequestId><HostId>7+t+SBjyWOQcFRbibJsu50paYNl6ajNu30KMcNquQ55VW+y9uVYewwcZLMC4Ckpyg1hNuEenym0=</HostId></Error>

 

My first suspicion was whether the JSON string was broken or had special characters, but I confirmed it’s valid and your add-on actually is able to generate a CSV string as output using that same JSON input. It’s only when I select the File output that I get the above error.

 

Another specific detail about this JSON payload is that it’s considerably bigger than the rest of the payloads I tried so far. If I generate a CSV string output and I save it as txt, the file is around 450KB.

 

Any help would be really appreciated.

 

Thanks again!

 

 

 


Troy Tessalone
Forum|alt.badge.img+14

@ikbelkirasan 

Just found this!

Zapier needs more of these handy type of utilities as apps.

Thanks a bunch!


Troy Tessalone
Forum|alt.badge.img+14

@ikbelkirasan 

Thought: Include the links to the reference articles for Moment.js, etc. as part of the Zap steps for easier access and reference.


Could you possibly provide a bit more guidance around the second step of converting to a CSV?

Sorry am very new to this so wondering where your line items have come from in the example and how the previous step fits into this one?

Thank you