st.replyToComment
This action allows you to reply to a comment.
In the SDK this is the replyToComment method. It takes the parameters below except label and then, which exist only in workflow JSON, and returns the result below in data.
In the CLI this is linkedin comment reply – the command is below, under Parameters.
Constraints
⏺️ Root Start: allowed, when
commentUrlparameter is provided.
⬆️ Parent Actions: st.doForComments, st.openComment.
⬇️ Child Actions: N/A.
Parameters
{
"actionType": "st.replyToComment",
"label": "comment1",
"commentUrl": "https://www.linkedin.com/feed/update/urn:li:activity:1234567890123456789/?dashCommentUrn=urn%3Ali%3Afsd_comment%3A(9876543210%2Curn%3Ali%3Aactivity%3A1234567890123456789)",
"text": "Thanks for sharing your thoughts!"
}In AI assistants, the MCP server runs this action as the reply_to_comment tool.
In the CLI this is linkedin comment reply:
linkedin comment reply <commentUrl> <text> [flags]| Arg | Required | Description |
|---|---|---|
commentUrl | yes | Deep-link URL of the comment to reply to |
text | yes | Reply text |
The reply's commentUrn and commentUrl are printed on success (use --json for the full object). The same reply text to the same comment, already published through Linked API within 24 hours, is not published again – the command fails with duplicateComment.
label(optional) – custom label for tracking this action in workflow completion.commentUrl(required for root start, forbidden for parent start) – LinkedIn URL of the comment.text– reply text.
Result options
- Successful comment reply:
{
"actionType": "st.replyToComment",
"label": "comment1",
"success": true,
"data": {
"commentUrn": "urn:li:comment:(urn:li:activity:1234567890123456789,1122334455)",
"commentUrl": "https://www.linkedin.com/feed/update/urn:li:activity:1234567890123456789/?dashCommentUrn=urn%3Ali%3Afsd_comment%3A(1122334455%2Curn%3Ali%3Aactivity%3A1234567890123456789)"
}
}label– included only if specified in the action parameters.data– information about the created reply.commentUrn– LinkedIn URN of the created reply, if available.commentUrl– canonical deep-link URL of the created reply, if available.
- Failed comment reply:
{
"actionType": "st.replyToComment",
"label": "comment1",
"success": false,
"error": {
"type": "commentNotFound",
"message": "The comment could not be opened or no longer exists."
}
}label– included only if specified in the action parameters.error.type– enum with the following possible values:commentNotFound– the comment could not be opened or no longer exists.replyingNotAllowed– replying is not allowed on this comment.duplicateComment– this account already replied with the same text to this comment through Linked API within the last 24 hours, so the reply was not published again. Text is compared after trimming and collapsing whitespace. The message links the earlier reply when it is known.