When embedding Flatfile, this plugin should be deployed in a server-side.

Parameters

url
string

The URL to send the webhook requests to. If not specified it will attempt to get the URL from your environment file. If not specified through either method it will fail.

callback
function

A callback to run after the request completes. If the callback returns data, it will be included in the job:outcome-acknowledged event generated by the request competion.

API Calls

  • api.events.create

Imported NPM Packages

Usage

For workflows which process Flatfile Events outside of the listener file, use the desired endpoint that the webhooks are to be sent to. For testing, use a basic webhook.site endpoint.

install
npm i @flatfile/plugin-webhook-event-forwarder
import { webhookEventForward } from "@flatfile/plugin-webhook-event-forwarder";
listener.ts
listener.use(
  webhookEventForward("https://webhook.site/yourwebhooksitehere", (data) => {
    //do stuff here
  })
);

See the code