Portal Community

thread/reply

Reply to a Gmail thread by thread ID, adding a new message to the existing conversation.

vs. message/reply: Use thread/reply when you have a threadId and want to reply to the thread (optionally targeting a specific message with messageId). Use message/reply when you have a specific messageId and want to reply to that exact message in its thread.

When to Use

Configuration

Connection

FieldTypeDescription
credentialIdGuid requiredOAuth2 credential ID from BizFirst Credentials Manager. Requires gmail.send scope.

Operation Fields

FieldTypeDefaultDescription
threadIdstring requiredGmail thread ID to reply to. The reply is added as a new message in this thread.
messagestring requiredReply body content. HTML or plain text depending on emailType.
messageIdstring optionalSpecific message within the thread to reply to. When omitted, replies to the most recent message in the thread.
emailTypeenum optionalhtmlContent type: html or text.
senderNamestring optionalDisplay name for the replying sender.
ccListstring optionalComma-separated CC addresses for the reply.
bccListstring optionalComma-separated BCC addresses for the reply.
attachmentBinaryFieldsstring[] optionalBinary field names from upstream node outputs to attach to the reply.
replyToSenderOnlybool optionalfalseWhen true, replies only to the original sender. When false, replies to all participants (Reply-All).

Sample Configuration

{
  "nodeType": "Gmail",
  "operation": "thread/reply",
  "credentialId": "a3f9d12b-44e1-4c89-b7d2-9f0a1e2b3c4d",
  "threadId": "{{support.gmailThreadId}}",
  "message": "<p>Dear {{customer.name}},</p><p>Your request has been processed. Here is the outcome: {{resolution.summary}}</p>",
  "emailType": "html",
  "senderName": "BizFirst Support",
  "replyToSenderOnly": true
}

Validation Errors

ErrorCauseResolution
MISSING_FIELD: threadIdthreadId is emptyProvide a valid Gmail thread ID
MISSING_FIELD: messageReply body is emptyProvide non-empty message content
THREAD_NOT_FOUNDThread does not exist or is inaccessibleVerify thread ID comes from the authenticated account
MESSAGE_NOT_FOUNDOptional messageId not found in the threadVerify the message ID belongs to the specified thread
INVALID_CREDENTIALOAuth token expired or credential not foundRe-authenticate in BizFirst Credentials Manager
QUOTA_EXCEEDEDDaily send limit reachedWait for quota reset or switch to Google Workspace account

Output

Success Port

FieldTypeDescription
messageIdstringGmail message ID of the new reply
threadIdstringThread ID the reply was added to (same as input threadId)
labelIdsstring[]Labels applied to the reply (e.g. ["SENT"])
statusstringsuccess
errorCodestringEmpty on success

Error Port

On failure, routes to the error port with status: "error", errorCode, and errorMessage.

Sample Output

{
  "messageId": "18e4d5e6f7a8b9c0",
  "threadId": "18e4a2f9d3c0b1a7",
  "labelIds": ["SENT"],
  "status": "success",
  "errorCode": ""
}

Expression Reference

ExpressionResolves ToExample Use
{{support.gmailThreadId}}Thread ID from support system eventthreadId field
{{aiAgent.generatedReplyHtml}}AI-generated reply HTML from upstream nodemessage body
{{resolution.summary}}Resolution text from workflow processingReply body content
{{approval.outcome}}Approval decision text (Approved/Rejected)Outcome notification in reply
{{$now | dateFormat:'YYYY-MM-DD HH:mm'}}Current timestampTimestamp in reply body

Node Policies & GuardRails

PolicyRule
Reply-All RiskDefault replyToSenderOnly: false is Reply-All — set replyToSenderOnly: true for automated workflows to prevent unintended broadcast replies to all participants
Credential StorageStore OAuth credentials in BizFirst Credentials Manager — never hardcode tokens in workflow configuration
Daily Send LimitPersonal Gmail: 500 messages/day; Workspace: 2,000/day — throttle high-volume thread reply workflows
PII ProtectionDo not log reply body content in workflow execution history — replies may contain sensitive customer information
Quota ManagementThread reply costs 100 quota units per send — same as message/send — monitor usage against daily limits
Test IsolationTest thread reply workflows against a dedicated Gmail test account to prevent accidental replies to real customers

Examples

Example 1: AI-Generated Support Reply

After fetching the thread and generating a response with an AI node, post the reply to the conversation.

{
  "nodeType": "Gmail",
  "operation": "thread/reply",
  "credentialId": "a3f9d12b-44e1-4c89-b7d2-9f0a1e2b3c4d",
  "threadId": "{{thread.threadId}}",
  "message": "{{aiAgent.replyHtml}}",
  "emailType": "html",
  "senderName": "BizFirst Support",
  "replyToSenderOnly": true
}

Example 2: Approval Outcome Notification

After a HIL approval node processes a request, reply to the original email thread with the approval decision.

{
  "nodeType": "Gmail",
  "operation": "thread/reply",
  "credentialId": "a3f9d12b-44e1-4c89-b7d2-9f0a1e2b3c4d",
  "threadId": "{{approvalRequest.threadId}}",
  "message": "<p>Dear {{requester.name}},</p><p>Your request has been <strong>{{approval.decision}}</strong>.</p><p>{{approval.notes}}</p>",
  "emailType": "html",
  "replyToSenderOnly": true
}

Example 3: CRM Follow-Up Thread Reply

A scheduled CRM workflow fires when a lead has been idle 7 days — reply to the existing email thread with a follow-up.

{
  "nodeType": "Gmail",
  "operation": "thread/reply",
  "credentialId": "a3f9d12b-44e1-4c89-b7d2-9f0a1e2b3c4d",
  "threadId": "{{crm.lead.lastEmailThreadId}}",
  "message": "<p>Hi {{crm.lead.firstName}},</p><p>Just following up on our previous conversation. Are you still interested in learning more about BizFirst? I'd love to schedule a quick call.</p>",
  "emailType": "html",
  "senderName": "{{crm.assignedRep.name}}",
  "replyToSenderOnly": true
}