You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
842 B
32 lines
842 B
log("inicia afip_inicio_loading")
|
|
local err
|
|
local json = require("json")
|
|
local obj, err = json.decode(json_payload)
|
|
|
|
if err then
|
|
log("Decoding JSON error" .. err)
|
|
error("Decoding JSON error" .. err)
|
|
end
|
|
|
|
local function post_to_n8n(endpoint, json)
|
|
local http = require("http")
|
|
local client = http.client()
|
|
local request = http.request("POST", endpoint, json)
|
|
request:header_set("Content-Type", "application/json")
|
|
local result, err = client:do_request(request)
|
|
if err then
|
|
log_print("post_to_n8n error: " .. err)
|
|
error(err)
|
|
end
|
|
end
|
|
|
|
post_to_n8n("https://automation.rodley.ar/webhook/98b3a336-bb11-4b36-b206-c48690b54e0f", json_payload)
|
|
|
|
|
|
log("Por abrir pagina de loading")
|
|
err = navigate("https://www.bot-bunny.com/loading")
|
|
if err then
|
|
log("navigate error" .. err)
|
|
error("navigate error" .. err)
|
|
end
|
|
waitSecs(5)
|
|
|