# Anatomy of a Workflow — AI Automation with n8n

Source: https://www.geekswithgeeks.com/en/n8n-ai-automation/basics-anatomy

> Identify triggers, nodes, connections and executions, and run a workflow manually.

## The pieces

Every workflow has one or more **trigger** nodes that start it, followed by **action** nodes joined by **connections**. Each run is an **execution**, and n8n keeps its input and output data so you can inspect every node afterwards. While building, use **Execute workflow** or **Execute step** to test, and **pin data** on a node to reuse sample output without calling the real service again.

## A first workflow, in words

Build this in the editor. Each line is a node, in order.

```text
1. Schedule Trigger      every day at 09:00
2. HTTP Request          GET https://api.example.com/orders?status=new
3. IF                    {{ $json.total }} is greater than 5000
4. Slack                 post "Big order {{ $json.id }}" to #sales   (true branch)
```

## Pin data while you build

Pinned data saves API calls and lets you iterate on later nodes quickly. Remember to unpin before you activate the workflow, because pinned data is only used when testing.

**Quiz:** What is a trigger node?

- [ ] A kind of credential
- [ ] A node that deletes data
- [ ] The last node in every workflow
- [x] A node that starts the workflow

*Answer:* A node that starts the workflow. Triggers such as schedule, webhook or an app event are what cause a workflow to run.
