Flow.ai Node.js Webhook example
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
assets
.gitignore
LICENSE
Procfile
README.md
app.json
index.js
package-lock.json
package.json

README.md

Flow.ai Node.js Webhook Example

Webhooks are an integration method of Flow.ai based on a we call you principle.

Getting started

1. Install Node.js

2. Clone this repo and install packages

git clone https://github.com/flow-ai/example-node-webhook.git
cd flowai-example-node-webhook
npm install

3. Run the webhook server

npm start

The server will run on http://localhost:3009 and print incoming webhooks.

4. Deploy online or fire up a ngrok tunnel

Deploy to heroku

Deploy

Run a local ngrok tunnel

ngrok http -subdomain=inconshreveable 80

This tells ngrok to tunnel all requests to https://inconshreveable.ngrok.com to your localhost:3009.

5. Configure your webhook

To get started, go the the Flow.ai dashboard and create a new webhook integration.

Enter the url of your webhook endpoint and press save.

6. Receive calls

Next, configure a flow with the design app that triggers an action. For the action select the webhook you just created.

That's really all it takes to start responding to webhook calls.

Further reading

Please view our webhook documentation for more info about the messages you receive and how to send messages back.