Save matrix block to new entry in plugin
ok just found out the answer to the second method. I was using the incorrect typeId apparently. I wasn't able to find this in any of the error logs, so this was just luck.

To make sure you get the correct typeId do so in this way:

$matrix = craft()-&gt;fields-&gt;getFieldByHandle("fieldHandle"); //look in craft_fields table
$matrixBlocks = craft()-&gt;matrix-&gt;getBlockTypesByFieldId($matrix-&gt;id);


You can iterate through $matrixBlocks and look at each blocks id but in my case I knew there was only one block so I just accessed the id like this

$typeId = $matrixBlocks[0]['id'];