Is it possible to add a variable for the URL redirect? Similar to our Teams Integration form for Invite to Teams Channel:
On my user created responses, I get "Invalid URL" when trying to put a variable ID in.
We created this site for our customers and partners and we encourage you to explore, engage, and learn. To ensure that this community is fun and helpful, professional and respectful participation is expected... and troll-like behavior won't be tolerated.
Is it possible to add a variable for the URL redirect? Similar to our Teams Integration form for Invite to Teams Channel:
On my user created responses, I get "Invalid URL" when trying to put a variable ID in.
Hey Christian,
Good question. While I stall and confirm my hunch, how are you creating the events? Are you using flow designer, or an integration builder script? Or are these events generated from the web ui?
The answer will depend and could be rather lengthy.
Hi Travis,
They are actually created using flow designer (on a trigger from an event created from the web ui). Though I am hoping to move this to a "Flow Trigger Form" to help simplify it in the future. Basically we are looking to dynamically set it to some Microsoft Teams Channel or Meeting links.
Ah ok. So the Create Event step is a wrapper for the Trigger an Event API call. You will notice one of the parameters there is the responseOptions element. This is where you can specify the full response option details such as the redirect url. We haven't yet added all of the elements in that API call into the step, but you can still make the API call directly, it's just a little roundabout.
You would need to:
The script will vary a bit based on how much you want to pass in and what items you need to expose, but this should get you started. The responseOptions can be built from scratch, or referenced with their UUIDs available in the UI.
// The path portion of the inbound integration that creates an event...
var path = input['Path'];
var payload = {
"properties": {
"<PROPERTY_NAME>": input['PROPERTY_NAME'],
"<PROPERTY_NAME2>": input['PROPERTY_NAME2'],
// ...
},
responseOptions: [{ "id" : "fee39ecf-75a7-45eb-9e63-ffc441499c4f" }, { "id" : "085d4bea-9dfb-4d2b-8136-22e19b1baaf6", "redirectUrl" : input['MS Teams URL'], "contribution": "POSITIVE", "action": "STOP_NOTIFYING_TARGET" }
]
};
var req = http.request({
"endpoint": "xMatters",
"method": "POST",
"path": path,
"headers": {
"Content-Type": "application/json"
}
};
var resp = req.write( payload );
if( resp.statusCode >= 300 ) {
console.log( "Error posting event: " + JSON.stringify( resp ) );
}
else {
var body = JSON.parse( resp.body );
output['requestId'] = body.requestId;
}
You won't be able to get the event ID from this method, but at least you do have infinite flexibility over the response options.
We're hoping to get more of that event payload exposed with the create event step and I can see these response options as being a good next item to knock out, so I'll be sure to bring this up with PM.
Happy Thursday!
Thank you Travis, using the inbound integration worked! Definitely looking forward to seeing this option in the create event step in flow designer.
Have a good weekend!