To verify if the attachment was saved successfully on File Cabinet:
- Navigate to Documents > Files > File Cabinet
- Click the specified folder on script from Step #2
- Enable Server SuiteScript feature:
- Navigate to Setup > Company > Enable Features
- Click SuiteCloud
- SuiteScript:
- Server SuiteScript: Enter Checkmark
- Click Save
- Create the Implementation Script file. Sample script below:
function process(email)
{
nlapiLogExecution(‘DEBUG’, ‘EMAIL PLUGIN TRIGGERED’);
var attachments = email.getAttachments();
if (attachments != null)
{
for (var a in attachments)
{
var attachment = attachments[a];
attachment.setFolder(326); // Folder Id
var fileId = nlapiSubmitFile(attachment);
} } }
- Create the Email Capture Plugin:
- Navigate to Customization > Plug-ins > Plug-in Implementations > New
- Upload the Script file created from Step #2
- Click Create Plug-in Implementation
- Click Email Capture
- Plug-In Implementation:
- Click Save
- Navigate to Customization > Plug-ins > Manage Plug-ins
- Email Capture Plugin:
- Test Plug-in Implementation: Enter Checkmark
Note: Copy the email address associated on the Test Plug-in Implementation
- Test Plug-in Implementation: Enter Checkmark
- Click Save
- Using Outlook, send an email:
- Recipient: Use the email address copied from Step #5
- Attachment: Attach any file (ex. csv, doc, txt)
- Send the email