shridarpatil / frappe_whatsapp

WhatsApp cloud integration for frappe
https://www.youtube.com/watch?v=nq5Kcc5e1oc
Other
171 stars 162 forks source link

notification not working #25

Closed NayanGajjar closed 1 year ago

NayanGajjar commented 1 year ago

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

shridarpatil commented 1 year ago

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.

NayanGajjar commented 1 year ago

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

image

NayanGajjar commented 1 year ago

Hello @shridarpatil

please have a look and revert.

NayanGajjar commented 1 year ago

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.

chechani commented 1 year ago

language code is null. hence the issue.

NayanGajjar commented 1 year ago

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

chechani commented 1 year ago

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.

NayanGajjar commented 1 year ago

language set and template approved. refetch?

chechani commented 1 year ago
Screenshot 2023-06-26 at 12 37 48
NayanGajjar commented 1 year ago

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

NayanGajjar commented 1 year ago

can i attach document in notification?

NayanGajjar commented 1 year ago

image

getting above error on saving notification

github-actions[bot] commented 1 year ago

Stale issue message