Pipedream

Gate AI-triggered Pipedream workflow steps behind a human approval step. Use a Node.js code step to call Cheqpoint and branch on the decision before executing sensitive actions.

Prerequisites

  • Pipedream account.
  • Cheqpoint Connection Key (stored as an environment variable in Pipedream).

Steps

  1. In your Pipedream workflow, add a Node.js Code step immediately before any sensitive action step.
  2. Use axios or $http to POST to https://cheqpoint.co/api/webhooks/inbound.
  3. Set the x-api-key header using process.env.CHEQPOINT_CONNECTION_KEY.
  4. Map upstream step data to the Cheqpoint action, summary, and details fields.
  5. Add a Filter step after the code step that checks steps.cheqpoint.$return_value.status === "approved".
  6. The Filter will halt the workflow if not approved; otherwise execution continues to the action step.

Sample request payload

json
{
  "action": "push_to_production_db",
  "summary": "Pipedream workflow pushing AI-generated content to production database",
  "details": {
    "table": "product_descriptions",
    "record_count": 85,
    "source_model": "gpt-4o",
    "review_pass_rate": 0.94
  },
  "justification": "Batch content generation passed automated quality checks."
}

Sample Cheqpoint response

json
{
  "status": "approved",
  "modifiedDetails": null,
  "decisionNote": "Spot-checked 10 records. Looks good. Proceed."
}

Node.js code step

javascript
import axios from "axios";

export default defineComponent({
  async run({ steps, $ }) {
    const response = await axios.post(
      "https://cheqpoint.co/api/webhooks/inbound",
      {
        action: "push_to_production_db",
        summary: "Pipedream workflow pushing AI-generated content to production database",
        details: {
          table: "product_descriptions",
          record_count: steps.generate.$return_value.count,
          source_model: "gpt-4o",
        },
        justification: "Batch content generation passed automated quality checks.",
      },
      {
        headers: {
          "x-api-key": process.env.CHEQPOINT_CONNECTION_KEY,
          "Content-Type": "application/json",
        },
      }
    );

    // Export so the Filter step can read it
    $.export("status", response.data.status);
    $.export("approvalId", response.data.approvalId);
    return response.data;
  },
});

Notes

You have full control over what data is passed into the details object to provide human reviewers with sufficient context.

Tips

Start by routing only high-risk or high-value actions to minimize friction while maintaining oversight.

Get your Connection Key at cheqpoint.co/signup.