/
attachFileFromEmail
attachFileFromEmail
The use of this function requires the Power Scripts for Jira add-on be installed and licensed.
Description
Attaches a single file from the incoming email to a specified issue.
Parameters
Return Type
Boolean
Returns "true" if file was successfully attached to issue and "false" otherwise.
Example
IncomingEmail email = getIncomingEmail();
string issueKey = matchText(email.subject, "[A-Z][A-Z]+-[0-9]+"); // find an issue key in the subject
if(isNotNull(issueKey)) {
for(string att in email.attachments) {
// only attach PDFs
if(endsWith(att, ".pdf")) {
attachFileFromEmail(att, issueKey);
}
}
}
See also
Peacock
, multiple selections available,
Related content
attachFileFromEmail
attachFileFromEmail
More like this
attachFileFromEmail
attachFileFromEmail
More like this
attachAllFilesFromEmail
attachAllFilesFromEmail
More like this
attachAllFilesFromEmail
attachAllFilesFromEmail
More like this
attachAllFilesFromEmail
attachAllFilesFromEmail
More like this
attachFile
attachFile
More like this
Need support? Create a request with our support team.
Copyright © 2005 - 2025 Appfire | All rights reserved.