Initial concepts
So, what we can do with the Platform?
How do I know if my company needs a chatbot?
Register and login
First Steps - Creating your project
Choose your plan
Profile
Permission System
Project Dashboard
Platform Glossary
Changing the Platform Language
2-Factor Authentication
Invalid authentication code
General settings
Artificial Intelligence
Agent Builder
Zero Shot Learning
WeniGPT
Weni Platform AI Module
Repository - Overview
What is an Intelligence?
Intents and Entities
Hands-on
Creating an Intelligence
Training your Intelligence
Strength of Intelligence
Testing your intelligence
Interactions
Translating your dataset
Versioning
Settings
API
Integrating Intelligence into a Project on the Weni Platform
Introduction to Content Intelligence
Integrating a Content Intelligence
Interface Updates
Glossary
Guidance and Best Practices
Flows
Expressions and Variables Introduction
Variables Glossary
Expressions Glossary
Flows Creation
Flows introduction
Flow editor and tools
Action cards
Decision cards
Adding Media to the message
Call Webhook: Making requests to external services
Split by Intent: Using Classification Artificial Intelligence
Import and export flows
Using expressions to capture the user's location
Viewing reports on the platform
Route markers
WhatsApp Message Card
Studio
Contacts and Messages
Groups
Messages
Triggers and Campaigns
Adding a trigger
Triggers Types
Tell a flow to ignore triggers and keywords
Campaign introduction
How to create a Campaign
Editing events
Creating contact from an external Webhook
Contact history
How to Download and Extract Archived Data
Channels
Settings
How to connect and talk to the bot through the settings
Adding a Facebook Channel
Adding a Viber channel
How to Create an SMS Channel - For Developers (RapidPro)
Web Chat Channel
General API concepts and Integrations
How to create a channel on twitter
How to create a channel on Instagram
How to create an SMS channel
Adding ticket creation fields in Zendesk
Adding Discord as a channel
Creating a Slack Channel
Adding a Viber channel (RapidPro)
Creating a Microsoft Teams channel
Weni Integrations
How to Use the Applications Module
How to Create a Web Channel
Adding a Telegram channel
How to create a channel with WhatsApp Demo
Whatsapp: Weni Express Integration
Whatsapp: How to create Template Messages
WhatsApp Template Messages: Impediments and Configurations
Supported Media Sending - WhatsApp Cloud
Whatsapp Business API
Integrations
Human Attendance
Weni Chats: Introduction to the Chats module
Weni Chats: Setting Up Human Attendance
Weni Chats: Human Service Dashboard
Weni Chats: Human Service Management
Weni Chats: Attendance distribution rule
Weni Chats: Using active triggering of flows
Weni Chats: CoPilot
Ticketer: Ticketer on Rapid Pro
Ticketer: How to integrate Rocket.Chat as a ticket service on the Weni Plataform
How to send message templates through RocketChat
RocketChat call routing
RCAdmin API: Agent-Activity
U-Partners - Proper use of features
Using groups to organize human attendance
Data and BI
How to Install and Use the Weni Data Connector for Power BI
Incremental Update - Power BI
Explore Weni's Database Documentation
Tips for Data Modeling in Power BI
Filter using Contact Fields in Power BI
UX Writing
- All Categories
- Flows
- Call Webhook: Making requests to external services
Call Webhook: Making requests to external services
Updated by Mallu
What is an API?
The acronym API corresponds to “Application Programming Interface“. They are a way of integrating systems, enabling benefits such as data security and ease of exchanging information
Today, the ability to connect and integrate with other systems is an essential feature for most solutions today. For this reason, we have an action card to use in flows precisely for this function: Call Webhook
Call Webhook
The Call Webhook card is responsible for the connection between the platform and other external systems, below, we have a little about her anatomy:
- Request method: Where you define what will be the method for your API request (GET, POST, PUT or DELETE);
- Request URL: Where you place the request URL for the API;
- Request header: Where you place the request header along with information such as authorization tokens and content types;
- Request body: Where you add a body for your request (used for POST and PUT);
How to format the request body correctly
Normally, for the POST and PUT requests body we use JSON notation to send the information requested by the API. Below is an example of a JSON body:
{"platform": "push", "author": "john"}
How can we reproduce this notation using the webhook call card? On the platform, we use the functions @json
and @object
for this construction, the first to signal which notation we will translate the values, and the second to signal the beginning and end of our keys. Translating the example above to the notation used on the platform, we have:
@(json (object ("platform", "push", "author", "john")))
If you want to use a variable such as @contact.name
for the "author" field in our example, we have:
@(json (object ("platform", "push", "author", contact.name)))
The request body accepts all variables and expressions supported on the platform.
Navigating a Webhook
After making the request, you can use some expressions to query information from the response.
- @results
@results.[name of the result from the Call Webhook card]
: To check the request status, such as 200, 400, 500.
- @webhook
This expression is used to retrieve values returned from the last webhook call made in the flow. For example:@webhook
: The value of this variable is the full response from the last request made.@webhook.results.client
: Name of the client returned by the API, if only one object is returned.@webhook.results.0.client
: Name of the client returned by the API. If the response is in an array, you need to specify the position of the array, such as 0, 1, 2, and so on.