Find legacy id of newly created node
How did you migrate the content from the nond-drupal tables to nodes?  Module or custom code?

I would suggest a 'custom' migration routine/module (if it is a lot of data you can do this as a cron and/or batch job - that is a separate discussion).  

Any case, in your custom routine, when you migrate each record (so read a record form your table and create a new node) from items and actions - you will be able to 'capture' the node id (nid) if the new node.  Save this value to your 'old' items/actions tables (new field required).  Now when you step through your item actions table you can use the nid saved in items and actions as reference values.