Social Messages
Sends and reads the direct messages of your Bluesky, Mastodon and X accounts from one node, with a tab for each network. The node Social Messages Action replies to the person who wrote, sends a message to a handle, lists your conversations and reads the messages of one. The trigger Social Messages starts a flow when a new direct message arrives. An AI Node can answer whoever wrote, on the network they wrote from, and only them.
Setup
Each account is a credential, the same kind the Social Media node uses to post. If you already post with an account, there is nothing new to connect. If you don't, go to Settings → Credentials → New credential and pick Bluesky, Mastodon or X (Twitter). Another account is another credential.
| Network | Credential | What it needs |
|---|---|---|
| Bluesky | Bluesky | An app password with «Allow access to your direct messages» ticked. Stored encrypted. |
| Mastodon | Mastodon | The Mastodon account you already connect to publish. Nothing new to connect and nothing to reconnect. |
| X | X (Twitter) | An account connected with Connect with X. If you connected it before X messages existed, reconnect it once to allow them. |
On a Mastodon credential, type the server you have an account on, like mastodon.social, and click Connect with Mastodon.
On an X credential, click Connect with X and accept what X asks for, which now includes your direct messages. The messages work only with an account connected this way. If you connected the account before X messages existed, open the credential and click Reconnect once: until you do, Test connection says Messages: off. Reconnect this account to allow it. Posting keeps working in the meantime.
Click Test connection on the credential. It answers one line: Messages: on., or Messages: off. followed by what to do: on Bluesky, create an app password with «Allow access to your direct messages»; on Mastodon and on X, reconnect the account to allow it. "Off" is not an error: the credential still works to post, so the test passes and tells you which one it is. On Bluesky and Mastodon the test reads one conversation of your account and keeps nothing of it; on X it doesn't call X at all: it only checks what the connection allows.
HostWebhook keeps the access of each account encrypted and never writes it to a log. Deleting the credential deletes our copy of it. The app password stays valid in Bluesky until you delete it there, and the access stays valid on your Mastodon server until you remove it there.
Mode — single operation or AI toolkit
The Mode selector decides who drives the node. In Single operation mode you pick one operation and fill its fields, and the node does that every time it runs: one fixed operation each time, for example a reply, a message to a handle or the list of your conversations. No AI. In AI toolkit mode the node becomes two tools that an AI Node can call: it answers whoever wrote, on the network they wrote from, and it can't pick another recipient. See AI toolkit mode.
Operations and networks
The Operation dropdown decides what the node does. These are the exact values the API validates against:
| Value | In the dropdown | What it does |
|---|---|---|
| reply | Reply | Replies in the conversation that started the flow, from the account that got the message, on the network it came from. It asks for nothing but the text. |
| sendMessage | Send message | A direct message to the handle in To, or in the conversation in Conversation. The text works as in Reply: the All tab, or the tab of each network. It runs once for each network you pick, with the tab of that network. |
| listConversations | List conversations | Your direct conversations, once for each network you pick. Turn on Unread only to skip the ones you have read; Bluesky also has Status. X has neither: it has no list of chats, so it lists your latest messages, grouped by conversation. |
| getMessages | Get messages | The latest messages of one conversation, newest first, once for each network you pick. After a Social Messages trigger, the conversation comes with the flow. |
One tab for each network
Pick the networks in Networks; each one gets its own tab, with its accounts and the fields that only that network reads. A node needs at least one network, and one account for each.
- Reply answers on the network the message came from, from the account that got it. Reply and Send message take the text the same way. With two or more networks, the first tab is All: write the text there once and every network sends it. Each network tab can change it for its network, and a tab with no text of its own sends the one in All. With one network there is no All: its tab holds the text. Up to 1,000 characters on Bluesky and 500 on Mastodon; on X, the limit is X's own.
- Send message, List conversations and Get messages run once for each network you pick, each with the tab of that network and with one account. If the tab has two or more accounts, Account asks which one the operation uses: a message is never sent from every account.
- If a network fails, the others still run. The node fails only if every network fails.
- After Reply (and after an AI tool), the flow gets one answer, with
network,account.credentialIdand what the network says. After the other three, it getsresults: one entry for each network, withnetwork,credentialId,okandoutput(orerrorwhen it failed).
Send message
To takes a handle: on Bluesky, a handle or a DID like alice.bsky.social; on Mastodon, a handle with its server, like alice@mastodon.social; on X, a handle like @alice or the numeric ID of an X user (a handle made only of digits needs its @). Without the server, a name like alice is an account of your own server: the message goes to the alice of the server of the account that sends it, so write the server for anyone else. Something that is not a handle at all is refused before anything is sent, and the error repeats what you wrote: alice smith is not a valid Mastodon handle. Write only the handle, like alice@mastodon.social: no spaces, links or commas. Conversation takes the id of a conversation you already have: it comes with the trigger. If you fill in both, Bluesky uses the Conversation, and Mastodon and X use To. On X, the Conversation is the one between two people, like 1234567890-2244994945. With To and Conversation both empty after a Social Messages trigger, the message goes to the conversation that started the flow, if it is one of that network, and from the account that got it. All the fields take values from earlier steps.
On Bluesky, if you have no conversation with that person yet, Bluesky opens one when the message goes out. Each person chooses who can write to them: if they chose not to accept your message, Bluesky refuses it and HostWebhook says so.
List conversations and Get messages
Limit is a whole number: from 1 to 100 on Bluesky, from 1 to 40 on Mastodon and from 1 to 100 on X. The list has, for each conversation, the person you talk to, whether it has unread messages and the last message. On Bluesky, Status filters the list: Any, Accepted or Requests (people you don't follow). Mastodon has no Status. X has no Status and no Unread only: it has no list of chats, so List conversations lists your latest messages, grouped by conversation, and only the last 30 days.
Run Test runs the operation with your account and your flow doesn't run: Send message and Reply send a real message.
AI toolkit mode
In toolkit mode the node is two tools an AI Node calls by name. They only work in the conversation that started the flow. No tool has a network, a recipient, an account or a conversation argument: they are the ones of the Social Messages message that started the flow, which the AI Node reads from its own input, so put the trigger in front of it. The model can't message anyone else, however it is asked to.
| Tool | Arguments | What it does |
|---|---|---|
| reply_to_direct_message | text | Replies with a direct message to the person who wrote, in the conversation that started the flow, on the network they wrote from and from the account that got the message. |
| get_direct_messages | limit? | Reads the latest messages of that conversation, newest first. The model can pass a limit; each network cuts it at its own maximum. |
- The network and the account have to be in the node. The tools answer on the network the person wrote from, only if that network is ticked in the node, and only from the account that got the message, if it is one of the node's. Otherwise they are refused and nothing is sent: This network isn't turned on in this node. or The account that got this message isn't one of this node's accounts.
- Listing conversations is not a tool. It would show the model every conversation of the account, and the AI only works inside the one that started the flow.
- None starts blocked. You can still block them one by one in the node's tool list.
- Refused, not sent: a tool called with no Social Messages message in the flow — a Run Test, or an MCP client. The tool says why: Nobody wrote to you in this flow, so there is no conversation to reply in.
- Not over MCP. An MCP client brings no message to answer, so the tools refuse there.
- The node adds nothing to what the AI writes, except that on Mastodon the message starts with the @handle of the person, which counts in the 500 characters. If an AI answers from your account, tell people they are talking to a bot.
- Your messages go to an AI only when you ask. They reach a model only when an AI Node in your flow reads them, and never one that may train on them.
The trigger
A Trigger with the Social Messages service fires on New direct message: a new direct message to an account you pick. Pick the networks, then one or more accounts for each (up to 10 per network), each in its own tab. On Bluesky, the switch Include message requests lets in the messages from people you don't follow; it is off by default. Click Activate to start watching: it only reads, and nothing is written in your accounts. Deactivating or deleting the trigger stops it.
What fires it, and what doesn't
It checks your accounts on the schedule of your plan (X, no more often than every 2 minutes, even where your plan allows every minute) and starts one run for each new direct message. Only messages that arrive after you turn it on fire it: every time you turn it on, each account starts from now, and what came while it was off does not fire it. The same goes for an account you add later. Each message fires once; if the same message reaches two accounts of the trigger, that is two messages, and two runs.
- Only one-to-one messages fire it. Messages in group conversations are skipped.
- Bluesky: messages from people you don't follow are message requests. They don't fire it unless you turn on Include message requests.
- Mastodon: private mentions from people you don't follow only arrive if your Mastodon settings don't drop them.
- X: only one-to-one text messages fire it. A message in an encrypted chat arrives without text, and only if you turn on Encrypted chats; a message with no text (only an image, for example) is skipped.
- One account never stops another. If an account fails (its credential was deleted, or its server asked it to slow down), the others are still checked, and the one that failed is tried again at the next check.
The Test button of the trigger shows the recent messages it would catch, and your flow doesn't run.
Encrypted chats (X)
X can turn a chat encrypted at any time, and then HostWebhook can't read what is written in it: the keys stay with the people in the chat, not with us. What HostWebhook can tell is that a message arrived. On the X tab of the trigger, the switch Encrypted chats (“Fires with no text when someone writes to you in an encrypted chat.”) is off by default, and it is set for each trigger.
- With the switch on, the trigger shows Listening for encrypted chats. If it can't be turned on, it says Encrypted chats can't be turned on right now. Try again later. or X didn't confirm encrypted chats for this account. Try again later. The rest of the trigger keeps working either way.
- X chats that are encrypted arrive without text. The message that starts the flow has
encryptedset totrueand an emptytext;fromis the ID of who wrote andsentAtis when. There is no name or handle, and what the person wrote is never read or kept. - Only what arrives after you turn it on fires it, as with every message of this trigger.
- An AI Node doesn't answer it: there is no text to answer.
- Get messages on a conversation that HostWebhook saw as encrypted says This chat is encrypted and HostWebhook can't read it. instead of giving a list that leaves messages out.
What the trigger sends downstream
{
"id": "113120987654321097",
"channel": "social_messages",
"event": "message",
"network": "mastodon",
"account": { "credentialId": "6a9d0e1b2c3d4e5f607182a4", "handle": "@shop@mastodon.example" },
"from": "109349111222333444",
"fromHandle": "alice@mastodon.example",
"fromName": "Alice Example",
"text": "Hi! Do you ship to Canada?",
"sentAt": "2026-11-22T09:31:00.000Z",
"conversation": { "messageId": "113120987654321097", "inReplyToId": null }
}| Field | What it is |
|---|---|
| network | bluesky, mastodon or twitter: where the message came from. |
| account | The account that got the message: its credentialId and its handle. |
| text | What the person wrote, as plain text. Empty on the notice of an encrypted X chat. |
| encrypted | Only on the notice of an encrypted X chat, where it is true: HostWebhook can't read what was written. It is not there on any other message. |
| from | Who wrote. A DID on Bluesky, like did:plc:…, and the id of the account on Mastodon and on X. |
| fromHandle, fromName | Their handle and their name, if the network gives them. On Mastodon, a person on your own server comes without the server, like alice. |
| sentAt | When the message was sent. |
| conversation | What belongs to each network. Bluesky: convoId, messageId and status (accepted, or request when the person is one you don't follow). Mastodon: messageId and inReplyToId. X: conversationId (the ids of the two people, joined by a dash) and messageId. |
The fields above conversation are the same on every network, so a flow uses them without knowing where the message came from. Read them in the next steps as {{payload.network}}, {{payload.text}}, {{payload.fromHandle}} and so on; what is specific to a network, as {{payload.conversation.convoId}}. The text and the names are written by whoever sent the message: treat them as data.
Limits
| What | Bluesky | Mastodon | X |
|---|---|---|---|
| Text of a message | 1,000 characters | 500 characters (some servers allow more; HostWebhook keeps to 500) | The limit of X: if a message is too long, the node says «This message is too long for X.» |
| Conversations or messages in one read | Up to 100 (50 if you leave Limit empty) | Up to 40 (20 if you leave Limit empty) | Up to 100 (20 if you leave Limit empty) |
| What can be sent | Plain text, to one person. No images and no group chats | Plain text, to one person. No images and no group conversations | Plain text, to one person. No images and no group conversations |
| Messages sent in a day | No daily limit of ours | No daily limit of ours | 100 for your whole organization: all its X accounts together, counted by UTC day |
| How often the trigger checks | On the schedule of your plan | On the schedule of your plan | No more often than every 2 minutes, even where your plan allows every minute: X limits how often an account can be read |
| How far back you can read | — | — | The last 30 days: X doesn't give older messages |
Gotchas
- The account is always the credential's. A conversation of another account can't be read or answered. The node never answers from an account that did not get the message.
- A node needs a network and an account. A network picked without an account can't be turned on: pick at least one account for each network.
- Other servers. HostWebhook is made for Mastodon. A server that copies its API, like Pleroma, Akkoma or GoToSocial, may behave differently, and nothing is promised for it.
What the errors say
| From | It says | What to do |
|---|---|---|
| Node | Nobody wrote to you in this flow, so there is no conversation to reply in. | Reply or an AI tool ran in a flow that did not start with a Social Messages message. Start the flow with the Social Messages trigger. |
| Node | This network isn't turned on in this node. | The message came from a network that this node does not have. Pick it in Networks. |
| Node | The account that got this message isn't one of this node's accounts. | Add that account to the tab of its network, or use another node for it. The node never answers from another account. |
| Node | This network has two or more accounts: pick the one this operation uses. | Send message, List conversations and Get messages use one account for each network. Pick it in Account. |
| Bluesky | This app password can't use your messages. Create one with «Allow access to your direct messages». | The app password was made without the box. Create a new one with the box ticked and use it in a new credential. |
| Bluesky | Bluesky is limiting how fast this account can use its messages. Try again in a few minutes. | Bluesky slows down accounts that ask too often. Wait a little and run it again. |
| Bluesky | alice.bsky.social doesn't accept messages. | The person chose that in Bluesky (a similar line says that they only accept messages from people they follow). There is nothing to fix here. |
| Bluesky | Bluesky does not know this conversation (it may belong to another account). | The conversation is from a different Bluesky account than the one in the tab. Use the account that got the message. |
| Mastodon | This account can't use your messages. Reconnect it and try again. | The account is not allowed to read or write messages. Connect it again, then press Test connection. |
| Mastodon | alice smith is not a valid Mastodon handle. | Write only the handle, like alice@mastodon.social: no spaces, links or commas. The error repeats what you wrote in To, or says «That» if it is long. Without the server, a name like alice is an account of your own server. |
| Mastodon | That conversation is gone, or this account can't see it. | The conversation was deleted, or it belongs to another account. Use the account that got the message. |
| Mastodon | This conversation has more than two people. HostWebhook only replies in one-to-one conversations. | The message mentions someone else, or the text you send does. Take the other @mention out of your text; if it is the message that mentions someone else, reply to it by hand in Mastodon. |
| X | This X account can't use your messages. Reconnect it and try again. | The account was connected before X messages existed, or it did not accept the permission. Click Reconnect on the credential, accept it, then press Test connection. |
| X | X didn't deliver this message. The person may not accept messages from this account. | X did not deliver it: the person may not accept messages from this account, may have blocked it, or can't receive messages. There is nothing to fix here. |
| X | X is limiting messages right now. Try again later. | X limits how often an account, or the app, can read and send. Wait a little and run it again. |
| X | That account was not found on X. | Check the handle or the ID in To. |
| X | alice smith is not a valid X handle. | Write only the handle, like @alice, or the numeric ID of the user: no spaces, links or commas. The error repeats the first 40 characters of what you wrote in To. A handle made only of digits needs its @. |
| X | X isn't answering right now. Try again later. | X did not answer, or refused without saying why. Run it again in a while. |
| X | This message is too long for X. | Make the text shorter. |
| X | This conversation has more than two people. Social Messages only handles one-to-one messages. | The conversation is a group. Use a conversation between two people. |
| X | This chat is encrypted and HostWebhook can't read it. | Get messages on a conversation that HostWebhook saw as encrypted: X keeps what is written there out of reach of the classic way of reading messages. There is nothing to fix here; only the notice that a message arrived can reach a flow (see Encrypted chats). |
| X | Your organization reached its daily limit of messages through X. Try again later. | This is a limit of HostWebhook, not of X: all the X accounts of your organization together can send 100 messages a day (counted by UTC day). Try again tomorrow. |
| X | Messages only work with an X account connected with “Connect with X”. | The credential was not made with Connect with X, so the node refuses it before calling X. Connect the account again from Settings → Credentials. |
| Trigger | X didn't confirm encrypted chats for this account. Try again later. | X did not accept to tell HostWebhook about the encrypted chats of this account. The trigger keeps working for everything else. HostWebhook does not try again by itself: deactivate the trigger and activate it again later. |
| Trigger | Encrypted chats can't be turned on right now. Try again later. | HostWebhook can listen to a limited number of accounts with encrypted chats at the same time, and it is full. The trigger keeps working for everything else: try again later. |
| Trigger | Mastodon is limiting this account right now. The trigger will try again later. | Your server limits how fast an account can ask. That account waits and tries again by itself; the others keep being checked. |
| Trigger | Social Messages could not read a Bluesky account (…). The next check tries again. | One account failed this time: a failure of one account never stops the others. The name of the failure is in the parentheses. |
| Trigger | The {network} account picked for this trigger no longer exists in your organization. Pick an account for {network} again in the trigger settings. | You deleted the credential of an account. {network} is bluesky or mastodon: pick an account again in the tab of that network. |