# Designing a Flow

At Fastn, flows are built using a set of core elements that define the structure and behavior of your automations.

> These include components such as the starting point of a flow, the steps it performs, how data moves between those steps, and how different services are connected.

## Flow Elements in Fastn

These are the building blocks you’ll use to create automations in Fastn. Each element plays a specific role in making your flows powerful, flexible, and easy to maintain.

{% hint style="info" %}
You can select any flow component you want from the right navigation bar, or click the **plus (+)** icon in your flow steps and search for the component name to add it.
{% endhint %}

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th><th data-hidden data-card-cover data-type="image">Cover image</th></tr></thead><tbody><tr><td><strong>Connector</strong></td><td>Connect to external apps and APIs to send or receive data seamlessly.</td><td><a href="/pages/AyOSSJfLoj6cEV2v3AOJ">/pages/AyOSSJfLoj6cEV2v3AOJ</a></td><td></td></tr><tr><td><strong>Database</strong></td><td>Query or update Fastn’s internal database using SQL commands.</td><td><a href="/pages/Pwf2ApQ7WfRlvoZomSSX">/pages/Pwf2ApQ7WfRlvoZomSSX</a></td><td></td></tr><tr><td><strong>Data Mapper</strong></td><td>Transform and map data between steps or formats within your flow.</td><td><a href="/pages/Pwf2ApQ7WfRlvoZomSSX">/pages/Pwf2ApQ7WfRlvoZomSSX</a></td><td></td></tr><tr><td><strong>Variables</strong></td><td>Store and reuse dynamic values, flags, or configurations across steps.</td><td><a href="/pages/toDgpIXEkZNaIAJi4hAl">/pages/toDgpIXEkZNaIAJi4hAl</a></td><td></td></tr><tr><td><strong>Switch</strong></td><td>Add conditional logic to branch your flow based on data or rules.</td><td><a href="/pages/xTO5D9mxxsyu7euksrLq">/pages/xTO5D9mxxsyu7euksrLq</a></td><td></td></tr><tr><td><strong>Loop</strong></td><td>Repeat steps for a list of items or until a condition is met.</td><td><a href="/pages/UtYnTjUHAtS4KdPxGu6E">/pages/UtYnTjUHAtS4KdPxGu6E</a></td><td></td></tr><tr><td><strong>Download File</strong></td><td>Retrieve files from URLs to use or process within your automation.</td><td><a href="/pages/RUhmwft8xcWyYvdP9wbc">/pages/RUhmwft8xcWyYvdP9wbc</a></td><td></td></tr><tr><td><strong>Converter</strong></td><td>Change data formats for compatibility.</td><td><a href="/pages/kbDcOuD3XYT2hohseJuf">/pages/kbDcOuD3XYT2hohseJuf</a></td><td></td></tr><tr><td><strong>Custom Code</strong></td><td>Add logic with custom scripts in JavaScript, Python, or C#.</td><td><a href="/pages/vf3Y0Ll31w6soEJEAO2T">/pages/vf3Y0Ll31w6soEJEAO2T</a></td><td></td></tr><tr><td><strong>Flow Response</strong></td><td>Define structured success or error responses when the flow ends.</td><td><a href="/pages/QvVjIClK1FgDoSDiINaU">/pages/QvVjIClK1FgDoSDiINaU</a></td><td></td></tr><tr><td><strong>AI Agent</strong></td><td>Build intelligent, multi-step automations powered by your chosen model.</td><td><a href="/pages/MIzRgIkBlEm1lVXuVvMw#building-your-ai-agent-on-chat-request">/pages/MIzRgIkBlEm1lVXuVvMw#building-your-ai-agent-on-chat-request</a></td><td></td></tr><tr><td><strong>AI Action</strong></td><td>Trigger quick, single-step actions using natural language prompts.</td><td><a href="/pages/MIzRgIkBlEm1lVXuVvMw#ai-action">/pages/MIzRgIkBlEm1lVXuVvMw#ai-action</a></td><td></td></tr><tr><td><strong>Logger</strong></td><td>Record custom messages or data for debugging and monitoring.</td><td><a href="/pages/Y9pUgpCwJDUegA14KLKr">/pages/Y9pUgpCwJDUegA14KLKr</a></td><td></td></tr><tr><td><strong>Trigger</strong></td><td>Initiate a flow whenever a specific event occurs in a connected app.</td><td><a href="/pages/llaeqOHEdLrI6drF7LRU">/pages/llaeqOHEdLrI6drF7LRU</a></td><td></td></tr><tr><td><strong>Summarization Chain</strong></td><td>Condense large documents, chat logs, or articles into short, readable outputs while maintaining key context and intent.</td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fastn.ai/flow-setup-essentials/designing-a-flow.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
