Token reference
Every token you can use in a text field, grouped by where it comes from.
Write a token in braces. See Values and tokens for how they work. A token that names nothing becomes empty.
Who and where
Available in every flow that someone set off. Schedules and webhooks get only {server.*} and {bot.*} when they act in a server.
| Token | Value |
|---|---|
{user.mention} | Mentions whoever set the flow off |
{user.name} | Their display name |
{user.id} | Their Discord ID |
{user.createdAt} | When their account was made, in seconds since 1970 |
{user.voiceChannel} | The voice channel they're in, if any |
{member.accountAge}, {member.timeInServer} | How old their account is, and how long they've been a member, in seconds |
{member.roles}, {member.permissions}, {member.joinedAt} | Their roles, permissions and join date, from a command, button or form |
{server.name}, {server.id} | The server |
{server.memberCount}, {server.onlineCount} | How many members it has, and how many are online |
{server.owner}, {server.icon} | Its owner's ID, and its icon's address |
{server.boosts}, {server.boostTier} | How many boosts it has, and its boost level |
{channel.name}, {channel.id}, {channel.mention} | The channel this happened in |
{bot.id}, {bot.mention} | The bot itself |
{bot.latency} | The bot's ping, in milliseconds |
{bot.permissions} | What the bot may do in the channel, from a command, button or form |
{server.name} and the other server values are looked up when a flow uses them, and kept a few minutes.
Any time
| Token | Value |
|---|---|
{now} | The time, in seconds. Write <t:{now}:R> to show it as a date. |
{run.id} | This run's ID |
Commands
| Token | Value |
|---|---|
{option.name} | The value of the option with that name |
{target.id} | The member a member option names, or else whoever ran it |
Right-click commands
| Token | Value |
|---|---|
{target.id}, {target.mention}, {target.name} | On a member: who it was opened on |
{message.content}, {message.link}, {message.author} | On a message: the message, and who wrote it |
Schedules
| Token | Value |
|---|---|
{run.time} | When this run started |
{run.count} | How many times this schedule has run, this one included |
Buttons and menus
| Token | Value |
|---|---|
{component.data} | What the button or menu was sent with, such as a row's number |
{component.message} | The ID of the message it's on |
{component.choiceLabel}, {component.choice} | From a menu: the choice made, and its ID |
Webhooks
| Token | Value |
|---|---|
{webhook.body} | What was sent, reached into with dots |
{webhook.text} | What was sent, exactly as it came |
{webhook.query.name} | A part of the address's query |
Sub-flows
| Token | Value |
|---|---|
{input.name} | In a sub-flow: what the flow that ran it gave it |
{result.name} | After Run another flow: what the sub-flow handed back |
Produced by steps
These exist after the step that makes them.
| Token | Made by | Value |
|---|---|---|
{sent.id}, {sent.channel}, {sent.link} | Any step that sends a message | The message, its channel and a link to it |
{fetched.content}, {fetched.author.id} and more | Read a message | The message read |
{lookup.roles}, {lookup.joinedAt} and more | Look up a member | The member looked up |
{modal.label} | Send a form | The answer to the input with that label |
{http.status}, {http.body} | Send an API request | The status code and the response |
{feed.item.title}, {feed.item.link} and more | Check a feed | The newest item |
{code.key} or {code.result} | Run code | What the snippet returned |
{row.id}, {row.column}, {rows.count} | Find rows, For each row, Pick at random | A row's number and columns, and how many matched |
{inserted.id} | Add row | The new row's number |
{upserted.id}, {upserted.created} | Add or change a row | The row, and whether it was new |
{updated.count} | Change rows | How many rows changed |
{list.count}, {list.item} | Change a list | How long the list is, and what was taken off |
{loop.index}, {loop.item} | Repeat, For each item, For each row | The pass, starting at 1, and the item |
{temp.name} | Set a unique variable, Manipulate text, Work out an equation, Date and time, Read JSON, Count or total rows, Pick at random | A value that lasts for this run |
{invite.url}, {invite.code} | Create server invite | The invite |
{created.channel}, {created.channel.mention} | Create a channel, Create a voice channel | The channel |
{created.role}, {created.role.mention} | Create a role | The role |
{thread.id}, {thread.mention} | Create a thread, Create a forum post | The thread |
{created.event}, {created.event.link} | Schedule an event | The event |
{created.emoji} | Add an emoji | The emoji |
{purged.count} | Purge messages | How many were deleted |
{bulk.count} | Change a role for many | How many members changed |
{error.message} | Any step that fails into its error way out, or a Try | What went wrong |
Documents
A token can hold a document, such as an API's answer or JSON read in: reach into it with dots ({http.body.user.name}), into a list by position from 0 ({http.body.items.0}), and ask a list's length with .length. A document written whole comes out as JSON.
Variables and secrets
| Token | Value |
|---|---|
{var.name} | The variable with that name |
{secret.NAME} | A secret. Only Send an API request and a webhook address in Send as someone else fill it in. |
Events
Event flows add their own tokens. See Events.