Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(WhatsApp Business node): WhatsApp node #3659

Merged
merged 48 commits into from
Sep 30, 2022

Conversation

valya
Copy link
Contributor

@valya valya commented Jul 5, 2022

Converted #3350 into the new declarative style and finished some of the functionality.

@valya valya requested a review from RicardoE105 July 5, 2022 08:06
@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team node/new Creation of an entirely new node labels Jul 5, 2022
@pucilpet
Copy link

pucilpet commented Jul 12, 2022

Sorry for butting in... I have been actually testing this node on my workflows and I found something that is missing.

On Template Components -> Parameters

Only "Text" is available as a parameter, but for headers of the template messages you can use image, video and document objects also.

See https://developers.facebook.com/docs/whatsapp/cloud-api/reference/messages#interactive-object (Header object)
Example of the template message with the image header: https://developers.facebook.com/docs/whatsapp/cloud-api/guides/send-message-templates#media-based

Edit: Also noticed this error with Button templates:

"description": "button: Missing parameter sub_type for button component"

@valya valya force-pushed the n8n-3954-whatsapp-business-node branch from bf6136a to 8f92618 Compare July 14, 2022 14:56
@luizeof
Copy link
Contributor

luizeof commented Jul 26, 2022

@valya hello ... can you convert to community node ?

@luizeof
Copy link
Contributor

luizeof commented Sep 27, 2022

@thomazmachado I don't know if it's ready to use. but you can checkout this pull request.

@thomazmachado
Copy link

@thomazmachado I don't know if it's ready to use. but you can checkout this pull request.

Luiz, não sei porque tô falando em inglês kkkk vi que vc é BR...

Cara, seguinte: eu instalei tudo no vscode certinho. Instalei o node, importei o git do n8n. Depois tbm instalei as pastinhas desse branch de whatsapp lá dentro. Mas não entra de jeito nenhum no app. Como vc fez pra aparecer na listinha de Credentials? Pra mim não aparece nem a credential e muito menos o node.

Por favor me ajuda man?

@thomazmachado
Copy link

@thomazmachado I don't know if it's ready to use. but you can checkout this pull request.

quando puder, ajuda <3

@thomazmachado
Copy link

@luizeof or @valya can you help me please?

I'm having trouble installing this pull request in vscode for testing.

@luizeof
Copy link
Contributor

luizeof commented Sep 29, 2022

@luizeof or @valya can you help me please?

I'm having trouble installing this pull request in vscode for testing.

what problem exactly?

@thomazmachado
Copy link

@luizeof or @valya can you help me please?
I'm having trouble installing this pull request in vscode for testing.

what problem exactly?

Man, it doesnt work when I load into vscode. This is what I did:

1 - Install n8n with Whatsapp branches (everything you guys did, is inside of the Whatsapp node)
2 - When I go to the localhost after the changes, it doesn't show anything. It's like it doesn't exists. The node or the credentials.

@luizeof
Copy link
Contributor

luizeof commented Sep 29, 2022

Try these steps:

  • checkout this pull request
  • run: npm i
  • run: npm run build
  • run: npm run dev

Open localhost:5678

@thomazmachado
Copy link

Try these steps:

  • checkout this pull request
  • run: npm i
  • run: npm run build
  • run: npm run dev

Open localhost:5678

THANK YOU! IT WORKED

@RicardoE105 RicardoE105 changed the title feat: WhatsApp Business node feat(WhatsApp Business node): New WhatsApp node Sep 29, 2022
@RicardoE105 RicardoE105 changed the title feat(WhatsApp Business node): New WhatsApp node feat(WhatsApp Business node): WhatsApp node Sep 29, 2022
@RicardoE105 RicardoE105 merged commit f63710a into master Sep 30, 2022
@RicardoE105 RicardoE105 deleted the n8n-3954-whatsapp-business-node branch September 30, 2022 00:17
@n8n-assistant n8n-assistant bot added the Upcoming Release Will be part of the upcoming release label Sep 30, 2022
@janober
Copy link
Member

janober commented Sep 30, 2022

Got released with n8n@0.196.0

@janober janober removed the Upcoming Release Will be part of the upcoming release label Sep 30, 2022
@n8n-assistant n8n-assistant bot added the Upcoming Release Will be part of the upcoming release label Sep 30, 2022
@Joffcom Joffcom removed the Upcoming Release Will be part of the upcoming release label Oct 6, 2022
@n8n-assistant n8n-assistant bot added the Upcoming Release Will be part of the upcoming release label Oct 6, 2022
@Joffcom Joffcom removed the Upcoming Release Will be part of the upcoming release label Oct 6, 2022
@Joffcom
Copy link
Member

Joffcom commented Oct 6, 2022

^ "Fixed" issue in our workflow.

@imagina
Copy link

imagina commented Oct 7, 2022

Is there an entry missing for this parameter or are we not setting it right?
image

Documentation: https://developers.facebook.com/docs/whatsapp/cloud-api/guides/send-message-templates#:~:text=the%20whatsapp_business_messaging%20permission.-,Text%2DBased%20Message%20Templates,-To%20send%20a talk about a language parameter in the template
image

@Joffcom
Copy link
Member

Joffcom commented Oct 8, 2022

Hey @imagina,

Can you open a post on our community support forum so that this doesn't get lost?

valya added a commit to valya/n8n that referenced this pull request Nov 8, 2022
* feat: base structure for whatsapp node with credentials

* feat: messages operation

* feat: create generic api call with credentials and test first operation

* fix: add missing template params

* fix: language code for template

* feat: media type and start of template components

* fix: remove provider name from media type

* lintfix

* fix: format

* feat: media operations w/o upload media type

* ♻️ Convert WhatsApp Business node to declarative style

* 🐛 form data not being sent with boundary in header

* ✨ add media operations to WhatsApp

* ✨ add credentials test to WhatsApp credentials

* ♻️ move preview url to optional collection in whatsapp message

* ♻️ renamed media operations in whatsapp node

* :refactor: move media file name to optional fields in whatsapp node

* ✨ add upload from n8n for whatsapp node message resource

* 🔥 remove other template component types in whatsapp node

* :speech_bubble: add specialised text for media types in WhatsApp node

* ⚡ Load dinamically phone number and template name

* ⚡ Add action property to all operations

* 🔥 Remove unnecessary imports

* ⚡ Use getBinaryDataBuffer helper

* ⚡ Add components property

* ✨ send components for whatsapp templates and template language

* 🏷️ fix WhatsApp node message function types

* 🏷️ fix any in whatsapp message functions

* 🔥 remove unused import

* ⚡ Improvements

* ⚡ Add send location

* ⚡ Add send contact

* ⚡ Small improvement

* ♻️ changes for review

* 🐛 fix presend error

* ♻️ change lat/long to numbers with proper clamping

* fix: bad merge

* refactor: changes for review

* update package-lock.json

* update package.-lock.json

* update

Co-authored-by: cxgarcia <schlaubitzcristobal@gmail.com>
Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team node/new Creation of an entirely new node
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants