Trigger Intent in custom action

I"m combining relative and absolute URL and also a topic that I am fetching via an API call. The output provided is an URL. How can I train like this with more data? How to trigger the intent for each URL I receive as output?