- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-14-2020 08:12 PM
If the instance received an email with attachments.
How could I include the attachments in the created task using inbound action?
Appreciate all the help.
Thank you.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2020 12:51 AM
Hi
I think what is happening is your attachments are getting picked up by some other pre-defined OOTB inbound action, most probably "Create Incident". Can you go to the Inbound Actions list from the application navigator, and deactivate the Create Incident action, and then try?
Also, like i've mentioned above, you don't have to query the attachments explicitly and then associate it to the task, if you're doing current.insert/current.update already in your inbound action to create/update a task.
Thanks & Regards,
Rishabh Jha
Aavenir(http://www.aavenir.com/)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-14-2020 08:19 PM
Hi Evren,
You can follow the Steps mention in the link as it will guide you to copy the attachment to target table coming from inbound email action.
Please mark answer correct and helpful.
Thanks,
CB

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-14-2020 08:24 PM
hello
try this code it will help you
var attachmentName = '';
var test = sys_email.sys_id;
var gr = new GlideRecord('sys_attachment');
gr.addQuery('table_name','sys_email');
gr.addQuery('table_sys_id',test);
gr.query();
if(gr.next()){
attachmentName = gr.file_name;
}
Please Mark it as correct/Helpful if it helps you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-14-2020 09:36 PM
Hi
You don't have to explicitly query the attachment table and add the attachment to your task record. Servicenow implicitly does that for you.
You'd just need to call current.update() in your inbound action once, and it should associate all the attachments from the inbound email to the glide record in the transaction context.
Thanks & Regards,
Rishabh Jha
Aavenir(http://www.aavenir.com/)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-14-2020 11:47 PM
Hi everyone,
Is it possible to get the attachment of email receive and include it in the created task? not incident?
Thanks