- Go to developers.facebook.com.
- Select your app and go to App Settings > Basic.
- Copy the following:
- App ID
- App Secret
- In N8N, go to Credentials and create a new OAuth2 credential.
- Enter:
- Client ID: Use the App ID from Facebook.
- Client Secret: Use the App Secret from Facebook.
- Complete the OAuth flow and save the credential.
- After setting up the connection in N8N, go back to developers.facebook.com.
- Refresh the page.
- Go to WhatsApp > Configuration to test the Webhook connection.
- Make sure to use the Production URL for testing.
We now want to set up the API to send messages and templates.
- Go to business.facebook.com.
- In the bottom left, click on Settings.
- Make sure to select the correct Business Portfolio.
- In Settings, go to:
- Accounts → WhatsApp Accounts
- Select the WhatsApp Account you want to send messages from.
- Copy the Business Account ID shown on this page.
-
In the same Business Settings, go to:
-
Click on your System User.
- If not listed, add yourself as a System User first.
-
Click on Generate Token and follow these steps:
-
Click on Generate Token.
- If prompted, verify your account via email and then repeat the selection process.
-
Copy and Paste the Token in the Access Token field in N8N.
- In N8N, go to Credentials.
- Add the following:
- Business Account ID: Paste the ID from Step 3.
- Access Token: Paste the Token from Step 4.
- Save the credentials.
The setup is now complete and you can send messages and templates using the WhatsApp API in N8N.