Schedule AWS ECS services for office hours with a self-service form and Teams alerts
Ready for 3.0What this workflow does
This workflow has 55 nodes and runs on a schedule (cron 0 20 * * *) (plus 3 other triggers). It uses only n8n's built-in nodes.
How it runs
Trigger: On a schedule (cron 0 20 * * *) (plus 3 other triggers).
- Set Mode to Stop (Edit Fields (Set)): sets 1 field: mode
- Set Mode to Start (Edit Fields (Set)): sets 1 field: mode
- Set Mode to Restart (Edit Fields (Set)): sets 1 field: mode
- Route by AWS Account (Switch): routes items into 2 branches
- Set Config Parameters (Edit Fields (Set)): sets 11 fields: projects, scheduleTagKey, scheduleTagValue…
- Handle ECS for Account-A (HTTP Request): calls an HTTP API (POST)
- Handle ECS for Account-B (HTTP Request): calls an HTTP API (POST)
- Halt on Unknown Account (Stop and Error): stops the run with an error
- Check Restart Mode (If): checks a condition and branches into true / false
- Return ECS API Results (Code): runs custom JavaScript code
…plus 41 more steps. See the full node list below.
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (12)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - n8n Form Trigger
n8n-nodes-base.formTrigger - Edit Fields (Set)
n8n-nodes-base.set - If
n8n-nodes-base.if - n8n Form
n8n-nodes-base.form - Code
n8n-nodes-base.code - Execute Sub-workflow
n8n-nodes-base.executeWorkflow - Switch
n8n-nodes-base.switch - HTTP Request
n8n-nodes-base.httpRequest - Wait
n8n-nodes-base.wait - Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger - Stop and Error
n8n-nodes-base.stopAndError
From the author
Quick overview This workflow schedules tagged Amazon ECS services to run only during office hours, allows self-service restarts via an n8n Form for a limited duration, and sends status updates to a Microsoft Teams channel using an incoming webhook. How it…