Auto reply to text and/or iMessage? Is it possible to set up an auto-reply to an incoming text or iMessage, either on my iPhone (or the connected Message app on my Mac)?

Ideally I'd like to customize this depending upon the sender.
Apple does not provide this on iOS 11 or earlier since there are automation hooks to send a message, but not to be notified and act upon incoming messages. The Workflow app is the first place I look on iOS to see if there are hooks, but since Apple bought that company - we'll see what happens with iOS automation and iOS 12. I wouldn't expect this is the sort of automation that Apple rolls out first, but I could be wrong on that speculation.

On macOS - you might have more luck with AppleScript and the Script Editor - there is a standard message suite that used to work with IRC / chat for received messaged. I would start on MacOS to script something if you don't mind leaving your Mac logged in, not sleeping and handing off the reply ability.


  addressed message received ve : This handler is called for incoming
  messages that are addressed to you. If the handler returns a text
  value, it will replace the incoming message. 
  
  addressed message received text : The text of the incoming message   
  
  
    from buddy : The buddy who sent this message
      for text chat
      with text : A text description of the event
  


The buddy object would let you link this to the send assuming this triggers for iCloud messages in addition to old text messages. 

The Messages app dictionary has a send command that accepts text so you should be able to make a simple script to send a stock message to a specific contact. The dictionary also has an event handler suite where received messages can be processed - so you could also test that.

I don't know of anyone writing up code, but the basics look to be there on macOS but not on iOS.