I need help for node-red-huawei-sms 0.1.2 usage

Hello friends,
I need some help regarding node-red-huawei-sms 0.1.2. I would like to set the recipient's phone number dynamically by using the msg.phone property ( e.g to to reply to sender of SMS). I've tried various variants, but without success. Could somebody help me to resolve this problem?

Please share details of what you've actually tried and details of how it failed, including error messages.

I've never used the node, but a quick look at the source code says that a msg.phone should work, but it MUST be a string, not a number and NodeJS has a tendency to try and coerce things that look like number to numbers.

I suggest you test by injecting full international numbers (e.g. with a leading +country code) and possibly try adding a function node that does something like

msg.phone = msg.phone + ""

Thank You @hardillb !

An advice You gave resolved the problem and everything works now!
My mistakes:

  1. I've tried to use msg.payload.phone instead of msg.phone
  2. I've putted a phone number as a number, not as a string.

Thank You again for the help!

1 Like