8000 GitHub - jcksncllwy/formation: Moves Typeform data into MongoDB
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

jcksncllwy/formation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

███████╗ ██████╗ ██████╗ ███╗   ███╗ █████╗ ████████╗██╗ ██████╗ ███╗   ██╗
██╔════╝██╔═══██╗██╔══██╗████╗ ████║██╔══██╗╚══██╔══╝██║██╔═══██╗████╗  ██║
█████╗  ██║   ██║██████╔╝██╔████╔██║███████║   ██║   ██║██║   ██║██╔██╗ ██║
██╔══╝  ██║   ██║██╔══██╗██║╚██╔╝██║██╔══██║   ██║   ██║██║   ██║██║╚██╗██║
██║     ╚██████╔╝██║  ██║██║ ╚═╝ ██║██║  ██║   ██║   ██║╚██████╔╝██║ ╚████║
╚═╝      ╚═════╝ ╚═╝  ╚═╝╚═╝     ╚═╝╚═╝  ╚═╝   ╚═╝   ╚═╝ ╚═════╝ ╚═╝  ╚═══╝

Formation is a command-line tool that transports data from completed Typeforms into a MongoDB database. When run, Formation will check the last time it was executed and ask Typeform for any forms that have been completed since then. This makes Formation ideal for usage with crontab or another scheduler to get regular updates.

Typeform's JSON format is super convenient for MongoDB storage, and can be inserted with minimal transformation. For the sake of database optimization, responses are stored in a separate collection, instead of an internal array within the form document.

Since a Typeform's questions can be changed, a new form document is saved for each poll. The responses gathered during each poll are saved with the MongoDB _id of the form they came with. In this way, responses to questions that have been changed on the Typeform can still be mapped to the original question.

Typeform and MongoDB info is passed in via command line like so:


node formation.js --mongouri            "localhost:27017/formation"
                  --sysCollection       "formationOps"
                  --formsCollection     "forms"
                  --responseCollection  "responses"
                  --typeformUID         "abc123doremi"
                  --typeformKey         "quickbrownfox"

Formation is the formalized version of software I wrote as a sub-contractor for my friend Bjorn. The original repo and commit history can be viewed here: https://github.com/bjorncooley/mongo-analytics.

About

Moves Typeform data into MongoDB

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0