Socket
Socket
Sign inDemoInstall

ifttt-webhooks-channel

Package Overview
Dependencies
0
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

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


Version published
Maintainers
1
Install size
4.85 kB
Created

Readme

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

FAQs

Last updated on 05 Jul 2023

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc