# alloy-sdk

> Run Alloy workflows from a nodejs server

Latest version **1.0.1** (published 2022-02-22) · ISC license · 0 weekly downloads

## Install

```sh
npm install alloy-sdk
pnpm add alloy-sdk
yarn add alloy-sdk
bun add alloy-sdk
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2022-02-22 |
| First published | 2021-03-10 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 3.4 KB |
| Known vulnerabilities | 0 (+24 in 2 direct dependencies) |
| Install scripts | no |
| Author | Alloy Automation Inc |
| Maintainers | cfresh |
| Keywords | automation |

## Links

- npm: https://www.npmjs.com/package/alloy-sdk
- Repository: https://github.com/alloy-automation/alloy-node-sdk
- Homepage: https://github.com/alloy-automation/alloy-node-sdk#readme
- Issues: https://github.com/alloy-automation/alloy-node-sdk/issues
- npm.io page: https://npm.io/package/alloy-sdk

## Dependencies (2)

- [uuid](https://npm.io/package/uuid.md) ^8.3.2
- [axios](https://npm.io/package/axios.md) ^0.21.1

## Recent versions

- 1.0.1 (latest) — 2022-02-22
- 1.0.0 — 2021-03-10

## README

# alloy-sdk
This is a tiny wrapper that makes a POST request to run an Alloy workflow.

## Usage

```
import {runAlloy} from 'alloy-sdk';

...

await runAlloy({
  // You can find this on Step 4 of the Webhook block in your workflow
  workflowId : '<workflowId>',

  // required for authenticated workflows; found in Forge Settings
  apiKey: '<apiKey>',

  // each parameterName should match what you entered in the Parameter fields on the Webhook block
  data: {
    parameterName: 'Parameter Value'
  },

  // Set this flag to retrieve output from workflow
  returnExecutionData:true,
});
```

## Workflow Output

If the `returnExecutionData` option is set, then `runAlloy()` will return an array of all block output. Be aware that the `returnExecutionData` flag can add a significant amount of latency, since the function will have to wait for the workflow to finish running.

---
_Source: https://npm.io/package/alloy-sdk · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
