webform_url()
Get the private link that opens one record in an edit web form, with no login. Use it to email a customer a link to their own order, or a supplier a link to the line they need to price.
Syntax
webform_url(webformId, recordId)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
webformId |
int | yes | The id of an edit web form on a table in this automation's workspace scope. |
recordId |
int | yes | The record to open. Usually $record["_meta"]["id"]. Also accepts a whole record. |
Returns
The link as a string.
Example
$link = webform_url(412, $record["_meta"]["id"]);
smtp_email_send("Main SMTP", [
"to" => $record["email"],
"subject" => "Please confirm your details",
"html" => "<p><a href=\"" . $link . "\">Review and update your details</a></p>"
]);
Example output
"https://cloud.infolobby.com/form/s/kJ8xQ2mR7vN4pL9wT3yB6cF1hD5sA0zE"
Notes
- Each record has one link per form, and it stays the same on every run. An email you sent last month keeps working.
- It is the same link the record's Share menu shows. Resetting or revoking it there affects the links your automations send too.
- A revoked link is returned as it is, not quietly replaced. An automation firing again is not a decision to undo a revoke.
- The record id is not part of the link, and the link opens that one record only.
- Throws if the form is missing, is a regular web form (which has no per-record link), or is outside this automation's workspace scope.
- In the visual builder, use the
{{webform_url:<id>}}token instead of calling this directly. It fills in the trigger record for you.
See also: flow_url(), Web forms