npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@appflows/appflows

v1.1.7

Published

AppFlows is a low-code tool that helps you create smarter and more behavior-driven email automations for your product.

Downloads

10

Readme

AppFlows

AppFlows is a low-code tool that helps you create smarter and more behavior-driven email automations for your product.

Visit us here at https://dashboard.appflows.com to create an account!

Installing

Npm

npm i @appflows/appflows

Features

  • Hyper Personalization: Personalize user experience with behavior-driven targeted emails.
  • Real-time Messaging: Engage with your customers at the right time in the user journey.
  • User Data and Insights: Deep dive into data and see how your users are interacting with the app.

Setting up the Client

To set up the client, you will need your API_KEY and SITE_ID.

The SITE_ID will be assigned to you automatically while setting up the account. This id will be a numeric value. Moreover, you can also extract this value from the page url **_dashboard.appflows.com/sites/siteId***

For the API_KEY, you will be asked to manually generate this key while setting up your account. This will be an alpha-numeric string with hyphens in between.

Used along with the SITE_ID for communication, note and save the API_KEY in a secure place and share it with no one as it is confidential.

import { Client } from @appflows/appflows

const AppFlowsClient = new Client({
  apiKey: process.env.APPFLOWS_API_TOKEN
  siteId: process.env.APPFLOWS_SITE_ID
})

//You will now be able to call the methods provided @appflows/appflows package
//The following method will create a new user for you
AppFlowsClient.createContact({
  email: "[email protected]",
  list_id: 1024,
})

//export to use it throughout your code :)
export default AppFlowsClient

API Methods

You can use the following methods exposed for communicating the Appflows API

Contacts

The Contacts endpoint will help you manage your contacts. It provides the basic CRUD functionalities like create, get, update and delete.

createContact()

Params:
| Name | Type | Required | | ------ | ------ | ------ | | email | string | TRUE | | list_id | number | FALSE | custom_fields | object | FALSE

Response:

| Name | Type | Example | | ------------------- | ------ | ----------------------------------------------- | | site_id | number | 3581983 | | email | string | [email protected] | | list_id | number | 98391 | | created_at | string | 2022-06-22T06:55:54.192Z | | updated_at | string | 2022-06-22T06:55:54.192Z | | subscription_status | string | active, cold, unconfirmed, unsubscribed, failed | | unsubscribe_message | string | "Unsubscribed from the email" | | custom_fields | object | custom_fields: { "company": "XYZ Company" } |

getContact()

Params:
| Name | Type | Required | | ------ | ------ | ------ | | id | number | TRUE |

Response:

| Name | Type | Example | | ------------------- | ------ | ----------------------------------------------- | | site_id | number | 3581983 | | email | string | [email protected] | | list_id | number | 98391 | | created_at | string | 2022-06-22T06:55:54.192Z | | updated_at | string | 2022-06-22T06:55:54.192Z | | subscription_status | string | active, cold, unconfirmed, unsubscribed, failed | | unsubscribe_message | string | null | | custom_fields | object | custom_fields: { "first_name": "John" } |

updateContact()

Params:
| Name | Type | Required | | ------ | ------ | ------ | | email | string | TRUE | | list_id | number | FALSE | custom_fields | object | FALSE

Response:

| Name | Type | Example | | ------------------- | ------ | ----------------------------------------------- | | site_id | number | 3581983 | | email | string | [email protected] | | list_id | number | 98391 | | created_at | string | 2022-06-22T06:55:54.192Z | | updated_at | string | 2022-06-22T06:55:54.192Z | | subscription_status | string | active, cold, unconfirmed, unsubscribed, failed | | unsubscribe_message | string | null | | custom_fields | object | custom_fields: { "first_name": "Doe" } |

deleteContact()

Params:
| Name | Type | Required | | ------ | ------ | ------ | | email | string | TRUE |

Response:

| Name | Type | Value | | ------- | ------ | ------------------------------ | | message | string | "Contact deleted successfully" |

Events

The Events endpoint will allow you to trigger events for your contacts. Based on these events, you can send emails to these contacts and do multiple other actions using our Automation Builder.

logEvent()

Params:
| Name | Type | Required | | ------ | ------ | ------ | | name | string | TRUE | | contact.email | string | TRUE | | contact.list_id | number | FALSE | | contact.custom_fields | object | FALSE |

Response:

| Name | Type | Value | | ------- | ------- | ----------- | | success | boolean | true, false |

Default Custom Fields

By default, we provide the following custom fields. These can be used for storing custom data.

You can pass the custom_fields object body parameters while making a request as shown below,

{
  name: 'your_event_name',
  contact: {
    email: "[email protected]",
    list_id: 1024,
    custom_fields: {
      first_name: "John",
      last_name: "Doe",
      company: "John's Company",
      zip_code: "12000"
    }
  }
}

| Name | Slug | | ------------ | ------------ | | Email | email | | Name | name | | First Name | first_name | | Last Name | last_name | | Phone Number | phone_number | | Company | company | | Website | website | | Zip Code | zip_code |

Further Documentation

For further API Reference, please visit
https://appflows.readme.io/reference/getting-started