🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

ifttt-webhooks-channel

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ifttt-webhooks-channel

Tiny package to trigger an IFTTT event using the webhooks channel

2.0.0
latest
Source
npm
Version published
Weekly downloads
31
63.16%
Maintainers
1
Weekly downloads
 
Created
Source

ifttt-webhooks-channel

npm version Maintainability
Tiny package to trigger an IFTTT event using the webhooks channel

Table of contents

Installation

npm install ifttt-webhooks-channel

Usage

// 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.

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

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))

Keywords

ifttt

FAQs

Package last updated on 05 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts