This action is used to send an HTTP (s) request to an external system. Variation of send_me
uses the same features only additionally sends chat_id
and channel
An example of a complete block configuration:
{
"url": "<https://enpqsrtqcpoum00.m.pipedream.net?param1={{param1}>}",
"method": "POST",
"data": {
"data_source": "Kwizbot",
"client_id": "{{client_id_param}}"
},
"headers":{
"X-Path":"MyWayIsHighway"
},
"response_mapping": {
"param":"responseParam"
"list_obj": {
"text": "{{ccy}}/{{base_ccy}}",
"value": "{{buy}}"
}
},
"save_mapped_list_obj": "currency_mapped_obj",
"save_responce": "currency_arr"
}
In the configuration of this action, it is written:
url
- the address to which to send the request, you can use {{placeholders}}
method
- method of sending the request (get, post, put, patch)data
- additional parameters for sending, may contain placeholders, for example {{messenger_input_param}}
headers
- request headersresponse_mapping
- he ability to save the answer or parts of it in the state
list_obj
", is used, inside you can specify any object structure, using both the parameters already existing in the state and the API responsesave_mapped_list_obj
- name of the state parameter into which the object formed in list_obj will be savedsave_responce
- allows you to save the raw API response (as it came and save it)Possible event branching options:
ok
- successful request sendingnot_ok
- request wasn't sentMore about the practical aspects of using this action: Data transfer from Kwizbot via send_request и Getting API data using send_request