What does this error mean and how might I fix it?

I’m trying to turn a blueprint into a macro. The blueprint nodes work as they should, but when I use the same nodes in a macro library they return an error.

The error is “Error Unknown template referenced by ‘Add Component
Target is Actor’ for”

The macro is for adding a static mesh to the blueprint from an array I define. I’ve attached a screenshot of the nodes. I have an inkling that by removing the nodes from the immediate blueprint to the macro I need to provide some sort of input that it’s not getting? I’m pretty stumped, as I am not from a programming background so there’s a lot of ‘gotchas’ that I probably don’t know about. Help would be greatly appreciated.

As can be seen here:

macros and functions are not able to add components. You could fix this by adding a new graph, paste it in there and trigger it with a custom event.

Note that you can add components inside a blueprint-specific (or even an inherited) function or macro in the current version of UE4.
You cannot add components inside a global macro from a macro library.