1.0.11 • Published 3 years ago

vf-to-ubf v1.0.11

Weekly downloads
178
License
AGPLv3
Repository
github
Last release
3 years ago

NPM

License: AGPL v3 Tests

What is this?

Take any Voiceflow file (.vf) and convert it into a universal bot format to make it easier for you to extract and build from a conversation diagram.

Documentation

The documentation for the vf-to-ubf can be found here.

Versions

Supported Node.js Versions

This package supports the following Node.js implementations:

  • Node.js 6
  • Node.js 8
  • Node.js 10
  • Node.js 12
  • Node.js 14

Installation

npm i vf-to-ubf

Sample Usage

const voiceflowToBotFormat require('vf-to-ubf');
var fs = require('fs');

diagram = fs.readFileSync("./VoiceflowFile.vf")

universal_format = await voiceflowToBotFormat(diagram)

Where diagram is your Voiceflow file in JSON format.

Format Example

A converted diagram would look something like this.

console.log(universal_format) 
->
{
   "project":{
      "name":"A Fantastic Project",
      "nodes":{
         "0cc175b9c0f1b6a831c399e269772661":{
            "type":"start",
            "next":"92eb5ffee6ae2fec3ad71c777531578f"
         },
         "92eb5ffee6ae2fec3ad71c777531578f":{
            "type":"speak",
            "content": "Do I like this package?",
            "next":"8277e0910d750195b448797616e091ad"
         },
         "8277e0910d750195b448797616e091ad":{
            "type":"interaction",
            "options":[
               {
                  "type":"yes",
                  "next": null
               },
               {
                  "type":"no",
                  "next": null
               }
            ]
         }
      }
   }
}
1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago