Mandala
Government Portal

Sandbox Action Block

The one block for connecting a GST taxpayer session and for every action that files, cancels, or changes a real government record.

Connecting a GST taxpayer session, filing a real GSTR-3B, cancelling a real e-invoice, generating a real e-way bill -- none of these are ordinary tool calls. Connecting needs a human to enter an OTP; the rest, once the government accepts them, generally have no undo. The Sandbox Action block covers all of it: drop it on the canvas, pick a Category (GST Filing, TDS/TCS, E-Invoice, E-Way Bill) and an Operation within it -- the same Category + Operation pattern the read-only Sandbox tool uses for its own ~90 operations -- and the block's remaining fields change to match.

Sandbox Action is canvas-only -- it cannot be selected as an agent tool, by design. An agent building or editing a workflow can never wire one up on its own or pick one mid-conversation; only a human dragging the block onto the canvas can place it. This is what keeps an agent from ever being one tool-call away from connecting a session or filing something real.

This block doesn't cover the NIC E-Invoice/E-Way Bill connection -- that's a persistent, silently-refreshable username+password credential set up once per workspace, so it stays a Settings -> Government Portal Connections concern. See Connecting a GSTIN. The GST taxpayer OTP session, by contrast, lapses every ~6 hours, which is exactly why it needs a workflow-triggerable "Connect GST Taxpayer" operation here, not just a one-time Settings step.

Connecting a GST Taxpayer Session

Picking Connect GST Taxpayer (in the GST Filing category) establishes a GST taxpayer session for a GSTIN in one step: the workflow pauses here, and a link lets a human request and enter the OTP GST sends to the taxpayer's own registered contact. Every GST Filing/Ledgers read and every binding action for that GSTIN resolves the resulting session automatically once connected.

Execution reaches the block. Nothing is requested from GST yet -- the workflow pauses and persists its state, the same underlying mechanism Human in the Loop uses.

A connect link opens at the block's url output. If a delegate email was configured, that link is also emailed to them directly.

Whoever opens the link clicks "Get verification code." This is the moment GST actually sends the OTP -- nothing is requested until this click, since neither this integration nor Sandbox's own docs state how long a GST OTP stays valid.

The code is entered and verified. On success, the session is saved and the workflow resumes -- the block's output now shows connected: true and the session's expiry.

Fields: GSTIN, GST portal username, and an optional delegate email (if someone other than the workflow author holds OTP access -- they get the connect link by email and never need a Mandala account).

Outputs: connected (boolean), gstin, expiresAt (ISO timestamp, ~6 hours out), url (the connect/verify page for this pause).

A GSTIN only needs to be connected once per workspace, not once per workflow -- and reconnecting or revoking an existing connection is also available from Settings -> Government Portal without touching a workflow at all. Once it lapses, a Refresh GST Taxpayer Session tool call extends it by another 6 hours without a new OTP, as long as it's called before the session actually expires.

Binding Actions and the Confirmation Gate

Every operation other than Connect GST Taxpayer is a binding action: it never calls the government directly. Instead, the workflow pauses at a confirmation page, and the real call only happens after a human explicitly confirms it there.

Execution reaches the block. Instead of calling the government, the workflow pauses -- exactly like a Human in the Loop checkpoint -- and persists a snapshot so the pause survives redeploys and restarts.

A confirm page opens at the block's url output, showing a plain-language summary of exactly what's about to happen -- the GSTIN, the period, the amount, the e-way bill number, whatever fields matter for that specific action.

A human confirms. A routine action needs one click. An action the platform treats as especially consequential (filing a return, cancelling an e-invoice) additionally requires typing back a literal word -- FILE, CANCEL -- so a misclick can't fire it by accident. Filing GSTR-1, GSTR-3B, or GSTR-9 also asks for the filing-time OTP GSTN itself requires.

Only on confirmation does the real call fire. A wrong confirmation word, a bad OTP, or a rejection from the government returns the real error and changes nothing -- the same confirm link can be tried again. Only a successful call resumes the paused workflow.

A routine action

Confirm page for Reject E-Way Bill, showing a summary table and a single Confirm and proceed button

A consequential action

Confirm page for File GSTR-3B, showing a summary table, a cannot-be-undone notice, a type-to-confirm field, and an OTP input

Both the connect page and the confirm page need no Mandala account to open -- knowing the link (from the block's own url output, or an approval notification) is what grants access, the same way Human in the Loop's resume link works.

The 21 binding operations

All of these require the relevant Government Portal Connection first -- GST Taxpayer (via Connect GST Taxpayer above, or Settings) for the GST Filing family, the matching NIC connection for E-Invoice/E-Way Bill.

GST Filing

OperationConfirmationNotes
File GSTR-1Type FILE + OTPFiles the period's GSTR-1 for real
Offset Liability (GSTR-3B)Type OFFSETDebits the electronic cash/ITC ledger -- a real payment, not a draft step
File GSTR-3BType FILE + OTPFiles the period's GSTR-3B for real
File GSTR-9Type FILE + OTPFiles the annual GSTR-9 for real
IMS Save Invoice StatusOne clickSets Accept/Reject/Pending on inward invoices in the Invoice Management System

TDS/TCS

OperationConfirmationNotes
TDS/TCS E-file SubmitOne clickSubmits a previously-generated FVU return for e-filing

E-Invoice

OperationConfirmationNotes
Generate e-InvoiceType GENERATEIssues a real IRN with NIC
Cancel e-InvoiceType CANCELNIC only allows this within a limited window
Generate E-Way Bill from IRNOne clickGenerates an e-way bill against an already-issued IRN

E-Way Bill

OperationConfirmation
Generate E-Way BillOne click
Cancel E-Way BillOne click
Extend E-Way Bill ValidityOne click
Update E-Way Bill VehicleOne click
Update E-Way Bill TransporterOne click
Close E-Way BillOne click
Consolidate E-Way BillsOne click
Regenerate Consolidated E-Way BillOne click
Initiate Multi-Vehicle E-Way BillOne click
Add Vehicle (Multi-Vehicle)One click
Update Vehicle (Multi-Vehicle)One click
Reject E-Way BillOne click

Best Practices

  • Connect once per GSTIN, not once per workflow. Every GST Filing/Ledgers tool and every binding action for that GSTIN reuses the same connection automatically.
  • Reconnect proactively for workflows that run more than a few hours apart. A ~6-hour GST taxpayer session means anything on a daily or slower schedule needs either a Refresh step first, or a fresh Connect GST Taxpayer run, not an assumption the session is still good.
  • Use a delegate email whenever the workflow author isn't the one holding OTP access. The alternative -- watching the paused-executions list and relaying a code manually -- doesn't scale and is easy to miss.
  • Route the confirm/connect link to whoever actually owns the decision. The block's url output is the whole approval surface -- wire it into a notification (Slack, email) the same way you would for Human in the Loop, so the right person sees it instead of it sitting undiscovered in a paused-executions list.
  • Don't build a workaround for the type-to-confirm step. It exists specifically because these actions can't be undone; treat a severe action's extra friction as a feature, not something to script past.
  • Test with the test environment field first. Every binding operation's Environment field defaults to test, which never touches a real government system -- use it to prove the workflow's wiring before ever selecting production. (Connect GST Taxpayer has no environment field -- it always connects to the real gst.gov.in, since there's no test OTP.)
Sandbox Action Block