Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.codenullapp.com/llms.txt

Use this file to discover all available pages before exploring further.

From hooks, you can integrate easily with Whatsapp to send and receive messages.

Configure integration

First, you need to configure the settings in the application designer
You will need to have configured your Facebook and WhatsApp applications properly. More info here: https://developers.facebook.com/docs/whatsapp/business-management-api/get-started

Send Messages

To send a notification you can send it like this
const sendWhatsAppMessage = require("./utils/sendWhatsAppMessage").default;

//send simple text
await sendWhatsAppMessage({
  to: '573173896699',
  type: 'text',
  content: { body: 'hola mundo' },
});

//send messages using WhatsApp templates
await sendWhatsAppMessage({
  to: '573173896699',
  type: 'template',
  from: 'comercial',
  content: {
    name: 'sample_issue_resolution',
    language: {
      code: 'en_US',
    },
    components: [
      {
        type: 'body',
        parameters: [
          {
            type: 'text',
            text: 'Jhon Doe',
          },
        ],
      },
    ],
  },
});

Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the ask query parameter:
GET https://codenull.gitbook.io/dev/configurations/hooks/whatsapp.md?ask=<question>
The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.