I am trying to create an automation chain which is called on the event 'documentCreated' and newly uploaded document is saved as attachment on another document.
But after attaching, this newly uploaded document is also created as new document.
I want to avoid that.
I want to delete that newly created document.
Can anyone help me with this?
I tired to use operation document.delete(), but entire chain is rolled back because I'm calling it in documentCreated.
So what should I do to delete newly created document?
Which event handler should I use?
Thanks in advance.