Join Discord

Enter your email to get updates
What is Membrane?
Membrane is a hosted TypeScript runtime specifically designed to build personal automation tools and interact with APIs more easily.
FEATURES
EXAMPLES
example-mailchimp-to-airtable
Adds a new record to an Airtable Base when a new Mailchimp subscriber is added.
Subscribe to event.
Query the graph using GraphQL
Create new Airtable record.
import { nodes, root, state } from "membrane";

export async function configure({ audienceId, tableId }) {
  const audience = await nodes.audiences.one({ id: audienceId });
  await audience.subscriptions.$subscribe(root.handleEvent);

  state.table = nodes.tables.one({ id: tableId });
}

export async function handleEvent(_, { event }) {
  const data = await event.member.$query(
    `{ email_address, status, timestamp_opt }`
  );

  const record = {
    email: data.email_address,
    status: data.status,
    timestamp: data.timestamp_opt,
  };
  await state.table.createRecord({ fields: record });
}
Install From VS Code
Dev Blog