Skip to content

Latest commit

 

History

History
55 lines (36 loc) · 1.67 KB

README.md

File metadata and controls

55 lines (36 loc) · 1.67 KB

Flowifier Client Library for JavaScript

npm version install size

This library gives you a seemless integration of the Flowifier application into your code.

It allows you to:

  • List all workflows
  • Retrieving the workflow details of a specific workflow
  • Executing a workflow by creating a workflow instance
  • Retrieving the workflow instance status
  • Retrieving the workflow instance result if successful finished

Table of Contents

Usage

Retrieving all workflows

This example shows you how to list all workflows.

const accessToken = '<YOUR-ACCESS-TOKEN>';

const flowifier = new Flowifier(accessToken);

var workflows = await flowifier.getWorkflows();
console.log(workflows);

This example shows you how to list execute a workflow.

const accessToken = '<YOUR-ACCESS-TOKEN>';
const workflowId = '<YOUR-WORKFLOW-ID>';

const flowifier = new Flowifier(accessToken);

const context = {
    name: 'John Doe',
    age: 31
}

var workflowInstanceId = await flowifier.executeWorkflow(workflowId, context);
console.log('New Workflow Instance Id:'workflowInstanceId);

Installation

npm install @flowifier/flowifier-client