Send to the shared area
When one item or a multi-selection is active, the shared-area button can copy the selected part from the workspace, group, true/false action branch, dialog, and variables surfaces into the device-local library.
No-Code Workspace — Block Reference
Sends a notification to a Discord, Telegram, or generic webhook
Documented for app version 1.0.50Updated:
Block Preview
Captured from the in-app Visual Builder block card in the English UI.

NOTIFY_WEBHOOK sends a short notification to a webhook target of your choice over an HTTPS POST while the macro runs; it is designed to push a "Round 5/10 done" style ping to Discord or Telegram without touching the phone. There are three presets: Discord and Telegram build the correct body automatically, while Generic gives a flexible POST to your own web service. The block adds no new Lua API; it runs on top of the existing HTTP_POST infrastructure (the runtime Request object) and serializes the body with JSON.stringify, so the variable bindings you weave into the message cannot break the payload. The message text supports both variable binding (the bound variable's VALUE, like the LOG block) and the shared {{ expression }} inline syntax (round counts, etc.).
Use when:
Learning that a long automation or test flow finished through a compatible webhook service without looking at the phone
Getting a remote progress ping when a threshold is crossed (e.g., "5/10 done")
Dropping an instant alert to your team or yourself on an error branch
Sending a configurable status POST to your own web service (Generic preset)
"Add Block" → "Webhook (NOTIFY_WEBHOOK)"
PRESET: choose Discord, Telegram, or Generic
Discord / Generic: enter the HTTPS address in the WEBHOOK URL field (the Discord address is host-locked to the Discord webhook domains)
Telegram: instead of typing the BOT TOKEN, enter the name of the KV KEY that holds the token plus the CHAT ID; the token is never embedded in generated code and is read at runtime with KV.get
MESSAGE: enter fixed text, a bound variable, or text with {{ expression }} (e.g., "Round {{ round }}/10 done")
On Discord you may set an optional USERNAME override
Set a TIMEOUT (ms) if needed; an empty/0 value applies the runtime default (15000 ms) and is rounded up to a 1000 ms minimum
Target type: Discord, Telegram, or Generic; body and host rules follow this
HTTPS target address for Discord/Generic (the Discord address is host-locked to Discord domains)
For Telegram, the name of the KV key holding the bot token; the token is not embedded and is read at runtime with KV.get
Telegram target chat identifier
Optional display-name override for Discord
Text to send; supports a bound variable and the {{ expression }} inline syntax
Request timeout; empty/0 = runtime default (15000 ms), minimum 1000 ms
| Parameter | Description |
|---|---|
| Preset | Target type: Discord, Telegram, or Generic; body and host rules follow this |
| Webhook URL | HTTPS target address for Discord/Generic (the Discord address is host-locked to Discord domains) |
| Bot Token KV Key | For Telegram, the name of the KV key holding the bot token; the token is not embedded and is read at runtime with KV.get |
| Chat ID | Telegram target chat identifier |
| Username | Optional display-name override for Discord |
| Message | Text to send; supports a bound variable and the {{ expression }} inline syntax |
| Timeout (ms) | Request timeout; empty/0 = runtime default (15000 ms), minimum 1000 ms |
Scenario: Report progress to Discord every 10 rounds
Keep the round counter in a {{ round }} variable inside a FOR_EACH or WHILE loop
COMPARE: branch to TRUE when round % 10 == 0
NOTIFY_WEBHOOK → preset=Discord, URL=your Discord webhook address
Message: "Round {{ round }}/{{ total }} done"
When the loop finishes, send a second NOTIFY_WEBHOOK with "All rounds completed"
COMBINATIONS:
WHILE/FOR_EACH + COMPARE + NOTIFY_WEBHOOK: threshold-based remote progress pings
ERROR_HANDLER + NOTIFY_WEBHOOK: instant Discord/Telegram alert on a critical fault
SET_VARIABLE + NOTIFY_WEBHOOK message: send dynamic status text ({{ expression }})
KV_SET + NOTIFY_WEBHOOK (Telegram): store the bot token safely in KV and let the block read it at runtime
Sends a notification to a Discord, Telegram, or generic webhook
WARNING:
Every webhook target must be HTTPS; plain HTTP or private/local-network addresses are rejected at save/run time
Never embed a Telegram bot token in the block or the generated code; enter only the name of the KV key that holds the token, so a shared/exported project file cannot leak the credential
The Discord preset address is host-locked to the Discord webhook domains; the validator rejects any other host
The message you send to a webhook target is visible to that service's operator; do not send personal data or secrets
Sending many notifications per second can hit the target service's rate limit
The same block at three levels: a quick start, the real options, and professional techniques.
NOTIFY_WEBHOOK sends a short notification to a webhook address of your choice over an HTTPS POST while the macro runs. It is built to push a 'Round 5/10 done' style ping to Discord or Telegram without touching the phone. There are three presets: Discord, Telegram, and Generic.
The fields change with the preset. For Discord and Generic you enter the HTTPS address in the WEBHOOK URL field (the Discord address is host-locked to the Discord webhook domains); on Discord you may set an optional USERNAME override. For Telegram you do not type the BOT TOKEN: you enter the name of the KV KEY that holds the token plus the CHAT ID, the token is never embedded in generated code and is read at runtime with KV.get. The MESSAGE field supports both a bound variable's value and the {{ expression }} inline syntax. If TIMEOUT is left empty/0 the runtime default (15000 ms) applies, rounded up to a 1000 ms minimum. The block adds no new Lua API; it runs on the existing HTTP_POST infrastructure (Request) and serializes the body with JSON.stringify, so the variables you weave into the message cannot break the payload.
The secure webhook-token pattern is the most important aspect of this block: never embed a Telegram bot token in the block or the generated code; enter only the name of the KV key that holds it. That way sharing or exporting the project cannot leak the credential. Every target must be HTTPS; plain HTTP or private/local-network addresses are rejected at save/run time, which prevents SSRF-style accidents. Sending many notifications per second can hit the target service's rate limit, so gate notifications behind a COMPARE threshold (e.g., round % 10 == 0). Remember: the message you send is visible to that service's operator; do not send personal data or secrets.
Small, reproducible examples that combine several blocks — build them straight into your own macro.
This block is useful on its own — but it shines when paired with the right partners.
Builds threshold-based remote progress pings, firing at meaningful points rather than every iteration.
Drops an instant Discord/Telegram alert on a critical fault.
Stores the bot token safely in KV; the block reads it at runtime and never embeds it in code.
Prepares dynamic status text ({{ expression }}) to feed into the message.
Writing the Telegram bot token in plain text into the message or URL. Fix: put the token in KV and enter only the KV key name; a shared project will not leak it.
Entering an HTTP (or local IP) webhook address. Fix: use only HTTPS public addresses; otherwise the validator rejects save/run.
Sending a notification every loop iteration and hitting the rate limit. Fix: send only at intervals using a COMPARE threshold.
Entering a non-Discord host into the Discord preset. Fix: the Discord address is host-locked to Discord domains; use the Generic preset for your own service.
Store the token in one KV key and reuse that key across macros; you rotate the token from a single place.
Use two separate NOTIFY_WEBHOOK calls for start and finish; remotely you confirm both that the macro started and that it ended.
The Lua below is what the Code Editor generates for this block with sample settings. Adding cases, branches, actions or loops, or changing settings, extends the generated code accordingly. Study it to see what the block does under the hood, to learn Lua, or to copy and adapt it. Use the Copy button (top-right) to paste it into the Code Editor, or “Try in Editor →” to run it in the live editor.
local _webhookBody1 = {}
_webhookBody1["content"] = tostring("farm bitti round " .. tostring(5))
local _webhookUrl1 = "https://discord.com/api/webhooks/1/abc"
local _webhookUrlLower1 = string.lower(_webhookUrl1)
if not (string.match(_webhookUrlLower1, "^https://discord%.com/api/webhooks/") or string.match(_webhookUrlLower1, "^https://discordapp%.com/api/webhooks/") or string.match(_webhookUrlLower1, "^https://canary%.discord%.com/api/webhooks/") or string.match(_webhookUrlLower1, "^https://ptb%.discord%.com/api/webhooks/")) then error("Discord webhook URL rejected") end
local _webhook1 = Request(_webhookUrl1)
_webhook1:setTimeout(15000, 15000)
_webhook1:setContentType("application/json")
_webhook1:setBody(JSON.stringify(_webhookBody1))
_webhook1:post()Note: generated code can evolve across versions; helper names (e.g. _reg1, m1) and internal optimizations may change. The logic and the called APIs reflect the block’s behavior.
The guidance below is not identical for every block. It summarizes the professional controls that most often repeat in the selected block family.
Choose clearly between a fixed coordinate, "act on match" (the position the previous search found), or an {x}-bound variable/dialog value to define where the action executes. Binding {matchX},{matchY} does not break across devices or resolutions.
Hold time, repeat count, and inter-action delay shape how aggressive or natural the action feels.
Random offsets or waypoints help validate fixed-coordinate tests across different screen layouts. "In-Match Jitter" randomizes the tap inside the match box and uses the configured margin to stay away from target boundaries. Keep repeated UI tests bounded and record a visible result.
Before-waits let UI settle before the action; after-waits let the next block see the updated screen state.
TOUCH and TOUCH_BREAK cover recipe-style touch flows. Raw pointer choreography such as Touch.down, Touch.move, Touch.up, Touch.dispatch, Touch.reset, Touch.breakAll, and Touch.releaseAfter is not exposed as a first-class builder block.
Touch.downTouch.moveTouch.upTouch.dispatchTouch.resetTouch.breakAllTouch.releaseAfterThe DIALOG block and dialog designer cover a bounded field set in the builder: Info Text, Text Input, Checkbox, Description, Radio Group, Dropdown, Multi Select, Tab Group, Date Time, Number Range, Slider, Image Picker, Color Picker, File Picker, Recorder Picker, Tag, Signature, and Spacer. The buttons are designed too: the Positive button and Negative button tabs set each button’s text, background, and border color, corner radius, and minimum height next to a preview. Freer Setting.builder composition, multi-step wizard flows, and mixed HUD/dialog choreography still do not map 1:1 into the builder.
Coming soonv1.0.51Two more fields: Agent Detect references (agent_detect_editor) lets the user pick a saved reference set or add and edit references, and Save confirms the selection; Navigation setup editor (navigation_editor) edits a saved map, marker and route from the Dialog and returns the setup and route selection without moving the character.
Setting.builderDialogHudTextViewAgentDetectEditorNavigationEditorHTTP_GET, HTTP_POST, and HTTP_PUT cover common fixed-method flows; HTTP_REQUEST covers one bounded request with method, header lines, body, content type, query parameters (GET and DELETE), timeout, and a bounded retry. These blocks never throw; they write the status code (-1 on a network failure). Cookie handling, chained request objects, and lower-level client flows still need the code editor.
Request()Request.setCookieRequest.getCookiesCUSTOM_CODEThe MAP, LIST, JSON_PARSE, REGEX_MATCH, and METRICS blocks cover the everyday cases: map actions, a static list, reading a value from a JSON path, regex match, find, replace, and split, and metrics actions. The rest of the Map, Array, JSON, Regex, and Metrics APIs (for example Array sort, filter, and map) is broader than the builder recipe model and stays on the CUSTOM_CODE and code editor side.
MapArrayJSONRegexMetricsRuntime helpers, raw Request objects, Lua built-ins such as print/pcall/xpcall, and free-form object chaining patterns are represented through CUSTOM_CODE or the code editor.
RuntimeRequestprintpcallxpcallCUSTOM_CODEEach block card now exposes an independent breakpoint toggle. When enabled, the breakpoint preference is stored with the block.
Breakpoints are only emitted into runtime code when Debug Mode is enabled from Visual Builder settings. When Debug Mode is off, breakpoints stay saved but do not pause execution.
Use ASSERT for fail-fast validation, and use breakpoints for step-by-step tracing and controlled pauses in the same flow.
Variables defined with SET_VARIABLE are accessible throughout the macro (global scope). All blocks can read/write the same variable.
However, a variable defined inside a GROUP will be 'nil' (undefined) until the GROUP executes. Blocks outside the GROUP using this variable may produce unexpected results.
FOR_EACH loop variables (item and index) only carry valid values inside the loop body. Outside the loop they are outside local scope and should not be used.
TRY_CATCH error variable is only valid within the catch block. If the try block succeeds, the catch branch is not entered and the error variable remains undefined.
TIP: Before using a variable inside a GROUP, assign a default value with SET_VARIABLE outside the GROUP. This way the variable won't be nil even if the GROUP has not run.
You can embed variable values and calculations into text fields using {{ expression }} syntax. Expressions inside double curly braces are evaluated as Lua code and the result is inserted into the text.
{{ expression }}Skor: {{ score + 1 }} → "Skor: " .. tostring(score + 1){{ name }} kazandı! → tostring(name) .. " kazandı!"X:{{ x }} Y:{{ y }} → "X:" .. tostring(x) .. " Y:" .. tostring(y)Expressions are checked by the sandbox policy. Security-sensitive calls like loadstring, require, debug are automatically blocked.
Keep scan regions as small as possible — improves speed, reduces false matches.
Always add an exit condition when using infinite loops (BREAK, timeout, or conditional exit).
Use network operations and error-prone steps inside TRY_CATCH.
If you need global error handling, use the Error Handler (ERROR_HANDLER) block as a singleton in the project.
Small coordinate offsets (CLICK/SWIPE) improve tap accuracy across different DPI and screen scales.
Customize macros with Dialog block — different parameters each run.
Define repeating steps once with GROUP_CALL, call from many places.
Cross-macro local library
The Local Shared Macro Area moves blocks, variables, dialog fields, gallery assets, and imported media dependencies between macros on the same device. It is device-local, not cloud sync, not Firebase sharing, and not a replacement for public macro sharing.
Professional usage model: put a reusable login flow, common scan region, shared dialog form, variable group, template image, color profile, replay recording, or imported PLAY_SOUND media file into the shared area from one macro, then import it from the relevant + menu in another macro.
VISUAL_BLOCKSVARIABLESDIALOG_FIELDSTEMPLATE_IMAGECOLOR_SWATCHREPLAY_RECORDMEDIA_FILEWhen one item or a multi-selection is active, the shared-area button can copy the selected part from the workspace, group, true/false action branch, dialog, and variables surfaces into the device-local library.
The shared-area entry under the + menu imports the selected item into the surface that opened it. Main workspace, group, action branch, dialog, and variables each receive the compatible item type.
Gallery items include template images, color swatches, replay records, and imported audio/media files. They can move between macros on the same device so repeated templates, colors, recordings, and PLAY_SOUND media assets do not need to be captured again.
The shared area is not a permanent dumping ground. Delete stale shared items from the shared-library panel; imports create a copy in the target macro and do not rewrite the source macro flow.
AI assistant
Tell MH AI what you want in plain language; it proposes the right block sequence and lands it in the workspace after you approve. In the current release it works with cloud providers such as Gemini, Claude, and OpenAI; on-device local models are on the roadmap.