Unify endpoints, workflows, and agents
Multi-language cloud functions runtime for API endpoints, background jobs, and agentic workflows using Motia Steps. Preview them in the Workbench, ship to zero-config infrastructure, and monitor in the Cloud.





Code-First Framework for Backend Infrastructure
Write in any language. Automate anything. From AI agents to backend automation, Motia runs event-driven workflows with zero overhead.

Code-first agents, APIs & automations
Fully-featured, event driven backend framework


Logs

State and logging
Persistent state and real time logs out of the box

Multi-Language Workflows
Write and connect steps in Python, TypeScript, JavaScript or Ruby

Test & deploy with confidence
Ensure robust test coverage with E2E, integration and unit test at the workflow or step level


AI-Ready Workflows
Plug into 400k+ Python packages and 2M+ npm modules
Write AI Workflows like
You Write APIs

Logs
Flow Legend
openai.service.ts
slack.service.ts
trello.service.ts
check-overdue-cards.step.ts
complete-approved-card.step.ts
mark-card-for-review.step.ts
slack-notifier.step.ts
start-assigned-card.step.ts
trello-webhook-validation.step.ts
trello-webhook.step.ts
validate-card-requirements.step.ts
1import { CronConfig, FlowContext } from 'motia'
2import { TrelloService } from '../services/trello.service'
3import { appConfig } from '../config/default'
4
5export const config: CronConfig = {
6 type: 'cron',
7 name: 'Check Overdue Cards',
8 description: 'Identifies and flags cards that have passed their due date',
9 cron: '0 * * * *',
10 emits: [],
11 flows: ['trello'],
12}
13
14export const handler = async ({ logger }: FlowContext) => {
15 const trello = new TrelloService(appConfig.trello, logger)
16 logger.info('Starting overdue task check')
17
18 try {
19 const listsToCheck = [
20 appConfig.trello.lists.newTasks,
21 appConfig.trello.lists.inProgress,
22 appConfig.trello.lists.needsReview,
23 ]
24
25 for (const listId of listsToCheck) {
26 const cards = await trello.getCardsInList(listId)
27
28 for (const card of cards) {
29 if (card.due && new Date(card.due) < new Date()) {
30 logger.info('Found overdue card', { cardId: card.id, name: card.name })
31 await trello.addComment(card.id, '⚠️ OVERDUE: This card has passed its due date!')
32 }
33 }
34 }
35
36 logger.info('Completed overdue task check')
37 } catch (error) {
38 logger.error('Error checking overdue tasks', error)
39 }
40}
41


Build with the tools you know and love
Integrate with the libraries you already use to build practical, scalable, and reliable solutions.















































Automation/Gmail Manager
Logs

Development
Version 1.0.13
Status
Ready
Created On
06:30 pm | Sept 12 2025
Analytics
Today
Steps
Invocations
State Usage
API
04
Event
16
Cron
24
Production-ready reliability.
Developer-first design.



Code-first AI automation framework
Write in Python, TypeScript, JavaScript, or Ruby. Deploy with confidence using industry standard test suites, evals and monitoring.
Join our community
Use Cases
Integrations
Motia Cloud