generated from mintlify/starter
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Webhook egress * Update webhook.mdx * Update webhook.mdx
- Loading branch information
1 parent
d88e980
commit 9459b72
Showing
2 changed files
with
65 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
--- | ||
title: "@flatfile/plugin-webhook-egress" | ||
description: "A plugin for egressing data from a Flatfile Workbook to a webhook." | ||
icon: "download" | ||
--- | ||
|
||
<CardGroup cols={1}> | ||
<Card title="@flatfile/plugin-webhook-egress" icon="download"> | ||
<br /> | ||
The `@flatfile/plugin-webhook-egress` plugin egresses Flatfile Workbooks to a | ||
webhook. | ||
<br /> | ||
<br /> | ||
**Event Type:** | ||
<br /> | ||
`listener.on('{jobParam}')` (i.e. `listener.on('workbook:submitActionFg')`) | ||
</Card> | ||
</CardGroup> | ||
|
||
## Parameters | ||
|
||
<ParamField path="job" type="string" required> | ||
The `job` parameter takes the job name. | ||
</ParamField> | ||
|
||
<ParamField path="webhookUrl" type="string"> | ||
The `webhookUrl` parameter takes the webhook url. | ||
</ParamField> | ||
|
||
## Imported NPM Packages | ||
|
||
- [`@flatfile/[email protected]+`](https://www.npmjs.com/package/@flatfile/api) | ||
- [`@flatfile/[email protected]+`](https://www.npmjs.com/package/@flatfile/listener) | ||
- [`@flatfile/[email protected]+`](https://www.npmjs.com/package/@flatfile/plugin-job-handler) | ||
- [`@flatfile/[email protected]+`](https://www.npmjs.com/package/@flatfile/util-common) | ||
- [`[email protected]+`](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 | ||
|
||
<CardGroup cols={2}> | ||
<Card | ||
title="@flatfile/plugin-webhook-egress" | ||
href="https://github.com/FlatFilers/flatfile-plugins/tree/main/plugins/webhook-egress" | ||
icon="github" | ||
></Card> | ||
</CardGroup> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters