# Expression

Expression action is a way to freely write any JavaScript logic that you need for transforming data, you can also write use Web [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch) to fetch or send any data.\
\
Important concept in Syncmate is **ctx** object that is passed from action to its children and next action. If you want to pass the data to the next actions assign your data to the **ctx** object, for example:

```javascript
ctx.computedUrl = `https://${cxx.dataFromPreviousAction}/rest/of/url`
if (Array.isArray(ctx.res.data)) {
    const lastElementIdx = ctx.res.data.length - 1
    ctx.lastElement = ctx.res.data[lastElementIdx]
}
// Only values stored in ctx object are passed to next actions.
```

<figure><img src="/files/udcmOXJ1O2Y2NCkiVV2P" alt=""><figcaption></figcaption></figure>


---

# 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.syncmate.com/getting-started/actions/expression.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.
