Automate Reporting of Spam Text Message

Description
I receive a lot of spam text messages from different phone numbers. I need help figuring out a way to automate the reporting process so that eventually I'll stop receiving these weird messages.

The Goal

  1. Trigger the automation.
  2. Copies the last text message in the open message window.
  3. Paste it in a new text message.
  4. Send to a specific number.
  5. Copy the phone number where the spam message was copied from in step 2.
  6. Send that phone number to the specific number in step 4.

Where the hurdles are

  1. Copying "the last" message from an open message.
  2. Copying the phone number from the spam text message to the new text message to report it.

It's like you coming through messages twice, the first time to copy the spam message and then the phone number where that message came from, which you need for your provider to track that number.

Have you tried just blocking the sender using the iPhone/iPad Messages app?
Block Messages and More on your iPhone, iPad, or iPod touch

And then there is:
You can also enable settings to block spam phone calls and messages.