A client has their products built in HubSpot. They also have a property on the deal object in which the sales person is adding which "product" they have purchased. Is there a way to automatically apply a line item to a deal?
This is not 1:1 match for what you need, but it would be a good start that you could modify.
What this custom coded action does is associate a company to a contact based on the company info in the contacts company property.
You could modify that to get your custom property and do a search in the products to find it, if exists, associate product to the deal which will create a line item.