Trigger Helpers API

Trigger helpers is passed to the trigger class' constructor.

The helpers provide commonly used utils in triggers. Here is the trigger helpers' interface:

interface IHelpers {
createContentDigest: (input: unknown) => string;
cache: {
get: (key: string) => Promise<unknown>;
set: (key: string, value: unknown) => Promise<unknown>;
del: (key: string) => Promise<void>;
reset: () => Promise<void>;
log: Logger;
axios: AxiosStatic;
rssParser: typeof Parser;


Create a stable content digest from a string or object, you can use the result of this function to set the unique id.

For example:

const id = helpers.createContentDigest({ title: "value" });


Key-value store used to persist results. All functions are async and return promises. Actionsflow use it to cache the trigger's results deduplication keys and update time.


  • get (key: string) => Promise<any>

    Retrieve cached value


    const value = await helpers.cache.get(`unique-key`);
  • set (key: string, value: any) => Promise<any>

    Retrieve cached value


    await helpers.cache.set(`unique-key`, value);
  • del (key: string) => Promise<void>

    delete cached key


    await helpers.cache.del(`unique-key`);
  • reset ()=> Promise<void>

    reset the trigger store.


    await helpers.cache.reset();


Set of utilities to output information to user.

Actionsflow use loglevel for logging.

You can use it like this:;


Make HTTP requests, Actionsflow use axios to send requests.

Some third-party triggers have their own libraries on npm which make it easier to create an integration. It can be quite tempting to use them. The problem with those is that you add another dependency and not only one, you add but also all the dependencies of the dependencies. This means more and more code gets added, has to get loaded, can introduce security vulnerabilities, bugs, and so on. So please use the built-in module which can be used like this:

const response = await this.helpers.axios(options);

See axios documentation


Prepare binary data, this helper will transform your binary to base64 string, so user can use it at workflow.

For example:

const binaryData = helpers.formatBinary(Buffer.from("test"));
console.log( === "dGVzdA==");
console.log(binaryData.mimeType === "text/plain");


A small function for turning RSS XML feeds into JavaScript objects. Actionsflow use rss-parser to parse a RSS feed.

const response = await this.helpers.axios(options);

See RSS Parser documentation