raghav
05/08/2026, 5:07 PMCeligo AI
05/08/2026, 5:08 PMAI generated answer (using internal Slack threads):****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ****** When sending an email through
email.send, you can attach it to a transaction by setting the transaction as the related record transaction ID. However, you can only do this for one transaction per email. The system does not support attaching an email to multiple transactions in one call.
Here is a sample code snippet:
javascript
var emailObj = email.create({
body: 'Hello, World!',
subject: 'Test Email',
to: '<mailto:test@example.com|test@example.com>',
relatedRecords: {
transactionId: transactionId // replace with your transaction ID
}
});
emailObj.send();
As for attaching multiple transaction IDs on email.send for related records, it is not possible. The relatedRecords object in the email.send method expects a single transaction record.
Also, there is no direct way to link transaction attachments to emails. You would need to download them from the transaction's Files tab and attach them again manually. Alternatively, you could use a workflow or script to automatically copy important attachments to a standard File Cabinet folder, which would make them easier to find while composing an email.Celigo AI
05/08/2026, 5:08 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.880249083
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.851013243
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.84954834
Celigo AI
05/08/2026, 5:08 PMAbdul Basit
05/08/2026, 5:40 PMraghav
05/08/2026, 5:43 PMemail.send({
author: 1213,
recipients: [a@gmail.com, b@gmail.com]
subject: emailSubject,
body: emailBody,
attachments: [attachment1],
relatedRecords: {
transactionId: 99999,
entityId: entityId
}
})
Instead of attaching that email to just 99999, we also want it to attach it to 99998.
So both the transactions, 99998 and 99999 have that email attached in their communication tab.