Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,15 +1,43 @@
> ### **1 minute read                                                                                                                     `Beginner`**
___
<h3>
<table>
<tr>
<td><b> 3 minutes read</b></td>
<td style={{ paddingLeft: '40px' }}><b>Level: Beginner </b></td>
<td style={{ paddingLeft: '40px' }}><b>Last Updated: July 2026</b></td>
</tr>
</table>
</h3>

**Labelling the incoming message flow action is used to categorize the messages into separate buckets. This helps you capture data points which can be used for creating reports, analytics etc.**
**Labelling the incoming message flow action is used to categorize the messages into separate buckets. This helps you capture data points which can be used for creating reports, analytics etc.**

## Video Tutorial
For instance, if someone chooses English as their preferred language, you can label their message as 'English' and then generate charts for how many people chose English.

<iframe width="800" height="500" src="https://www.youtube.com/embed/Y2KWDO7SfnI" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
## How it works

This node labels the contact's most recent incoming message - not any message the bot sends. Every time the flow runs this node, it adds the label(s) you choose to whichever message the contact sent last.

Because of this, the node only does something useful if there is a message from the contact to label at that point in the flow.

## Adding the node to your flow

1. Add a `Label the incoming message` node at the point in your flow where you want to categorize the contact's message.

Tip - Place this node right after a `Wait for Response` node if you want to label what the contact just typed. This guarantees the incoming message being labelled is the reply you're interested in, not an older message from earlier in the conversation.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

file='docs/4. Product Features/03. Flows/2. Flow Actions/07. Label the incoming message.md'

# Show the relevant section with line numbers.
sed -n '1,120p' "$file" | cat -n

Repository: glific/docs

Length of output: 3250


🏁 Script executed:

#!/bin/bash
set -euo pipefail

file='docs/4. Product Features/03. Flows/2. Flow Actions/07. Label the incoming message.md'
sed -n '1,120p' "$file" | cat -n

Repository: glific/docs

Length of output: 3250


🏁 Script executed:

#!/bin/bash
set -euo pipefail
file='docs/4. Product Features/03. Flows/2. Flow Actions/07. Label the incoming message.md'
sed -n '1,120p' "$file" | cat -n

Repository: glific/docs

Length of output: 3250


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
mods = ["markdown_it", "markdown", "commonmark", "mistune"]
for m in mods:
    try:
        __import__(m)
        print(m, "available")
    except Exception as e:
        print(m, "missing")
PY

Repository: glific/docs

Length of output: 225


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
from markdown_it import MarkdownIt

md = MarkdownIt()
text = """1. Add a `Label the incoming message` node at the point in your flow where you want to categorize the contact's message.

 Tip - Place this node right after a `Wait for Response` node if you want to label what the contact just typed. This guarantees the incoming message being labelled is the reply you're interested in, not an older message from earlier in the conversation.
2. Under `Select the labels to apply to the incoming message`, enter the name of an existing label or create a new one.
"""
tokens = md.parse(text)
for t in tokens:
    print(t.type, t.tag, repr(t.content), t.markup, t.map)
PY

Repository: glific/docs

Length of output: 911


Indent the tip under step 1. The one-space indent breaks the numbered list here; nest it beneath item 1 or format it as a blockquote so the walkthrough stays intact.

🧰 Tools
🪛 LanguageTool

[style] ~25-~25: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...after a Wait for Response node if you want to label what the contact just typed. This...

(REP_WANT_TO_VB)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/4`. Product Features/03. Flows/2. Flow Actions/07. Label the incoming
message.md at line 25, Indent the “Tip - Place this node right after a Wait for
Response node…” paragraph beneath step 1 in the walkthrough, or format it as a
nested blockquote, so it remains part of the numbered-list item without
disrupting the list structure.

2. Under `Select the labels to apply to the incoming message`, enter the name of an existing label or create a new one.
3. Click `Ok` to save the node.

<br />
<br />
![Add Labels node showing the label selection field](https://user-images.githubusercontent.com/32592458/218254849-f5049dcb-4c84-4250-b235-efec35a43360.png)

**For instance, if someone chooses English as their preferred language, you can label their message as 'English' and then generate charts for how many people chose English.**
## Note

![image](https://user-images.githubusercontent.com/32592458/218254849-f5049dcb-4c84-4250-b235-efec35a43360.png)
- If you add this node without a `Wait for Response` immediately before it (for example, right at the start of a flow, before the contact has said anything), there is no incoming message yet and the label is not applied to anything.
- You can add more than one label to the same node. If the same message already has a label from an earlier point in the flow, the new label is added alongside it rather than replacing it.
- Keep label names consistent across flows (for example, always use `English` rather than mixing `english` and `English`) so your reports and BigQuery analytics can group them correctly.

---

## Related video

This video walks through building a full flow and includes an example of using the `Label the incoming message` node partway through - it's a good reference for seeing the node used in context, but isn't focused on this node alone.

<iframe width="800" height="500" src="https://www.youtube.com/embed/Y2KWDO7SfnI" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
Loading