Does anybody here have experience with C#.NET with Zapier?

  • 22 September 2019
  • 5 replies
  • 4105 views

Userlevel 3

Hello Zapier community! My name is Bob and I'm new to Zapier and extremely excited to have created my first zaps. I have to say- I'm loving what Zapier is all about.

What I am wondering is not so specific, more of a 'seeking general input' matter. If anybody here has 2 cents to share on anything I'm working on, I'd be thrilled to hear it.

I have a strong background in MySQL, I'm a 'Junior level' C# developer and I've been working on a sort of CRM/Inventory Management program for my business.

I was blown away to be able to integrate my MySQL database with Slack within minutes of signing up. Here is what I'm hoping to learn about, or even just discuss.

1) I can easily create C# apps that push data to MySQL which then triggers a zap when it detects a new row in my database. I am wondering if there are any fellow C# developers here that are using Zapier in conjunction with C# apps. I know that Zapier has JavaScript and Python integrations, but I'm wondering if Zapier has shown any love for the .NET world.

2) It seems that MySQL has a system for triggers where the query is run every 5 minutes to see if a new row has been added. Zaps be created that run when a stored procedure is called, or when an existing value is modified.

Slightly unrelated-

Do any of you happen to have any interesting use-cases regarding Zapier and MySQL that you'd be willing to share? I'm excited to hear from the community.



5 replies

Userlevel 4
Badge +1

Hi @BobBass, welcome to the Zapier community! This reminds me I'm overdue to provide my full introduction to the community. The short version is I'm a very long time C# developer and founder of Metagrate. We're Zapier Certified Experts.

For several years, we've specialized in data integration and synchronization via API's. While I had some familiarity with Zapier, it wasn't until I fully dug into it that I realized how beneficial Zapier is even in cases where there's no native Zapier integration. So in answer to your questions:

Zapier doesn't interact directly with any development environments, it manifests universal love to all those who send and/or accept API hugs -- I mean requests ;?) With the help of some NuGet packages, .NET can make those happen pretty easily. So how does Zapier has show love for the .NET world? Let us count the ways (well, 2 of them plus a bonus): 

1. If you prefer instant to five minutes, and most of us do (at least when it comes to Zaps)... using JSON.net, you can easily send a JSON object from your code and catch it with Webhooks by Zapier. (One thing to keep in mind, Zaps are simpler when the trigger sends a single object at a time as opposed to a collection.)

https://www.newtonsoft.com/json/help/html/SerializingJSON.htm#JsonConvert


2. It's more effort, but if you create a rudimentary API for your C# application, you can easily receive API requests from Zapier (e.g. POST via Webhooks by Zapier or Code by Zapier.)

https://docs.microsoft.com/en-us/aspnet/core/tutorials/first-web-api?view=aspnetcore-3.0&tabs=visual-studio


The bonus: When you can't be with the .NET you love, here's how to love the Node.js (JavaScript) you're with: 

JavaScript syntax is virtually identical to C#, and often times Code by Zapier is the best tool for the job. There are often situations that can be handled in a single Code by Zapier task that would require numerous tasks otherwise.

Another common thing we do is when a native Zapier integration is missing some required data (don't blame Zapier for that!) We retrieve that with an API call inside Code by Zapier, parse it with JavaScript, and return the output for use by a subsequent action.

It's just too bad you can't use the Visual Studio environment, right? Actually you can and you should! You can emulate Code by Zapier with a very similar experience to using C# in Visual Studio, including a debugger!

If there's interest, I'll post how to set up and debug to emulate Code by Zapier -- Run JavaScript in Visual Studio.

(and FWIW, this will really apply to coding and debugging Node.js no matter what the development environment you use. But if you need one, Visual Studio Code is great, free, lightweight and runs on Windows, Mac or Linux.)

Again, welcome Bob, hope this helps! Let me know if you have any questions.


Userlevel 3

@john_fohrman Thank you SO very much. What an exciting answer. If you ever do a tutorial or documentation on Zapier and Visual Studio, please keep me in mind. Your answer was so cool because it reinforces that I'll love Zapier as I dive into it more.

I appreciate the answer. Thank you.


Userlevel 4
Badge +1

@Bob Glad you found it helpful! I'll definitely keep you in mind ... I'll let you know when I post how to emulate Code by Zapier in Visual Studio soon. I've been super pleased by Zapier and hope you continue to be as well. Thank you and best wishes!



Userlevel 3

@Metagrate_John4man I wanted to stop by again and see if you made any progress towards documenting the VS emulation for Code by Zapier. I'm still very interested!


@Bob Thanks for this post. I’m a junior .NET developer now working on zapier integration for my job. It’s tough to know where to start. You mentioned that you have been able to create C# apps that trigger zaps. What is the process of that? Do you create an integration for your app with triggers/actions?

 

Thanks!

Reply