Zapier - Convert Unicode String to Hex format

For sending Unicode sms via Send-unicode action in D7SMS

  • Click on the “+” symbol just above the “Send Unicode in D7 SMS” connection and add “Code by Zapier”

Send Unicode in D7 SMS
  • Select Code by Zapier

Code by Zapier
  • Choose “Run Python”

Run Python
  • Update fields as given in the image. Copy and paste the code snippet from here:

from binascii import hexlify
contentc = input_data['content'].encode('utf-16-be')
hex_content = hexlify(contentc).decode('utf-8')
return {'output': str(hex_content)}
code snippet
  • Once completed click on verify and finish the step

  • Now click on “Send SMS Unicode in D7 SMS” and update Message body

send sms unicode
  • Select “Output” inside “Run Python” script as “Message Body”

message body
  • Retest & review the data and its done :)