Creating a new message and autodialing text from clipboard

I hope one of the AppleScript Pros can help with this command. I’m trying to run a script to create a new text message on my MacBook Pro’s Messages App, and paste information from clipboard, like phone, name and address. The phone number should be pasted to the “To” field. And the message will be “Hello Name, I’m reaching out about Address, which was listed for Price”

I asked Chat GPT to create this script, and it was able to generate it half way. It’s able to put the phone number in the right place, and write Hello. But it’s not able to get the name from the 3rd line, address from the 1st line, and Price from the 4th line of the clipboard.

The format in the clipboard is like this

123 Main St
555-555-1212
John Doe
899,000

Please see the scpt file attached.
https://www.dropbox.com/scl/fi/390jnqel29ecrsb8mxmjs/Temp-Hello-Kitty.scpt?rlkey=07ao3cfn3c6rxg4iksqpc4spy&dl=0

If the script isn’t very long, you could post the actual code here.

Without seeing your code, I can say that you should be able to use “paragraphs of” to parse that return-delimited text into a list, then set variables to each relevant item in the list. Then, you could build up the message you want.