HTTP requests and webhooks
Call web APIs and send webhooks from a workflow, use secrets for authentication, and understand which destinations RPA Plus refuses.
Trang này chưa có bản tiếng Việt. Nội dung tiếng Anh được hiển thị bên dưới.
Two nodes talk to web services directly, without the browser: HTTP request (http.request) and Send webhook (webhook.send). They run in Quin's engine, not in the profile's browser, so they do not use the profile's cookies or session.
HTTP request
| Parameter | Default | Meaning |
|---|---|---|
method | GET | GET, POST, PUT, PATCH, DELETE or HEAD |
url | — | http:// or https:// address |
headers | {} | Extra headers. Host, Content-Length and Transfer-Encoding are set automatically and refused here |
query | {} | Query parameters added to the address |
json_body | — | A value sent as JSON |
body | — | Text sent as the body (used when json_body is empty) |
auth_secret | — | The name of a secret; sent as Authorization: <auth_scheme> <value> |
auth_scheme | Bearer | The word before the secret in the Authorization header |
expect_status | — | A status or list of statuses that count as success |
timeout_s | 30 | 1–120 seconds |
retries | 0 | 0–5 extra attempts after a network error or an error status, waiting 1, 2, 4… s (at most 10 s) |
save_to | — | Variable for the result |
The result is an object:
{"status": 200, "headers": {"content-type": "application/json"}, "json": {"items": []}, "text": null, "url": "https://api.example.com/v1/orders"}json is filled when the response is JSON; otherwise text holds the body. Set-Cookie and Authorization headers are left out of the result.
Without expect_status, any status of 400 or above fails the node with http_error. With expect_status, any other status fails with unexpected_status — useful when, for example, 404 is a normal answer: "expect_status": [200, 404].
Example: read an internal API
{"id": "orders", "type": "http.request",
"params": {"method": "GET",
"url": "https://erp.example.com/api/orders",
"query": {"status": "open", "since": "{{ today() }}"},
"auth_secret": "erp_token",
"timeout_s": 60, "retries": 2,
"save_to": "orders"}}Then loop over {{ orders.json.items }} with For each, or count them with {{ len(orders.json.items) }}.
Example: post JSON
{"type": "http.request",
"params": {"method": "POST", "url": "https://hooks.example.com/tickets",
"json_body": {"title": "Price changed", "url": "{{ url }}", "new_text": "{{ current_text }}"},
"expect_status": [200, 201], "save_to": "created"}}Send webhook
Send webhook always POSTs json_body to url, with timeout_s (30) and Save to. If you set secret_header to the name of a secret, its value is sent in the header X-Quin-Signature-Secret, so the receiver can check that the call comes from you. A response of 400 or above fails the node.
{"type": "webhook.send",
"params": {"url": "https://chat.example.com/hooks/abc", "json_body": {"text": "Daily report ready: {{ file }}"},
"secret_header": "chat_webhook"}}Keep credentials in secrets
- Store tokens and passwords in Variables & Data → Secrets and refer to them by name (
auth_secret,secret_header) or with{{ secret('name') }}in a header. - A user name or password inside the address (
https://user:pass@host/) is refused: Put credentials in a secret, not in the address. - Secret values are redacted from the run log and step outputs.
Which destinations are allowed
HTTP nodes can reach public http/https addresses. To protect your computer and network from workflows you import, they refuse destinations that resolve to:
- this computer (loopback, such as
127.0.0.1orlocalhost); - private and local networks (such as
10.x,172.16–31.x,192.168.x, carrier-grade NAT100.64.0.0/10), link-local, multicast, unspecified and reserved addresses; - cloud metadata services (such as
169.254.169.254); - host names ending in
.localhost,.local,.internal,.lanor.home.arpa.
The refusal is the error destination_forbidden; a name that cannot be resolved is destination_unresolved.
The address is checked when connecting: each connection goes to exactly the address that was checked at that moment, so a name that first resolves to a public address and then to a local one (DNS rebinding) is still refused. TLS still verifies the certificate against the host name. Redirects are followed by Quin itself — at most 5, each one checked again (too_many_redirects beyond that); a 301, 302 or 303 redirect after a POST continues as a GET. Responses are limited to 5 MB (too_large).
Approved destinations
To call a service on your own network — an internal API, a test server, a tool on this computer — add its host in RPA Plus → Settings → Approved destinations (up to 100). An approved host is allowed as it is, including local and private addresses.
Enter the host name or IP address as it appears in the request's address, for example erp.intranet.example or 10.0.0.5. A host without a port covers every port and path of that host; host:port (for example 10.0.0.5:8080, or [::1]:8080 for IPv6) covers only that port. A pasted address such as https://erp.intranet.example/ is reduced to its host.
Imported workflows never add approved destinations. The import preview lists the addresses a workflow contacts, so you can see them before you approve anything.
Browser pages are different
These rules apply to the HTTP nodes. Browser nodes (Go to URL, New tab) open pages in the profile's browser through its own proxy; they accept http(s): addresses (and, for Go to URL, data: pages and about:blank), and refuse file:, browser settings pages and browser-internal addresses.