What is Membrane?

A fast, powerful way to write internal tools in TypeScript, connecting the apps you already use at work.

FEATURES
EXAMPLES
example github action alert
Example of a Membrane program to checks if a Github workflow job has failed, and if so, it sends a sms message with information about the failure.
Use the Endpoint function to receive webhooks
SMS notification
import { nodes, root, state } from "membrane";

export async function endpoint({ path, body }) {
  switch (path) {
    case "/webhook":
      {
        const { action, workflow_job, repository } = JSON.parse(body);
        if (
          action === "completed" &&
          workflow_job.conclusion === "failure"
        ) {
          const message =
           `The workflow "${workflow_job.workflow_name}"
            in the repository "${repository.full_name}"
            was canceled due to a failure caused by
            "${workflow_job.name}".`;

          await nodes.sms.send({ message });
        }
      }
      return JSON.stringify({ status: 200 });
    default:
      console.log("Unknown Endpoint:", path);
  }
}
   
What is Membrane?

A fast, powerful way to write internal tools in TypeScript, connecting the apps you already use at work.

FEATURES
EXAMPLES
Example of a Membrane program to checks if a Github workflow job has failed, and if so, it sends a sms message with information about the failure.
Use the Endpoint function to receive webhooks
SMS notification
import { nodes, root, state } from "membrane";

export async function endpoint({ path, body }) {
  switch (path) {
    case "/webhook":
      {
        const { action, workflow_job, repository } = JSON.parse(body);
        if (
          action === "completed" &&
          workflow_job.conclusion === "failure"
        ) {
          const message =
           `The workflow "${workflow_job.workflow_name}"
            in the repository "${repository.full_name}"
            was canceled due to a failure caused by
            "${workflow_job.name}".`;

          await nodes.sms.send({ message });
        }
      }
      return JSON.stringify({ status: 200 });
    default:
      console.log("Unknown Endpoint:", path);
  }
}
   
Communication

If you're curious about Membrane's architecture, Juan joined the devtools.fm podcast to talk through the nuts and bolts.



Enter your email for occasional updates