Would be nice to have a capture information card that captures a link sent by the user.
My use case is that the user can send a link that I will then use with the GPT-4 Vision API. The problem is just that if the user says something like "This is the link to the image: image.com/merrychristmas" it will take the whole message in the API call because I'm using the raw input card.
Edit
I'm doing this now:
function extractUrl(message) {
const urlPattern = /https?:\/\/[^ ]+/;
const match = message.match(urlPattern);
return match ? match[0] : null;
}
workflow.imageURL = extractUrl(workflow.imageURL);
console.log(workflow.imageURL)