Create shortlink
The Create Shortlink action node creates a short URL that redirects to a longer one, for example https://af.link/cnt8J1. It is available in apps, Services and Flows.
Usage
Shortlinks are useful where long URLs break or cost space, such as in SMS messages. The shortlink is written to a property, and you can then use it in a message, a QR code or a text.
Only shorten URLs that your app builds. A shortlink hides where it leads, so don't create shortlinks from URLs that users type in.
Properties
Target URL
The URL the shortlink redirects to. Bind to a String or URL property, or type a URL. It must be a complete URL, for example https://example.com/page. If it isn't, the action node fails with the error Create Shortlink: Invalid URL.
Shortlink to
The String or URL property that receives the full shortlink URL. If you bind to a property on a data source, the data source must already hold the object, so create it first. You can also write to an app variable.
TTL
How long the shortlink works, in seconds. Leave empty to use 7 days (604800). The longest TTL is 548 days (47347200) in Staging and Production and 7 days in Development and Test. Larger values are cut to the longest TTL.
Example
To send an order confirmation by SMS:
Build the order URL with a function, for example
https://myapp.appfarm.app/orders?id=followed by the order ID.Add Create Shortlink. Set Target URL to the function and Shortlink to to a String app variable
Order link.Add Send SMS and include
Order linkin the message.
Was this helpful?