GithubHelp home page GithubHelp logo

formio-webhook-receiver's Introduction

Form.IO webhook receiver

This application serves as an example webhook receiver for the https://form.io platform.

Setup

First, download this application, and then run the following.

npm install

You can then run the example server by typing the following

npm run start:basic

or

npm run start:validation

Using with NGROK

You can test this locally by using this along with a utility called NGROK. Follow the instructions @ https://ngrok.com/download to download and get started to create a localhost tunnel. You can create a public tunnel to your locally running receiver by typing the following command.

ngrok http 4001

This will connect to your webhook receiver and provide a public URL to access it.

Version                       2.1.14
Region                        United States (us) 
Web Interface                 http://127.0.0.1:4040 
Forwarding                    http://b68934c2.ngrok.io -> localhost:4001
Forwarding                    https://b68934c2.ngrok.io -> localhost:4001

This tells me that I am now able to connect to my locally running Webhook receiver by navigating to http://b68934c2.ngrok.io. I can now use this within my Webhook Action settings @ Form.io.

Form.IO Setup.

Create an application and a form within the https://form.io platform. Click on Actions, and then add a new Webhook action. Then configure the webhook action to point to your server with the following configurations. Your settings should look like the following.

  • username: test
  • password: password123

Alt text

formio-webhook-receiver's People

Contributors

travist avatar yuryrybaksoftensity avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

formio-webhook-receiver's Issues

Setup Fails

Link to this GitHub from https://help.form.io/developer/libraries/ is broken.

Setup Fails

C:\o\OB\R\Samples\formio-webhook-receiver>npm install
npm WARN package.json [email protected] No repository field.
npm WARN engine [email protected]: wanted: {"node":">=6"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=6"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=6.10.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":"^6.14.0 || ^8.10.0 || >=9.10.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">= 4.5.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">= 4"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">= 4.0.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">= 4.0.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4.8"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=6"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=6.0.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=6.0.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=6.0.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">= 4"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=6.0.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=6"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=6.5.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=6"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=6"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=6"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=6"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=6"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=6"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=6"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=6"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=6"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
[email protected] node_modules\dotenv

[email protected] node_modules\eslint-config-formio

[email protected] node_modules\basic-auth
└── [email protected]

[email protected] node_modules\method-override
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected] ([email protected])

[email protected] node_modules\aws-serverless-express
├── [email protected]
└── [email protected] ([email protected], [email protected])

[email protected] node_modules\express
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected])
└── [email protected] ([email protected], [email protected])

[email protected] node_modules\body-parser
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected]
├── [email protected] ([email protected], [email protected])
└── [email protected] ([email protected])

[email protected] node_modules\lodash

[email protected] node_modules\claudia
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])

[email protected] node_modules\eslint
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
├── @babel/[email protected] (@babel/[email protected])
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected]
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])

C:\o\OB\R\Samples\formio-webhook-receiver>npm run start:basic

[email protected] start:basic C:\o\OB\R\Samples\formio-webhook-receiver
node basic

C:\o\OB\R\Samples\formio-webhook-receiver\basic\index.js:5
const app = require('./server');
^^^^^
SyntaxError: Use of const in strict mode.
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3

npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files (x86)\nodejs\\node.exe" "C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "run" "start:basic"
npm ERR! node v0.12.2
npm ERR! npm v2.7.4
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start:basic: node basic
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start:basic script 'node basic'.
npm ERR! This is most likely a problem with the formio-webhook-receiver package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node basic
npm ERR! You can get their info via:
npm ERR! npm owner ls formio-webhook-receiver
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\o\OB\R\Samples\formio-webhook-receiver\npm-debug.log

C:\o\OB\R\Samples\formio-webhook-receiver>npm run start:validation

[email protected] start:validation C:\o\OB\R\Samples\formio-webhook-receiver
node validation

C:\o\OB\R\Samples\formio-webhook-receiver\validation\index.js:5
const app = require('./server');
^^^^^
SyntaxError: Use of const in strict mode.
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3

npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files (x86)\nodejs\\node.exe" "C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "run" "start:validation"
npm ERR! node v0.12.2
npm ERR! npm v2.7.4
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start:validation: node validation
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start:validation script 'node validation'.
npm ERR! This is most likely a problem with the formio-webhook-receiver package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node validation
npm ERR! You can get their info via:
npm ERR! npm owner ls formio-webhook-receiver
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\o\OB\R\Samples\formio-webhook-receiver\npm-debug.log

C:\o\OB\R\Samples\formio-webhook-receiver>npm owner ls formio-webhook-receiver
npm ERR! owner ls Couldn't get owner data formio-webhook-receiver
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files (x86)\nodejs\\node.exe" "C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "owner" "ls" "formio-webhook-receiver"
npm ERR! node v0.12.2
npm ERR! npm v2.7.4
npm ERR! code E404

npm ERR! 404 Not found : formio-webhook-receiver
npm ERR! 404
npm ERR! 404 'formio-webhook-receiver' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! Please include the following file with any support request:
npm ERR! C:\o\OB\R\Samples\formio-webhook-receiver\npm-debug.log

C:\o\OB\R\Samples\formio-webhook-receiver>

502 Bad Gateway

I am getting a 502 Gateway when following the instructions.

Here are some of the details:

npm install
npm WARN [email protected] No repository field.

added 269 packages from 282 contributors and audited 717 packages in 3.139s
found 19 vulnerabilities (4 low, 3 moderate, 11 high, 1 critical)
  run `npm audit fix` to fix them, or `npm audit` for details
peterdunham@Peters-MacBook-Pro formio-webhook-receiver % node basic     
Basic Webhook Receiver running on undefined

Is "running on undefined" correct?

Then:

peterdunham@Peters-MacBook-Pro ~ % ./ngrok http 4001

ngrok by @inconshreveable                                       (Ctrl+C to quit)
                                                                                
Session Status                online                                            
Session Expires               7 hours, 53 minutes                               
Version                       2.3.35                                            
Region                        United States (us)                                
Web Interface                 http://127.0.0.1:4040                             
Forwarding                    http://d457a788.ngrok.io -> http://localhost:4001 
Forwarding                    https://d457a788.ngrok.io -> http://localhost:4001
                                                                                
Connections                   ttl     opn     rt1     rt5     p50     p90       
                              1       0       0.00    0.00    0.00    0.00      
                                                                                
HTTP Requests                                                                   
-------------                                                                   
                                                                                
GET /                          502 Bad Gateway   

Here is my webhook from GUI - I have tried a POST and a GET with same result

Screenshot 2020-04-15 22 56 29

Any help is greatly appreciated

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.