Automations
React to deploys, comments, and external events with workflows that run on the platform.
Triggers
Trigger
Fires when…
Writing your first automation
export default {
trigger: 'deploy.succeeded',
async run(event, ctx) {
await ctx.notify('slack', {
channel: '#deploys',
message: `${event.project} is live at ${event.url}`
});
}
};import type { Automation, DeployEvent } from '@platform/automations';
export default {
trigger: 'deploy.succeeded',
async run(event: DeployEvent, ctx) {
await ctx.notify('slack', {
channel: '#deploys',
message: `${event.project} is live at ${event.url}`
});
}
} satisfies Automation;from platform_automations import automation, slack
@automation(trigger='deploy.succeeded')
async def notify_deploy(event, ctx):
await slack.post(
channel='#deploys',
message=f"{event.project} is live at {event.url}"
)A more useful example
Local testing
Scheduling
What's next?
Was this helpful?