# ifttt-webhooks-channel

> Tiny package to trigger an IFTTT event using the webhooks channel

Latest version **2.0.0** (published 2023-07-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install ifttt-webhooks-channel
pnpm add ifttt-webhooks-channel
yarn add ifttt-webhooks-channel
bun add ifttt-webhooks-channel
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2023-07-05 |
| First published | 2019-07-29 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | jeroentvb |
| Maintainers | jeroentvb |
| Keywords | ifttt |

## Links

- npm: https://www.npmjs.com/package/ifttt-webhooks-channel
- Repository: https://github.com/jeroentvb/ifttt-webhooks-channel
- Homepage: https://github.com/jeroentvb/ifttt-webhooks-channel#readme
- Issues: https://github.com/jeroentvb/ifttt-webhooks-channel/issues
- npm.io page: https://npm.io/package/ifttt-webhooks-channel

## Recent versions

- 2.0.0 (latest) — 2023-07-05
- 1.1.7 — 2022-11-13
- 1.1.6 — 2022-01-21
- 1.1.5 — 2021-01-05
- 1.1.4 — 2020-09-12
- 1.1.3 — 2020-07-19
- 1.1.2 — 2020-03-23
- 1.1.1 — 2020-03-12
- 1.1.0 — 2019-12-04
- 1.0.3 — 2019-12-02
- 1.0.2 — 2019-11-24
- 1.0.1 — 2019-08-02
- 1.0.0 — 2019-07-29

## README

# ifttt-webhooks-channel
[![npm version](https://badge.fury.io/js/ifttt-webhooks-channel.svg)](https://badge.fury.io/js/ifttt-webhooks-channel)
[![Maintainability](https://api.codeclimate.com/v1/badges/fa4a732362265adfd7c5/maintainability)](https://codeclimate.com/github/jeroentvb/IFTTT-webhooks-channel/maintainability)  
Tiny package to trigger an IFTTT event using the [webhooks channel](https://ifttt.com/maker_webhooks)

## Table of contents
* [Installation](#installation)
* [Usage](#usage)
* [Methods](#methods)
  * [Post()](#post)
* [Example](#example)

## Installation
```sh
npm install ifttt-webhooks-channel
```

## Usage
```js
// Import the module in your project
import IFTTT from 'ifttt-webhooks-channel'

// Create a new IFTTT instance
const Ifttt = new IFTTT(key) // key is where your webhooks channel key goes
```

## Methods
A list of methods that `IFTTT` contains

### Post
Sends a post request to the webhooks channel to trigger an ifttt event.
```js
Ifttt.post(eventName, value)
  .then(res => console.log(res))
  .catch(err => console.error(err))
```

`eventName` is the name of the event you should have created on the webhooks channel.  
`value` should be an array containing at most 3 values. These can be used in the action you attatch to the event when it's triggered, e.g. a notification.

The function returns the response object if the post was succesful. If there was some kind of error it returns an error object.

## Example
```js
const IFTTT = require('ifttt-webhooks-channel')
const Ifttt = new IFTTT('your_webhooks_channel_key')

Ifttt.post('event_name', [
  'value 1',
  'item 2',
  'string 3'
])
  .then(res => console.log(res))
  .catch(err => console.error(err))
```

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