Harvesting info from ticket history for back-end automation

I am using RT2. I create tickets automatically when an email comes in. The
body of the email contains some text followed by = pairs
generated from a Web form. This text and the = pairs go
into the ticket as the first item in the history (first attachment to the

What I want to do is immediately (i.e., OnCreate) harvest and process this
info in the history in order to automate some back-end activities. I am in
Commit method of an Action scrip (this is RT2 so this is a standalone Perl
script in …/libRT/Actions) invoked OnCreate.

Can someone please show me the code or syntax for getting the contents of
the history (the first attachment to the first transaction of the ticket)
into a
string? I guess it’s more complex to grab these history/attachment contents
than to grab the ticket status or transaction date or some such and I have
been able to get the syntax right or to find just what I need in the
list archive.

Thank you,

Send a QuickGreet with MSN Messenger