Create Alert
User Intent
Operation
Code Example (TypeScript)
import { Graphlit } from 'graphlit-client';
import { ContentTypes } from 'graphlit-client/dist/generated/graphql-types';
const graphlit = new Graphlit();
// Create alert for new content matching criteria
const alert = await graphlit.createAlert({
name: "New Research Papers",
description: "Alert on AI research papers",
filter: {
search: "artificial intelligence",
types: [ContentTypes.File],
collections: [{ id: 'research-collection-id' }]
},
webhookUrl: 'https://myapp.com/webhooks/content-alert'
});
console.log(`Alert created: ${alert.createAlert.id}`);Alert Types
Last updated