Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zapier integration #310

Open
8utl3r opened this issue Apr 25, 2019 · 6 comments
Open

Zapier integration #310

8utl3r opened this issue Apr 25, 2019 · 6 comments

Comments

@8utl3r
Copy link

8utl3r commented Apr 25, 2019

Hello again! I'm trying to use a zapier integration to add new items under my 'inbox' bullet every time a google spreadsheet row is added. This as a round about way of implementing gtd capture.

  1. IFTTT for 'add ______ to my inbox' to google assistant puts '_________' into a google spreadsheet.
  2. Zapier notices the new row and pulls '_________' and creates a new bullet under 'inbox'.

That's the idea anyways. I can't really get it to work. Where I am stuck is Zapier wants a path. The example they give is "foo/bar/here". I've done my best googling and tried to find somewhere to lookup on the firebase website what the file path could be. No luck. :( Is there a way to pull the file path from the firebase website? I'm at a loss here. If I can figure this out Vimflowy gains a huge amount of power though! :D

@WuTheFWasThat
Copy link
Owner

I'd be happy to help, but I'm not sure what you mean, here. What's the path it wants? Is Zapier trying to write to a local file? And you're running Vimflowy with the firebase backend I take it?

@8utl3r
Copy link
Author

8utl3r commented Apr 28, 2019

Sorry, I'm not really very good at any of this. :P I am running it with the firebase realtime database backend (not firestore).
So from what I understand Zapier has to access the firebase database. I gave it the keys and it says the connection checks out just fine. But then it has to know where to put the file to add the database record. So is there a file path I can give it? I tried combing through the github files but ended up hopelessly confused. To answer your question, I'm fairly certain that it is writing the actual firebase database, not anything local.

image

@WuTheFWasThat
Copy link
Owner

if I'm understand correctly (still a good chance I'm not...) you want Zapier to basically subscribe to pubsub from vimflowy through firebase?

ok, that path is not really a file path, i think, just a firebase data path. you can go to the firebase console to see what the paths look like.

I think there's a key called something like save:lastSave which will just cause Zapier to listen to any vimflowy change. you could also get more specific, by finding a row corresponding to what you care about and using a path something like save:${row}:line

@8utl3r
Copy link
Author

8utl3r commented Apr 29, 2019

I'm not sure what pubsub is. :/ But I think I can do a better job of explaining.

I want to be able to add stuff to vimflowy without having it open. Like if I am out and about and I realize I need eggs or I have to get my oil changed. I want to be able to add a line in a google spreadsheet and when Zapier sees the new line it will input the new 'item' into a section in Vimflowy labled "Inbox". I've got a variety of ways to input into google sheets including texting a number, telling google with a voice command, etc. The issue is Zapier just doesn't know where to input the new string. :(

A real world example would look like this:

  1. I talk to a friend who recommends a book called Scale (real book, really amazingly good. everyone should read it)
  2. I grab my phone and say "ok google, add 'Scale' to my inbox"
  3. Google, via IFTTT, adds string "Scale" to a new row in my google sheets doc.
  4. Zapier, upon checking, sees new row with string "Scale" and inserts the string into the firebase as a new database entry under the "inbox" bullet.
  5. Next time I'm at a computer I open up vimflowy, navigate to "inbox" and can see the item "Scale".

Using this you can push all kinds of things to vimflowy without having to have your computer with you.

Edit: the screen shot in above post is the information zapier is asking for in order to be able to place the string correctly. Everything is optional except for the string to be input and the 'path to the object's key'. I'm not entirely certain what an object key is or what the path could possibly be in this case. :(

Edit 2: These posts seem to be talking about it. Unfortunately, I cannot brain hard enough to understand them or their implications.
https://firebase.google.com/docs/reference/js/firebase.database.Reference#index
https://firebase.google.com/docs/database/web/read-and-write

@WuTheFWasThat
Copy link
Owner

WuTheFWasThat commented Apr 30, 2019

ah ok. this is 100% possible, with a vimflowy plugin

  1. I don't recommend having Zapier write to firebase in the vimflowy format directly. The vimflowy app could just read from Zapier and use the normal vimflowy API to add stuff (e.g. like sess.addBlocks(..)). you'll want to mark some special location so vimflowy knows where to add stuff, but your plugin can decide that
  2. If you really do want to use firebase for Zapier/vimflowy communication, just choose any path that Vimflowy normally would'nt look at. Then when vimflowy boots, it can just check that path and insert stuff into vimflowy using the normal API

@8utl3r
Copy link
Author

8utl3r commented May 6, 2019

ok, sorry for the slow response.

  1. I'm super happy it's possible!
  2. I'm not set on zapier honestly. If the API is built in I'd rather use that.
  3. All of this stuff is so far above my capability it's not even funny. :( I'd like to take a crack at it though. That's why my response took so long. I was trying to figure out where I would even start. I failed lol. So if you have any suggestions like "learn this first" or "go read this website" that would set me on a path to understanding what is going on that'd be super helpful. :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants