Learn how to connect WooCommerce product data with a Telegram bot using BotSailor HTTP API, custom fields, and automated product information replies.
How to Show WooCommerce Product Information in Telegram Using BotSailor HTTP API
Imagine you run an online clothing store on WordPress with WooCommerce, and you want your Telegram customers to check product details instantly. In this tutorial, we will use a sample product, the Classic Cotton T-Shirt, and build an automation where a customer sends a keyword in Telegram and BotSailor replies with the product name, SKU, price, and link, pulled live from your store through the HTTP API.
Prerequisites
Before starting the integration, make sure you have:
- ● An active WordPress website with WooCommerce installed.
- ● At least one published WooCommerce product.
- ● An active BotSailor account.
- ● A connected Telegram bot in BotSailor.
- ● Access to BotSailor’s HTTP API and Subscriber Manager features.
- ● Access to your Telegram account for testing.
Example used in this tutorial:
- ●Product Name: Classic Cotton T-Shirt
- ●SKU: TSHIRT-001
- ●Product ID: 12
- ●API Name: WordPress Product API
- ●HTTP Method: GET
- ●Trigger Keyword: productcheck
- ●Telegram Bot: Zedzzzz (@Zedzzzzbot)
Important
The product must be published. The integration retrieves product information through the WooCommerce Store API, which only returns publicly available product data.
Step-by-Step Instructions
Step 1: Create a Product in WooCommerce
First, create a product in your WooCommerce store. The product information will be retrieved through the WooCommerce Store API and sent to Telegram.
- 1 Log in to your WordPress dashboard.
- 2 Navigate to Products from the left-hand sidebar.
- 3 Click Add New Product or open an existing product.
For this demonstration, enter the following product details:
- ●Product Name: Classic Cotton T-Shirt
- ●SKU: TSHIRT-001
- ●Regular Price: 850
- ●Sale Price: 750
- ●Product Description: Comfortable cotton T-shirt for casual wear.
- 4 Review the product details.
- 5 Click Publish or Update.
- 6 Make sure the product is published and publicly accessible.
Step 2: Access the WooCommerce Product API
After publishing your product, prepare the API endpoint that will retrieve its information. WooCommerce provides a Store API that allows external applications to access publicly available product information. The endpoint follows this structure:
For this demonstration, the endpoint is:
- 1 Replace YOUR-DOMAIN.com with your actual website domain.
- 2 Replace 12 with your product’s actual ID.
- 3 Keep this endpoint ready. You will need it when configuring the HTTP API in BotSailor.
The HTTP method for this request is GET because the purpose is to retrieve existing product information rather than create or update a product.
Step 3: Navigate to the HTTP API Integration in BotSailor
Now move to your BotSailor dashboard.
- 1 Log in to your BotSailor account.
- 2 Open Chatbot Manager.
- 3 Select your connected Telegram bot, Zedzzzz.
- 4 Navigate to the Integrations tab.
- 5 Select HTTP API.
- 6 Click the Create button.
You can now configure a new HTTP API connection.
Step 4: Configure the HTTP API Details
After you click Create, BotSailor displays the HTTP API configuration interface. Provide the basic connection information here.
- 1 In the API Name field, enter the name below. Choose a descriptive name so you can easily identify this integration later.
- 2 From the Method dropdown, select GET.
- 3 In the API Endpoint URL field, paste your WooCommerce Store API endpoint.
- 4 Check that the domain and product ID are correct before continuing.
Step 5: Configure the Request Data
The next section is Request Data. It allows you to configure additional information that is sent with your API request. In this example, the API endpoint already contains the product ID, so additional request body information is not required.
- 1 Open the Body tab.
- 2 Keep the DEFAULT option selected.
- 3 Do not add unnecessary body parameters.
- 4 Leave Headers, Option Data, and Cookies unchanged unless your API requires additional information.
Using the AI API Builder (Optional)
BotSailor also provides an AI API Builder to help configure API integrations. You can use the following options:
- ●Describe in English: Explain the API integration in plain English.
- ●Paste cURL: Provide a cURL command.
- ●Paste your API docs: Supply API documentation.
- ●Paste JSON: Provide JSON information.
For this example, manually entering the API details is sufficient.
Tip
Review any AI-generated configuration before using it.
Step 6: Test and Verify the API Request
Before using the API in your chatbot automation, test whether BotSailor can successfully retrieve product information. Scroll down to the Test & Verify section, where you will find two testing options:
- ●Use Sample Data: Tests the API using predefined sample values.
- ●Use Recent Subscriber: Uses information from a selected subscriber.
- 1 Select Use Sample Data.
- 2 Review the API configuration.
- 3 Click Send Test Request.
- 4 Wait for the response.
- 5 Check the Last Response panel.
If the request is successful, BotSailor displays the API response in JSON format. The response should contain product information such as:
- ● Product ID
- ● Product name
- ● Product slug
- ● Product permalink
- ● SKU
- ● Short description
- ● Product description
- ● Pricing information
For the example product, the response includes Name: Classic Cotton T-Shirt, SKU: TSHIRT-001, Product ID: 12, and Price: 75000.
Important
The API response shows 75000 as the raw price value. It is not automatically formatted as $750.00 in the chatbot message.
Step 7: Create Custom Fields in Subscriber Manager
Before mapping the API response, prepare the custom fields where BotSailor can store the retrieved product information. Custom fields allow BotSailor to store additional subscriber-related information that can be used in chatbot automations. For this integration, we will create four custom fields.
- 1 Navigate to Subscriber Manager from the left-hand sidebar.
- 2 Locate the Manage Custom Fields option.
- 3 Click Create Custom Field.
- 4 Enter the custom field name below. This field stores the product name retrieved from WooCommerce.
- 5 Select Text as the field type.
- 6 Click Save.
Repeat the same process for the remaining three fields, using Text as the field type for each:
Stores the product SKU.
Stores the product permalink.
Stores the raw product price.
Important
Make sure the field names are written exactly as shown. These names will be used later during response mapping.
- 7 Open the Manage Custom Fields panel again.
- 8 Make sure all four fields appear in the custom field list.
Step 8: Configure the API Response Mapping
Now return to the HTTP API configuration page. The Response Mapping section connects the information received from the WooCommerce API with the custom fields you created. This tells BotSailor where to store each product value.
- 1 Scroll down to the Response Mapping (Optional) section.
- 2 Click Add Mapping to create a mapping row.
- 3 In the first row, set Response Field (From API) to name and Map to Custom Field to product_name.
- 4 Click Add Mapping again. Set Response Field (From API) to sku and Map to Custom Field to product_sku.
- 5 Click Add Mapping again. Set Response Field (From API) to permalink and Map to Custom Field to product_url.
- 6 Click Add Mapping again. Set Response Field (From API) to prices > price and Map to Custom Field to product_price_raw.
- 7 Leave the Formatter options unchanged for this example.
Your response mapping should now contain four rows:
- ●name → product_name (stores the product name)
- ●sku → product_sku (stores the product SKU)
- ●permalink → product_url (stores the product’s direct URL)
- ●prices > price → product_price_raw (stores the raw price value returned by the API)
Step 9: Save the HTTP API Configuration
After completing all four mappings, save your API configuration.
- 1 Review each response field.
- 2 Check that every API response field is connected to the correct custom field.
- 3 Click Save API.
BotSailor displays a success confirmation indicating that the HTTP API data has been mapped and saved successfully. This means your API configuration and response mappings are saved.
Step 10: Verify the Saved HTTP API
After saving, confirm that your new API appears in the list.
- 1 Return to the HTTP API list.
- 2 Find your newly created API, WordPress Product API.
- 3 Check the API name, verification status, Total Calls, Total Success, and Total Error.
In the demonstration, the API shows Total Calls: 2, Total Success: 2, and Total Error: 0. This confirms that both recorded API requests were successful.
Step 11: Create a Keyword-Based Automation
Now that the API is ready, create a chatbot automation that customers can trigger from Telegram.
- 1 Navigate to Chatbot Manager.
- 2 Select your connected Telegram bot, Zedzzzz.
- 3 Open the Automation tab.
- 4 Select Keyword Replies.
- 5 Click Create.
In the Basic Setup section, enter the following information:
- 6 In the Trigger Keywords field, enter:
- 7 For Keyword Matching Type, select Exact keyword match.
- 8 In the Title field, enter:
- 9 Review the keyword settings and save the reference.
- 10 Check that WordPress Product Information now appears in your Keyword Replies list.
When a Telegram subscriber sends the exact keyword productcheck, BotSailor executes this automation.
Step 12: Understand the Bot Flow
After creating the keyword reply, configure the actual automation flow. The flow needs three connected components, and each one has a specific job:
- ●Start Bot Flow: Starts the automation when the keyword is triggered.
- ●HTTP API: Retrieves the latest product information from WooCommerce.
- ●Text: Displays the retrieved information in Telegram.
The connection should follow this order:
Step 13: Add and Configure the HTTP API Node
Next, connect your saved WooCommerce API to the automation.
- 1 Open the bot flow editor.
- 2 Select the HTTP API component from the available message options.
- 3 Add it after the Start Bot Flow component.
- 4 Connect the Start Bot Flow output to the HTTP API input.
- 5 Open the HTTP API configuration panel.
- 6 Under HTTP API List, select the API below:
- 7 Click Save Changes.
You do not need to recreate the API configuration because it was already saved under Integrations. The HTTP API node is now ready to retrieve product information when the automation runs.
Step 14: Configure the Text Message
Once the HTTP API node is configured, add a Text component to display the retrieved information.
- 1 Click the output connection of the HTTP API node.
- 2 Select Text from the available options.
- 3 Connect the HTTP API node to the Text node.
- 4 Open the Text configuration panel.
- 5 In the Reply message field, enter the message below. Use BotSailor’s Custom variable selector to insert the variables instead of typing product values:
📦 Product Name:
#product_name#
SKU: #product_sku#
💰 Price:
#product_price_raw#
🔗 Product Link: #product_url#
Make sure the variable names match the fields created in Subscriber Manager:
- ●#product_name#
- ●#product_sku#
- ●#product_price_raw#
- ●#product_url#
Important
Do not type ordinary product values into the message if you want the bot to retrieve dynamic information. When the automation runs, these variables are filled using the values stored through the API response mapping.
- 6 Review the content and verify that all four variables are included.
- 7 Click Save Changes.
Step 15: Connect and Save the Complete Automation
Before testing, review the complete flow. Make sure the nodes are connected in the correct order:
Also check that:
- ● The Start Bot Flow uses the productcheck keyword.
- ● The HTTP API node uses WordPress Product API: GET.
- ● The Text node contains the correct dynamic variables.
- ● No connection between the three nodes is missing.
- 1 Click Save in the flow editor.
Your WooCommerce product information integration with Telegram is now configured.
Success Verification
Now it is time to test the complete integration. Go through this checklist:
- ● Open your connected Telegram bot, Zedzzzz (@Zedzzzzbot).
- ● Send the keyword productcheck in the Telegram chat.
- ● BotSailor recognizes the exact keyword and starts the WordPress Product Information automation.
- ● The HTTP API request runs and retrieves the WooCommerce product information.
- ● The mapped custom fields are used and the Text node sends the product information.
- ● The Telegram response displays Product Name: Classic Cotton T-Shirt, SKU: TSHIRT-001, Price: 75000, and the Product Link of your published WooCommerce product.
You can also review each request in BotSailor’s HTTP API Report.
Remember
The price appears as the raw value 75000 because it is mapped to product_price_raw without extra formatting. This is expected in this demonstration.
Troubleshooting
If your Telegram bot does not return the expected product information, check the following possible issues.
1. API Request Failed
Possible cause: The API endpoint URL or product ID is incorrect.
Solution:
- 1 Check your WooCommerce product ID.
- 2 Verify the API endpoint.
- 3 Make sure the product is published.
- 4 Run another test using Send Test Request.
2. Product Information Is Missing
Possible cause: The API response mapping is incomplete or incorrect.
Solution:
- 1 Open the saved HTTP API configuration.
- 2 Review the Response Mapping section.
- 3 Verify the API response fields.
- 4 Make sure all four fields are mapped to their correct custom fields.
3. Custom Fields Are Not Working
Possible cause: The custom field names do not match the variables used in the Text node.
Solution:
- 1 Open Subscriber Manager.
- 2 Check the four custom field names.
- 3 Make sure their spelling matches the mapped fields.
- 4 Verify that the Text node uses the correct variables.
4. Telegram Bot Does Not Respond
Possible cause: The keyword reply or flow has not been saved correctly.
Solution:
- 1 Check whether the keyword is productcheck.
- 2 Verify that Exact keyword match is selected.
- 3 Make sure the automation is saved.
- 4 Check the connection between Start Bot Flow, HTTP API, and Text.
5. Product Price Appears Without Currency Formatting
Possible cause: The API response is mapped to product_price_raw, which stores the raw price value.
Solution: Review the API response and its Formatter settings if you want to display the price with a currency symbol or a formatted decimal value. In this demonstration, the raw value 75000 is displayed without additional formatting.
Next Steps
After successfully connecting WooCommerce with Telegram, you can expand the integration to support additional product information and customer interactions. Some possible improvements include:
- ●Multiple Product Integrations: Create additional API configurations for retrieving information about different products.
- ●Additional Product Fields: Extend your response mapping to include product descriptions, images, stock information, or other available API data.
- ●Product Category Automation: Create separate keyword replies for different product categories.
- ●Price Formatting: Use suitable data formatting to display prices in a more readable currency format.
- ●Product Inquiry Automation: Add buttons or follow-up messages to help customers explore products.
- ●Order and Customer Automation: Build additional API integrations for other WooCommerce operations where supported.
By combining WooCommerce, BotSailor HTTP API, Subscriber Manager, and Telegram automation, you can build a more connected product information experience for your customers.


