shridarpatil/frappe_whatsapp

notification not working

Closed this issue · 13 comments

after doing the same setting notification is not triggering.. template is also approved from meta.

ERP Version: v14

suggest if there is something change

image

Your template is wrong. Remove that status field. Fileds are used to be replaced in the message I don't see any placeholder to replace in the message.

Thank you for reverting. I have removed the same but still not getting any notification on WA. normal messaging works fine.

image

Hello @shridarpatil

please have a look and revert.

Error
Traceback with variables (most recent call last):
File "apps/frappe/frappe/integrations/utils.py", line 21, in make_request
frappe.flags.integration_request.raise_for_status()
method = 'POST'
url = 'https://graph.facebook.com/v17.0/106380319105020/messages'
auth = ''
headers = {'authorization': 'Bearer EAAMyBcMzxCsBAMXBRfpwZCoe0byc33x66RaJ48M4vQejHlCIZCgOA4Uz3H0ZBxBgsTgM0lQdseqhb4gZATQXocBwvyv6l9JaTvZBoGRwIQaZAZAYgJRA4BRRfQ3QhZASwLHo4dErfgtjDQ9QeLEL7vRggZCrfEwKkH2GbhBJpkOH24mRSnZB5z9nBcGq4PIACX34EkyuZBvHPlEd5FqFZAvZBGAZDZD', 'content-type': 'application/json'}
data = '{"messaging_product": "whatsapp", "to": "919510390054", "type": "template", "template": {"name": "Invoice TEmp", "language": {"code": null}, "components": []}}'
s = <requests.sessions.Session object at 0x7fc70eee01f0>
exc = HTTPError('400 Client Error: Bad Request for url: https://graph.facebook.com/v17.0/106380319105020/messages')
File "env/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
self = <Response [400]>
http_error_msg = '400 Client Error: Bad Request for url: https://graph.facebook.com/v17.0/106380319105020/messages'
reason = 'Bad Request'
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://graph.facebook.com/v17.0/106380319105020/messages

getting error in trigger..

the template is approved.

language code is null. hence the issue.

yeas,.. but it is getting url from backend it self not setup manually

check the whatsapp template doctype and open the record of template which you are sending. has language set in it or not.

If not set then that's the issue.

Also try to refetch the templates.

language set and template approved.
refetch?

okay.. got it. Thanks for your time.!😀

can i attach document in notification?

image

getting above error on saving notification

Stale issue message