← Zenkit + Data Stores integrations

Add or update multiple records with Data Stores API on New Activity (Instant) from Zenkit API

Pipedream makes it easy to connect APIs for Data Stores, Zenkit and 1000+ other apps remarkably fast.

Trigger workflow on
New Activity (Instant) from the Zenkit API
Next, do this
Add or update multiple records with the Data Stores API
No credit card required
Into to Pipedream
Watch us build a workflow
Watch us build a workflow
7 min
Watch now ➜
Trusted by 250,000+ developers from startups to Fortune 500 companies:
Trusted by 250,000+ developers from startups to Fortune 500 companies

Developers Pipedream

Getting Started

This integration creates a workflow with a Zenkit trigger and Data Stores action. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Select this integration
  2. Configure the New Activity (Instant) trigger
    1. Connect your Zenkit account
    2. Select a Workspace
    3. Optional- Select a List
  3. Configure the Add or update multiple records action
    1. Connect your Data Stores account
    2. Configure Data Store
    3. Configure Data
  4. Deploy the workflow
  5. Send a test event to validate your setup
  6. Turn on the trigger

Details

This integration uses pre-built, open source components from Pipedream's GitHub repo. These components are developed by Pipedream and the community, and verified and maintained by Pipedream.

To contribute an update to an existing component or create a new component, create a PR on GitHub. If you're new to Pipedream component development, you can start with quickstarts for trigger span and action development, and then review the component API reference.

Trigger

Description:Emit new event when there is new activity in Zenkit
Version:0.0.1
Key:zenkit-new-activity

Trigger Code

import common from "../common/common.mjs";

export default {
  ...common,
  key: "zenkit-new-activity",
  name: "New Activity (Instant)",
  description: "Emit new event when there is new activity in Zenkit",
  version: "0.0.1",
  type: "source",
  dedupe: "unique",
  props: {
    ...common.props,
    workspaceId: {
      propDefinition: [
        common.props.zenkit,
        "workspaceId",
      ],
    },
    listId: {
      propDefinition: [
        common.props.zenkit,
        "listId",
        (c) => ({
          workspaceId: c.workspaceId,
        }),
      ],
      optional: true,
    },
  },
  methods: {
    ...common.methods,
    async getHistoricalEvents(params) {
      return this.listId
        ? this.zenkit.listListActivities({
          listId: this.listId,
          params,
        })
        : this.zenkit.listWorkspaceActivities({
          workspaceId: this.workspaceId,
          params,
        });
    },
    getTriggerType() {
      return "activity";
    },
    getWebhookParams() {
      return {
        workspaceId: this.workspaceId,
        listId: this.listId,
      };
    },
    generateMeta(activity) {
      return {
        id: activity.id,
        summary: `New Activity ${activity.id}`,
        ts: Date.parse(activity.updated_at),
      };
    },
  },
};

Trigger Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI and CLI.
LabelPropTypeDescription
ZenkitzenkitappThis component uses the Zenkit app.
N/Ahttp$.interface.httpThis component uses $.interface.http to generate a unique URL when the component is first instantiated. Each request to the URL will trigger the run() method of the component.
N/Adb$.service.dbThis component uses $.service.db to maintain state between component invocations.
WorkspaceworkspaceIdstringSelect a value from the drop down menu.
ListlistIdstringSelect a value from the drop down menu.

Trigger Authentication

Zenkit uses OAuth authentication. When you connect your Zenkit account, Pipedream will open a popup window where you can sign into Zenkit and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Zenkit API.

Pipedream requests the following authorization scopes when you connect your account:

About Zenkit

Productivity and Collaboration Software Suite

Action

