diff --git a/plugins/egress/webhook.mdx b/plugins/egress/webhook.mdx new file mode 100644 index 000000000..325e4bc5b --- /dev/null +++ b/plugins/egress/webhook.mdx @@ -0,0 +1,64 @@ +--- +title: "@flatfile/plugin-webhook-egress" +description: "A plugin for egressing data from a Flatfile Workbook to a webhook." +icon: "download" +--- + + + +
+ The `@flatfile/plugin-webhook-egress` plugin egresses Flatfile Workbooks to a + webhook. +
+
+ **Event Type:** +
+ `listener.on('{jobParam}')` (i.e. `listener.on('workbook:submitActionFg')`) +
+
+ +## Parameters + + + The `job` parameter takes the job name. + + + + The `webhookUrl` parameter takes the webhook url. + + +## Imported NPM Packages + +- [`@flatfile/api@1.5.14+`](https://www.npmjs.com/package/@flatfile/api) +- [`@flatfile/listener@0.3.15+`](https://www.npmjs.com/package/@flatfile/listener) +- [`@flatfile/plugin-job-handler@0.1.1+`](https://www.npmjs.com/package/@flatfile/plugin-job-handler) +- [`@flatfile/util-common@0.1.1+`](https://www.npmjs.com/package/@flatfile/util-common) +- [`axios@1.4.0+`](https://www.npmjs.com/package/axios) + +## Usage + +The `webhookEgress` plugin requires an operation parameter which specifies the event that will +initiate the egress. The webhook url can either be passed in as a parameter or set as an environment +variable `WEBHOOK_SITE_URL`. + +```SSH install +npm i @flatfile/plugin-webhook-egress +``` + +```ts import +import { webhookEgress } from "@flatfile/plugin-webhook-egress"; +``` + +```ts listener.js +listener.use(webhookEgress("workbook:submitActionFg")); +``` + +## See the code + + + + diff --git a/plugins/export/workbook.mdx b/plugins/export/workbook.mdx index 0f6210655..71fa53c42 100644 --- a/plugins/export/workbook.mdx +++ b/plugins/export/workbook.mdx @@ -73,7 +73,7 @@ listener.use(exportWorkbookPlugin());