Flow.ai Webhook Example

by flow-ai

GitHub Readme.md

Flow.ai Node.js Webhook Broadcast Example

This example project is created using Nodejs and Express. It demonstrates an easy way to store subscribers and broadcast a message each day using a cron worker.

Prerequirements

Getting started

1. Deploy the webhook

2. Create flows

  • Go to the Flow.ai dashboard
  • Select flows and create a new flow
  • Add a text trigger with the text subscribe now
  • Drag and drop a new reply action and select the webhook action created in step 1. Enter as action OPTIN_DAILY_UPDATE
  • Add another new flow
  • Add an event trigger with the value SCHEDULED_DAILY_EVENT
  • Drag and drop a text reply below the trigger

3. Testing

  • Tryout the app and enter subscribe now. A new subscription will be created

4. Deploy to a channel

  • Deploy to a channel like Facebook Messenger and try the subscribe now
  • Add more training data and complete the flows by adding a unsubscribe flow

Deploy