Description:Add or update multiple records to your [Pipedream Data Store](https://pipedream.com/data-stores/).
Version:0.0.5
Key:data_stores-add-update-multiple-records

Data Stores Overview

With the Data Stores API, you can build applications that:

  • Store data for later retrieval
  • Retrieve data from a store
  • Update data in a store
  • Delete data from a store

Action Code

import app from "../../data_stores.app.mjs";

export default {
  key: "data_stores-add-update-multiple-records",
  name: "Add or update multiple records",
  description: "Add or update multiple records to your [Pipedream Data Store](https://pipedream.com/data-stores/).",
  version: "0.0.5",
  type: "action",
  props: {
    app,
    dataStore: {
      propDefinition: [
        app,
        "dataStore",
      ],
    },
    data: {
      label: "Data",
      type: "object",
      description: "Enter data you'd like to add as key-value pairs, or reference an object from a previous step using a custom expression (e.g., `{{steps.data.$return_value}}`). Note that any keys that are duplicated will get overwritten with the last value entered (so `[{jerry: \"constanza\", jerry: \"seinfeld\"}]` will get stored as `[{jerry: \"seinfeld\"}]`).",
    },
  },
  methods: {
    /**
     * Tries to convert a string to a JSON object or a primitive value.
     * @param {any} value Value to be converted
     * @returns The converted value
     */
    convertString(value) {
      // If type is already primitive non string, return it
      const primitives = [
        "boolean",
        "number",
      ];
      if (primitives.includes(typeof value)) {
        return value;
      }

      // Tries to convert string to possible other primitive types
      if (typeof value === "string") {
        // Convert boolean
        if (value.toLowerCase() === "true") {
          return true;
        }
        if (value.toLowerCase() === "false") {
          return false;
        }

        // Convert number
        if (!isNaN(value)) {
          return parseFloat(value);
        }
      }

      return this.app.evaluate(value);
    },
    /**
     * Add all the key-value pairs in the map object to be used in the data store
     * @param {*} data Data to be parsed
     * @param {Map} map Hashmap to be updated
     */
    populateHashMapOfData(data, map) {
      if (!Array.isArray(data) && typeof(data) === "object") {
        Object.keys(data).forEach((key) => map[key] = this.convertString(data[key]));
        return;
      }

      if (Array.isArray(data)) {
        for (const item of data) {
          this.populateHashMapOfData(item, map);
        }
      }
    },
    getHashMapOfData(data) {
      const map = {};
      this.populateHashMapOfData(data, map);
      return map;
    },
  },
  async run({ $ }) {
    if (typeof this.data === "string") {
      this.data = this.app.evaluate(this.data);
    }
    const map = this.getHashMapOfData(this.data);
    const keys = Object.keys(map);
    const promises = Object.keys(map).map((key) => this.dataStore.set(key, map[key]));
    await Promise.all(promises);
    if (keys.length === 0) {
      $.export("$summary", "No data was added to the data store.");
    } else {
      // eslint-disable-next-line multiline-ternary
      $.export("$summary", `Successfully added or updated ${keys.length} record${keys.length === 1 ? "" : "s"}`);
    }
    return map;
  },
};

Action Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI.

LabelPropTypeDescription
Data StoresappappThis component uses the Data Stores app.
Data StoredataStoredata_store

Select an existing Data Store or create a new one.

Datadataobject

Enter data you'd like to add as key-value pairs, or reference an object from a previous step using a custom expression (e.g., {{steps.data.$return_value}}). Note that any keys that are duplicated will get overwritten with the last value entered (so [{jerry: "constanza", jerry: "seinfeld"}] will get stored as [{jerry: "seinfeld"}]).

Action Authentication

The Data Stores API does not require authentication.

About Data Stores

Use Pipedream Data Stores to manage state throughout your workflows.

More Ways to Connect Data Stores + Zenkit

Delete All Records with Data Stores API on New Activity (Instant) from Zenkit API
Zenkit + Data Stores
 
Try it
List keys with Data Stores API on New Activity (Instant) from Zenkit API
Zenkit + Data Stores
 
Try it
Delete All Records with Data Stores API on New Entry (Instant) from Zenkit API
Zenkit + Data Stores
 
Try it
List keys with Data Stores API on New Entry (Instant) from Zenkit API
Zenkit + Data Stores
 
Try it
List Records with Data Stores API on New Activity (Instant) from Zenkit API
Zenkit + Data Stores
 
Try it
New Activity (Instant) from the Zenkit API

Emit new event when there is new activity in Zenkit

 
Try it
New Entry (Instant) from the Zenkit API

Emit new event when a new item/entry is created in Zenkit

 
Try it
New Notification (Instant) from the Zenkit API

Emit new event when there is a new notification in Zenkit

 
Try it
Updated Entry (Instant) from the Zenkit API

Emit new event when an entry is updated in Zenkit

 
Try it
Add Entry Comment with the Zenkit API

Add a comment to an entry/item within a list/collection on Zenkit. See the docs

 
Try it
Create Entry with the Zenkit API

Create an entry/item in a list on Zenkit. See the docs

 
Try it
Get Entry with the Zenkit API

Retrieve an entry/item from a list on Zenkit. See the docs

 
Try it
Get List with the Zenkit API

Retrieve a list/collection from a workspace on Zenkit. See the docs

 
Try it
Get User with the Zenkit API

Retrieve a user from a workspace on Zenkit. See the docs

 
Try it