Recently, I was directed to Zapier to get some lightweight integration done between systems for a quick proof of concept. Initially skeptical, I found that it really could save time and tie together all those pieces of your system you never got around to integrating.
Moreover, it is a way for people to integrate the applications they use without having to code or pay a developer to do it for you.
Going through the Zapbook, I found MongoDB, MySQL, Postgresql, SQL Server and gasp! no Neo4j. Sad.
I already had a potential use case which was to collect data via a form and get it into Neo4j ASAP i.e. no coding. Google Forms is available on Zapier, so I went about making Neo4j available as well. I’ve now got a first version zap ready for Neo4j which allows one to collect data triggered by another zap, and save it to Neo4j via a Cypher statement.
Here’s what it looks like. Using the Google Forms example, I’ve set up a form to capture feedback about a product and I want to push this data into Neo4j every time the form is submitted.
Step 1: Log into Zapier, click on Make a Zap!
Step 2: The triggering app is Google Docs, where we want to save data to Neo4j every time a form is filled i.e. the spreadsheet backing the form has a new row inserted.
The Neo4j zap currently supports only one action- Update the graph.
Step 3: Follow the instructions to make sure Zapier can access your Google Docs account
Step 4: Set up a Neo4j account. Call it whatever you like, supply the username, password and URL. Note that in this version, the assumption is that your Neo4j database is not left open to the world. I used the Authentication extension to set mine up.
Click on Continue and make sure Zapier confirms that it can indeed access your Neo4j database
Step 5: Select your spreadsheet and the Worksheet that contains the data. Here’s what my spreadsheet looks like-
Step 6: Write a Cypher query to convert that row into nodes and relationships. You must write a parameterized Cypher query in the Cypher Query field.
The Cypher Parameters must contain a comma separated list of the parameter names used in the query and the field selected from the triggering app (use the Insert Fields button).
Step 7: See what the trigger and action samples look like- then test it out and celebrate when it says Success!
I checked what my database looked like at this point and sure enough:
That’s all there is to it. Zapier will poll the triggering app every 15 minutes so by the time all your forms are filled, you have a Neo4j database filled with data!
I tried out the MongoDB->Neo4j and Trello->Neo4j integration and they worked well.
Whether you need a quick and dirty integration with Neo4j, or you want to collect data from other applications into Neo4j for later analysis, or you’re building a serious application, Zapier could be of use.
If you’d like to try it out, send @luannem a message and I’ll send you a beta invite.
And if you think this is useful, I’d be happy to hear about it and add more features to the Neo4j zap!
|Reference:||Integrate apps with Neo4j using Zapier from our JCG partner Luanne Misquitta at the Thought Bytes blog.|