I want to attach attachment in incident using playbook.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

I want to attach attachment in incident using playbook.

L1 Bithead

Hi Team, I have one use case I wanted to attach an attachment in an incident using the playbook. So I have one command which retrieves attachments of particular incidents.  I have created one playbook which first retrieves the attachment of a particular incident and then in the second task I'm using setIncident command to update incidents with attachments, but It is not working.

In Context data, there is a File object but I'm not able to set it in a particular incident using setIncident command. Below I attached a screenshot of setIncident task.

 

shreyash_412_1-1675055542282.png

 

 

1 REPLY 1

L5 Sessionator

Hi @shreyash_412, Not sure I understand you case entirely. I have provided a solution for both my assumptions.

 

If you have data stored in the context and are trying to save that to the context as a file. You can try the !FileCreateAndUploadV2 filename="textfile.txt" data_encoding=raw data=${ContextKeyWhereDataIsStored} command. The result of the automation creates a file inside the context.

 

If you are trying the move a file from the "File" context key to the "incident.attachments "key. Then try below command. The automation is deprecated but can still work. !DemistoUploadFileV2 entryID=406@0ede5a91-b496-4414-87be-80c42d1486d4 incidentID=${incident.id} target="incident attachment". Note that a duplicate file will be created in the File key. 

  • 1934 Views
  • 1 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!