> For the complete documentation index, see [llms.txt](https://academy.synap.ac/doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://academy.synap.ac/doc/portal-settings/content-management/notes/dynamic-notes.md).

# Dynamic notes

How to use the portal variables and logic operators that make up dynamic notes

{% hint style="info" %}
This feature it only available on one of our Business or Enterprise plans. Please speak to your account manager should you wish to upgrade or know more.&#x20;
{% endhint %}

Personalised content and messaging from a single note with variables in dynamic notes.&#x20;

<figure><img src="https://3316915154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkgvUeCmTPeNouRxGPC%2Fuploads%2FxIriFG6iB4NXuXJK1lsn%2FScreenshot%202026-09-30%20at%2013.11.44.png?alt=media&amp;token=cc379bf8-a8e7-412c-b2dc-d85f861b728a" alt=""><figcaption></figcaption></figure>

Dynamic notes let you add **variables** (details about the viewer or portal) and **logic** (if, else, unless and each statements) to a note. One note can then show different content to different people, so you don't need to create and maintain many versions of the same note.

<figure><img src="https://3316915154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkgvUeCmTPeNouRxGPC%2Fuploads%2F6ea4BHtuYlvlRtLvwh6x%2FScreenshot%202026-09-30%20at%2013.10.03.png?alt=media&amp;token=0e2cf38d-9aeb-4677-bb3c-28702e58273f" alt=""><figcaption><p>Same note showing different text for different users </p></figcaption></figure>

You can use dynamic portal variables and user attributes for personalisation, contextual links, and relevant information.

Below is breakdown of the available variables that can be used in a note:

| Variable name          | Description                                                                                                                                                 |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| User ID                | User id of the users account                                                                                                                                |
| User First Name        | First name from the name field of the users account                                                                                                         |
| User Last Name         | Last name from the name field of the users account                                                                                                          |
| User Full Name         | Full name from the name field of the users account                                                                                                          |
| User Email             | Email from the email field of the users account                                                                                                             |
| User Time Zone         | Time zone of the users account                                                                                                                              |
| User Locale            | Locale of the users account                                                                                                                                 |
| User Token             | Current Token of the user viewing the note                                                                                                                  |
| User Sub Portal ID     | The Subportal ID of the user viewing the note                                                                                                               |
| Custom User Attributes | Any custom user attributes will be displayed in the list, these will populate with the data that has been set on the users account that is viewing the note |
| Portal ID              | Portal ID of your portal                                                                                                                                    |
| Portal Name            | Portal Name of your portal                                                                                                                                  |
| Portal URL             | URL of your portal                                                                                                                                          |

Using logic operators allows you to take user data, check and perform various operations depending on truthy falsey values or matching values.

Below is a list of the Logic operators available to use in a note:

<table><thead><tr><th width="161">Logic operator</th><th width="251">Behaviour on a dynamic note</th><th>Syntax</th></tr></thead><tbody><tr><td>if</td><td>If condition A is true, execute block A.</td><td><pre data-overflow="wrap"><code>{{#if user.firstName ""}}  Hi {{user.firstName}}
</code></pre></td></tr><tr><td>if/else</td><td>If condition A is true, execute block A. Else, execute block B.</td><td><pre data-overflow="wrap"><code>{{#if user.firstName ""}}  Hi {{user.firstName}} {{else}} Who are you? {{/if}}
</code></pre></td></tr><tr><td>if/elseIf/else</td><td>If condition A is true, execute block A. Else If condition B is true, execute block B. Else If condition C is true, execute block C. If no conditions are true, execute the else block.</td><td><pre data-overflow="wrap"><code>{{#if  user.firstName ""}} Hi {{user.firstName}} {{else if user.email ""}} Hi {{user.email}}  {{else}} Hi there! {{/if}}
</code></pre></td></tr><tr><td>unless</td><td>Unless condition A is true, execute block A.</td><td><pre data-overflow="wrap"><code>{{#unless user.name "John"}} Weclome to the portal John! {{/unless}}
</code></pre></td></tr><tr><td>each</td><td>For each item in a collection, execute the block for that item.</td><td><pre data-overflow="wrap"><code>{{#each user.attr.subjects}} this.value {{/each}}
</code></pre></td></tr></tbody></table>

## Sub portals&#x20;

If you use sub portals, a single dynamic note can act as a tailored homepage or welcome page for each one. Every sub portal shares the same note, and each user sees the version for the sub portal they're on.

<figure><img src="https://3316915154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkgvUeCmTPeNouRxGPC%2Fuploads%2Fyuoq5cHff85UOkxaWmoD%2FScreenshot%202026-09-30%20at%2012.57.55.png?alt=media&amp;token=d4580459-dad4-47ad-bdc3-baf6f83dba52" alt=""><figcaption><p>Same note shows differently to users depending on which sub portal they're in</p></figcaption></figure>

To do this you'll need to have sub portals set up and IDs to hand, you can find these in portal settings.

From the note editor use the `if/else if` with one branch per sub portal, the example below is using html blocks but you can use anything in the editor just make sure everything for each sub portal is kept between the logic as shown below

```
{{#if user.subPortal.id "subPortalAId"}}
<<Sub portal A note content>>

{{else}}
{{#if user.subPortal.id "subPortalBId"}}
<<Sub portal B note content>>

{{else}}
{{#if user.subPortal.id "subPortalCId"}}
<<Sub portal C note content>>

{{else}}
<<Root portal users>>
```

<figure><img src="https://3316915154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkgvUeCmTPeNouRxGPC%2Fuploads%2FHRwcPsQCq2OYtRpbRRuM%2FScreenshot%202026-09-30%20at%2013.04.23.png?alt=media&amp;token=7bf79949-1cb9-424b-91d5-daef6b7fc540" alt=""><figcaption></figcaption></figure>

More on HTML notes below&#x20;

{% content-ref url="/pages/ujujT2iH1gm5QzNQ89Kl" %}
[Notes](/doc/portal-settings/content-management/notes.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://academy.synap.ac/doc/portal-settings/content-management/notes/dynamic-notes.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
