# Automation Workflow Spec Template

Use this document before building, buying, or handing off an automation workflow. A good spec prevents vague automation requests from becoming brittle workflows.

## 1. Workflow Summary

- Workflow name:
- Business owner:
- Primary user:
- Business goal:
- Trigger event:
- Expected output:
- Setup deadline:

## 2. Business Job

Write the job in one sentence:

When `[trigger happens]`, this workflow should `[action]` so that `[business outcome]`.

Example:

When a new demo request arrives, this workflow should normalize the lead, score urgency, and send a Slack alert so that sales can respond faster.

## 3. Inputs

| Input | Required | Source | Example | Notes |
| --- | --- | --- | --- | --- |
| name | Yes | Form/webhook | Jane Lee | Full name if available |
| email | Yes | Form/webhook | jane@example.com | Must be valid email |
| company | No | Form/webhook | Acme Co | Use blank if missing |
| intent | No | Form/webhook | demo request | Used for routing/scoring |

## 4. Credentials And Systems

| System | Credential owner | Permission needed | Risk level | Notes |
| --- | --- | --- | --- | --- |
| n8n | Ops | Workflow edit/run | Medium | Self-hosted or cloud |
| Google Sheets | Ops | Append row | Low | Destination sheet |
| Slack | Ops | Post message | Low | Target channel |

## 5. Workflow Steps

1. Receive trigger.
2. Validate required input.
3. Normalize field names.
4. Apply routing or scoring logic.
5. Send output to destination.
6. Return or log a clear status.

## 6. Success Criteria

| Check | Pass condition |
| --- | --- |
| Setup time | A new user can configure it in under 30 minutes |
| Sample data | At least one safe sample payload is included |
| Output clarity | The expected output is documented with an example |
| Failure handling | Missing data and API errors have a defined behavior |
| Maintenance | Credentials, limits, and dependencies are listed |

## 7. Failure Paths

- Missing required field:
- Duplicate record:
- API timeout:
- Invalid credential:
- Rate limit:
- Destination unavailable:

## 8. Test Cases

| Test | Input | Expected result | Pass/Fail |
| --- | --- | --- | --- |
| Happy path | Complete sample payload | Output is created in destination | |
| Missing email | Payload without email | Workflow returns validation error | |
| Optional company missing | Payload without company | Workflow still runs | |
| Duplicate event | Same payload sent twice | Duplicate behavior is documented | |

## 9. Handoff Notes

- Where the workflow lives:
- Who owns credentials:
- Who receives alerts:
- How to disable safely:
- How to test after changes:
- Known limitations:

