{"id":20239,"date":"2025-03-06T15:00:00","date_gmt":"2025-03-06T18:00:00","guid":{"rendered":"https:\/\/nocodestartup.io\/?p=20239"},"modified":"2025-03-13T17:57:56","modified_gmt":"2025-03-13T20:57:56","slug":"step-by-step-to-integrate-official-whatsapp-api-in-n8n-2","status":"publish","type":"post","link":"https:\/\/nocodestartup.io\/en\/step-by-step-to-integrate-official-whatsapp-api-in-n8n-2\/","title":{"rendered":"Step by Step Guide to Integrate Official WhatsApp API into N8N"},"content":{"rendered":"<p>The Official WhatsApp API is a powerful solution for businesses that want to automate their interactions via WhatsApp. In this article, you will learn how to configure and integrate the Official WhatsApp API using <a href=\"https:\/\/nocodestartup.io\/en\/n8n-course-2\/?utm_source=site&amp;utm_medium=home-site&amp;utm_campaign=ppt-n8n&amp;utm_content=header-formacoes-n8n&amp;conversion=ppt-n8n\">N8N<\/a>, one of the best NoCode tools for automation. Read on to find out:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>How to create a number in Meta to use the Official WhatsApp API;<\/li>\n\n\n\n<li>How to send your first automated message;<\/li>\n\n\n\n<li>How to set up triggers and automations to interact with incoming messages;<\/li>\n\n\n\n<li>How to connect WhatsApp API to <a href=\"https:\/\/nocodestartup.io\/en\/n8n-course-2\/?utm_source=site&amp;utm_medium=home-site&amp;utm_campaign=ppt-n8n&amp;utm_content=header-formacoes-n8n&amp;conversion=ppt-n8n\">N8N<\/a>, creating intelligent automation flows.<\/li>\n<\/ul>\n\n\n\n<p>If you are looking for an efficient and practical way to integrate WhatsApp into your automation routine, this guide is for you. Happy reading!&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-api-whatsapp-oficial-aprenda-o-guia-completo-de-integracao-no-n8n\"><strong>Official WhatsApp API: Learn the complete integration guide on N8N<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/nocodestartup.io\/wp-content\/uploads\/2025\/03\/api-whatsapp-oficial-guia-completo-de-integracao-1024x768.jpg\" alt=\"official whatsapp api complete integration guide\" class=\"wp-image-20242\" srcset=\"https:\/\/nocodestartup.io\/wp-content\/uploads\/2025\/03\/api-whatsapp-oficial-guia-completo-de-integracao-1024x768.jpg 1024w, https:\/\/nocodestartup.io\/wp-content\/uploads\/2025\/03\/api-whatsapp-oficial-guia-completo-de-integracao-768x576.jpg 768w, https:\/\/nocodestartup.io\/wp-content\/uploads\/2025\/03\/api-whatsapp-oficial-guia-completo-de-integracao-1536x1152.jpg 1536w, https:\/\/nocodestartup.io\/wp-content\/uploads\/2025\/03\/api-whatsapp-oficial-guia-completo-de-integracao-2048x1536.jpg 2048w, https:\/\/nocodestartup.io\/wp-content\/uploads\/2025\/03\/api-whatsapp-oficial-guia-completo-de-integracao-16x12.jpg 16w, https:\/\/nocodestartup.io\/wp-content\/uploads\/2025\/03\/api-whatsapp-oficial-guia-completo-de-integracao-150x113.jpg 150w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>The Official WhatsApp API allows you to <a href=\"https:\/\/nocodestartup.io\/en\/agents-on-whatsapp-new-trend-for-2\/\">connect WhatsApp<\/a> to any system, whether it is your own or integrated with automation tools. However, how do you configure this API correctly? And, furthermore, how do you create intelligent automated communication flows? See below a step-by-step guide on how to put this into practice!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-passo-1-criando-um-aplicativo-na-meta\"><strong>Step 1: Creating an application in Meta<\/strong><\/h3>\n\n\n\n<p>To use the Official WhatsApp API, the first step is to create an application on Meta. This will ensure that your integration works correctly on <a href=\"https:\/\/nocodestartup.io\/en\/n8n-course-2\/?utm_source=site&amp;utm_medium=home-site&amp;utm_campaign=ppt-n8n&amp;utm_content=header-formacoes-n8n&amp;conversion=ppt-n8n\">N8N<\/a> and other automation tools. So, how can you ensure that everything is set up correctly and also avoid integration errors? Follow the steps below:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Access the Meta portal (<a href=\"https:\/\/developers.facebook.com\/\" rel=\"nofollow noopener\" target=\"_blank\">developers.facebook.com<\/a>) and log in with your Facebook account;<\/li>\n\n\n\n<li>Create a new application in the panel, selecting the Business option and filling in the necessary data;<\/li>\n\n\n\n<li>Configure the Official WhatsApp API by accessing the WhatsApp section and clicking on Setup;<\/li>\n\n\n\n<li>Associate a verified Business Manager, essential for the API to work;<\/li>\n\n\n\n<li>Use a valid phone number that is not already registered with WhatsApp.<\/li>\n<\/ul>\n\n\n\n<p>That&#039;s it! Now you&#039;ve finished creating your app and can configure the API. From there, you can, for example, send your first automated message!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-passo-2-enviando-a-primeira-mensagem-na-api-whatsapp-oficial\"><strong>Step 2: Sending the first message on the Official WhatsApp API<\/strong><\/h3>\n\n\n\n<p>Now that you have completed creating your application, it is time to test the Official WhatsApp API and send your first automated message. To do this, we follow some essential steps to configure the environment and ensure that communication occurs correctly.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Generate an access token in the Official WhatsApp API dashboard. You will need this token to authenticate the messages you send;<\/li>\n\n\n\n<li>Select a test number that Meta provides or register a new one, ensuring that it is not already registered on WhatsApp;<\/li>\n\n\n\n<li>Get the account ID of the <a href=\"https:\/\/nocodestartup.io\/en\/how-does-the-official-vs-unofficial-whatsapp-business-api-work-2\/\">WhatsApp Business<\/a> and the phone number ID within the Meta dashboard;<\/li>\n\n\n\n<li>Use cURL, Client URL, (or other HTTP request tool) to send the first test message;<\/li>\n\n\n\n<li>Finally, check the delivery of the message on your WhatsApp. Typically, the initial template sent is usually the \u201cHello World\u201d template, previously approved by Meta.<\/li>\n<\/ul>\n\n\n\n<p>Please note that the Official WhatsApp API requires that the first message sent to a user be a Meta-approved template. Additionally, after the user replies, the conversation remains open for 24 hours, allowing you to send personalized messages.<\/p>\n\n\n\n<p>Now that your first message has been sent successfully, we move on to the next step: configuring the integration of the Official WhatsApp API with <a href=\"https:\/\/nocodestartup.io\/en\/n8n-course-2\/?utm_source=site&amp;utm_medium=home-site&amp;utm_campaign=ppt-n8n&amp;utm_content=header-formacoes-n8n&amp;conversion=ppt-n8n\">N8N<\/a>!&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-passo-3-integrando-a-api-whatsapp-oficial-com-o-n8n-para-automacao\"><strong>Step 3: Integrating Official WhatsApp API with N8N for automation<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"662\" src=\"https:\/\/nocodestartup.io\/wp-content\/uploads\/2025\/03\/api-whatsapp-oficial-guia-completo-de-integracao-passo-3-1024x662.png\" alt=\"official whatsapp api complete integration guide step 3\" class=\"wp-image-20243\" srcset=\"https:\/\/nocodestartup.io\/wp-content\/uploads\/2025\/03\/api-whatsapp-oficial-guia-completo-de-integracao-passo-3-1024x662.png 1024w, https:\/\/nocodestartup.io\/wp-content\/uploads\/2025\/03\/api-whatsapp-oficial-guia-completo-de-integracao-passo-3-768x496.png 768w, https:\/\/nocodestartup.io\/wp-content\/uploads\/2025\/03\/api-whatsapp-oficial-guia-completo-de-integracao-passo-3-18x12.png 18w, https:\/\/nocodestartup.io\/wp-content\/uploads\/2025\/03\/api-whatsapp-oficial-guia-completo-de-integracao-passo-3-150x97.png 150w, https:\/\/nocodestartup.io\/wp-content\/uploads\/2025\/03\/api-whatsapp-oficial-guia-completo-de-integracao-passo-3.png 1199w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Now that we have sent the first message on the Official WhatsApp API, it is time to integrate it with N8N to create intelligent automation flows. <a href=\"https:\/\/nocodestartup.io\/en\/n8n-course-2\/?utm_source=site&amp;utm_medium=home-site&amp;utm_campaign=ppt-n8n&amp;utm_content=header-formacoes-n8n&amp;conversion=ppt-n8n\">N8N<\/a> is one of the most efficient NoCode tools for connecting systems and <a href=\"https:\/\/nocodestartup.io\/en\/how-to-automate-tasks-with-ai-2\/\">automate processes<\/a> in a practical way.<\/p>\n\n\n\n<p>So, how can you ensure that this integration is done correctly? Don&#039;t worry, it&#039;s simpler than it seems! To do this, just follow the steps below:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Access the <a href=\"https:\/\/nocodestartup.io\/en\/n8n-course-2\/?utm_source=site&amp;utm_medium=home-site&amp;utm_campaign=ppt-n8n&amp;utm_content=header-formacoes-n8n&amp;conversion=ppt-n8n\">N8N<\/a> and log in to your account;<\/li>\n\n\n\n<li>Create a new flow and add a manual trigger to start the automation;<\/li>\n\n\n\n<li>Click on \u201c+\u201d and select Trigger Manual to run the flow manually in the tests;<\/li>\n\n\n\n<li>Add the WhatsApp node and select the \u201cSend Message\u201d option;<\/li>\n\n\n\n<li>Go to Credentials and enter the Access Token generated in the WhatsApp API panel and the WhatsApp Business account ID obtained in Meta;<\/li>\n\n\n\n<li>Choose the phone number that will be used to send automated messages;<\/li>\n\n\n\n<li>Configure the message (text, image, button, etc.);<\/li>\n\n\n\n<li>Run the test flow and verify that the message was sent correctly.<\/li>\n<\/ul>\n\n\n\n<p>With this configuration, your WhatsApp can now send messages directly from <a href=\"https:\/\/nocodestartup.io\/en\/n8n-course-2\/?utm_source=site&amp;utm_medium=home-site&amp;utm_campaign=ppt-n8n&amp;utm_content=header-formacoes-n8n&amp;conversion=ppt-n8n\">N8N<\/a>, automating interactions and optimizing your company&#039;s communication!&nbsp;<\/p>\n\n\n\n<p>But how does this work behind the scenes? For the message to be sent properly, it is first important to understand the structure of the API.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-entenda-mais-sobre-a-estrutura-da-api\">Understand more about the API structure<\/h4>\n\n\n\n<p>All communication between systems via API follows a predefined structure. In contrast, specifically in the case of the Official WhatsApp API, this communication occurs via HTTP requests \u2014 usually of the POST type for sending messages. Furthermore, these requests contain three main parts:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>API URL<\/strong>: the main address that receives requests;<\/li>\n\n\n\n<li><strong>Headers<\/strong>: information such as the content type (Content-Type: application\/json) and the authentication method (Authorization: Bearer );<\/li>\n\n\n\n<li><strong>Body (request body)<\/strong>: the JSON structure containing the data sent.<\/li>\n<\/ul>\n\n\n\n<p>With this understanding, it becomes much easier to configure the API correctly within the <a href=\"https:\/\/nocodestartup.io\/en\/n8n-course-2\/?utm_source=site&amp;utm_medium=home-site&amp;utm_campaign=ppt-n8n&amp;utm_content=header-formacoes-n8n&amp;conversion=ppt-n8n\">N8N<\/a>. Node done, it&#039;s time to move on to the next step to create automated responses with Webhooks in the Official WhatsApp API!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-passo-4-criando-respostas-automatizadas-com-webhooks-na-api-whatsapp-oficial\"><strong>Step 4: Creating automated responses with Webhooks in the Official WhatsApp API<\/strong><\/h3>\n\n\n\n<p>Once we configure the sending of automated messages via the Official WhatsApp API in N8N, the next step, in turn, will be to create automatic responses whenever a user interacts with the company&#039;s WhatsApp. <\/p>\n\n\n\n<p>To do this, we will use Webhooks, which allow us to capture events and trigger automation flows in real time.<\/p>\n\n\n\n<p>They work as automatic triggers, firing events whenever interactions occur on WhatsApp. In turn, in the case of the Official WhatsApp API, these Webhooks are triggered as soon as a message arrives and then send the data to N8N for processing. <\/p>\n\n\n\n<p>With this functionality, therefore, you can automate interactions such as:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Quick responses for customers;<\/li>\n\n\n\n<li>Integration with systems such as CRMs and ERPs;<\/li>\n\n\n\n<li>Automated support ticket generation;<\/li>\n\n\n\n<li>Sending personalized messages based on user interaction.<\/li>\n<\/ul>\n\n\n\n<p>To capture messages received on WhatsApp and trigger automations on <a href=\"https:\/\/nocodestartup.io\/en\/n8n-course-2\/?utm_source=site&amp;utm_medium=home-site&amp;utm_campaign=ppt-n8n&amp;utm_content=header-formacoes-n8n&amp;conversion=ppt-n8n\">N8N<\/a>, follow the step by step below:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Access N8N and create a new automation flow.<\/li>\n\n\n\n<li>Click on \u201c+\u201d and add a WhatsApp trigger node.<\/li>\n\n\n\n<li>Select the \u201conMessage\u201d option to capture incoming messages.<\/li>\n\n\n\n<li>Configure a new credential by entering:\n<ul class=\"wp-block-list\">\n<li>Client ID and Client Secret, obtained from Meta for Developers.<\/li>\n\n\n\n<li>Webhook URL automatically generated by N8N.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>From your Meta dashboard, go to Settings &gt; Webhooks and:\n<ul class=\"wp-block-list\">\n<li>add the Webhook URL generated in N8N as Callback URL.<\/li>\n\n\n\n<li>define the events to be monitored (e.g. received messages).<\/li>\n\n\n\n<li>Click Verify and Save to activate the Webhook.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Run a test by sending a message to the linked WhatsApp.<\/li>\n\n\n\n<li>In N8N, confirm that the message was captured and processed correctly.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"683\" src=\"https:\/\/nocodestartup.io\/wp-content\/uploads\/2025\/03\/api-whatsapp-oficial-guia-completo-de-integracao-passo-4-1024x683.jpg\" alt=\"\" class=\"wp-image-20244\" srcset=\"https:\/\/nocodestartup.io\/wp-content\/uploads\/2025\/03\/api-whatsapp-oficial-guia-completo-de-integracao-passo-4-1024x683.jpg 1024w, https:\/\/nocodestartup.io\/wp-content\/uploads\/2025\/03\/api-whatsapp-oficial-guia-completo-de-integracao-passo-4-768x512.jpg 768w, https:\/\/nocodestartup.io\/wp-content\/uploads\/2025\/03\/api-whatsapp-oficial-guia-completo-de-integracao-passo-4-1536x1024.jpg 1536w, https:\/\/nocodestartup.io\/wp-content\/uploads\/2025\/03\/api-whatsapp-oficial-guia-completo-de-integracao-passo-4-2048x1365.jpg 2048w, https:\/\/nocodestartup.io\/wp-content\/uploads\/2025\/03\/api-whatsapp-oficial-guia-completo-de-integracao-passo-4-18x12.jpg 18w, https:\/\/nocodestartup.io\/wp-content\/uploads\/2025\/03\/api-whatsapp-oficial-guia-completo-de-integracao-passo-4-150x100.jpg 150w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conclusao\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p>By now, you should have learned how to integrate the Official WhatsApp API with <a href=\"https:\/\/nocodestartup.io\/en\/n8n-course-2\/?utm_source=site&amp;utm_medium=home-site&amp;utm_campaign=ppt-n8n&amp;utm_content=header-formacoes-n8n&amp;conversion=ppt-n8n\">N8N<\/a> allows you to efficiently automate communication processes, connecting WhatsApp to internal systems, CRMs, ERPs and other platforms.&nbsp;<\/p>\n\n\n\n<p>Now that you&#039;ve learned how to integrate the Official WhatsApp API with N8N, how about taking advantage of this time to deepen your knowledge and explore the automation possibilities even further?<\/p>\n\n\n\n<p>Therefore, in the <a href=\"https:\/\/nocodestartup.io\/en\/n8n-course-2\/?utm_source=site&amp;utm_medium=home-site&amp;utm_campaign=ppt-n8n&amp;utm_content=header-formacoes-n8n&amp;conversion=ppt-n8n\">NoCode Startup N8N course<\/a>, you will have access to complete and practical training on automation and data integration, and thus be able to make your company even more efficient.<\/p>\n\n\n\n<p>Whether it\u2019s to create intelligent chatbots, <a href=\"https:\/\/nocodestartup.io\/en\/how-to-use-ai-for-customer-service-2\/\">integrate AI into your service<\/a>or optimize <a href=\"https:\/\/nocodestartup.io\/en\/discover-how-to-use-ai-for-sales-2\/\">marketing and sales processes<\/a>, O <a href=\"https:\/\/nocodestartup.io\/en\/n8n-course-2\/?utm_source=site&amp;utm_medium=home-site&amp;utm_campaign=ppt-n8n&amp;utm_content=header-formacoes-n8n&amp;conversion=ppt-n8n\">N8N<\/a> can take your automation to a new level. <a href=\"https:\/\/nocodestartup.io\/en\/n8n-course-2\/?utm_source=site&amp;utm_medium=home-site&amp;utm_campaign=ppt-n8n&amp;utm_content=header-formacoes-n8n&amp;conversion=ppt-n8n\">Access the full course<\/a> and learn how to master this powerful tool and transform the way your company communicates!&nbsp;<\/p>","protected":false},"excerpt":{"rendered":"<p>Discover how to configure the Official WhatsApp API on N8N to create smart automations, integrate chatbots and optimize your company&#039;s service, marketing and sales! <\/p>","protected":false},"author":4,"featured_media":20241,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"post_folder":[],"class_list":["post-20239","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-no-code"],"acf":[],"_links":{"self":[{"href":"https:\/\/nocodestartup.io\/en\/wp-json\/wp\/v2\/posts\/20239","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nocodestartup.io\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nocodestartup.io\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nocodestartup.io\/en\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/nocodestartup.io\/en\/wp-json\/wp\/v2\/comments?post=20239"}],"version-history":[{"count":0,"href":"https:\/\/nocodestartup.io\/en\/wp-json\/wp\/v2\/posts\/20239\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nocodestartup.io\/en\/wp-json\/wp\/v2\/media\/20241"}],"wp:attachment":[{"href":"https:\/\/nocodestartup.io\/en\/wp-json\/wp\/v2\/media?parent=20239"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nocodestartup.io\/en\/wp-json\/wp\/v2\/categories?post=20239"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nocodestartup.io\/en\/wp-json\/wp\/v2\/tags?post=20239"},{"taxonomy":"post_folder","embeddable":true,"href":"https:\/\/nocodestartup.io\/en\/wp-json\/wp\/v2\/post_folder?post=20239"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}