Use a URL to open a specific Flow app

I have found an overwhelming need to be able to “open a link” that then either a) opens a Flow app on the mobile device or b) if it isn’t installed, redirect them to the NG webclient located at https://web.novacuraflow.com.

Has anyone done this before? Any tips or tricks?

My specific use case is as follows:

  1. End user receives an email alerting them of a task they must complete
  2. When they click on the link, if they have the mobile app, go to mobile app
  3. If they click on link and do not have mobile app, send them to the NG webclient

Hey Daniel,

we used something like that for one of our customers to send a mail with a link to a flow.
The idea was to have a customer fill in a Customer Satisfaction Sheet. Previously they were emailing (excel and pdf) documents back and forth and we had them do it in flow and the data ends up in the DB for BI to use.

So in the mail we send them a link to a flow which they can open in web client or in the mob app.
This:

Shows as this:

Dear Sir/Madam,



please fill in the Customer Satisfaction Sheet which can be reached by opening this web client link and uploading the signature file.



or using this link in the novacura app and:

-use {CustomersUserId} as credentials

-enter WO No {WONo} and Customer E-mail {CustomersEmail}





Kind Regards

{UserEmail}

So the important bit for you is
https://home.novacuraflow.com/workflow?workflowID=3af16e9161a746de8392a685a1791dec&WoNo={WONo}&CustomerEmail={replace(CustomersEmail,‘@’,‘%40’)}

And this you can get by RMB on the flow you want them to open and “Generate app URL”

I asked if it was possible to send authentication (username) along with the link in our Yammer but was unable to figure it out, so we just have them log in manualy.

If the user has our mob app installed it will open the above link in it but if its not installed i dont think there is a way of autmaticaly sending them to download location.

You could always put the download location in the email text.

Hope this helps!

B R
Ivan

Thank you for this input. My use case was not to have multiple links. Just use one. I did figure it out though.

In the email, you have a link to a webpage created solely to help redirect Novacura requests, in this example https://redirect.novacura.com. This webpage would read the URL parameters you pass and then decide where to go based on each users’ device. For example: https://redirect.novacura.com/?workflowID=0##############0&ng_key=1#################1&customParam1=param1&customParam2=param2&customParam3=param3. Here is the HTML code for such a webpage below for reference:

<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Novacura Mobile Redirect</title>
<style type="text/css">body{color:#fff;background-color:#31383A;margin:0;font-family:Tahoma}.container{display:inline-flex;flex-wrap:wrap;justify-content:center}.container > span{width:100%;max-width:33%;flex:0 0 33%}figure{margin:0;margin-right:50px;width:250px;height:250px}figure img{margin:auto;width:250px;height:250px}figcaption{background-color:black;color:white;font-family:Roboto;font-variant:small-caps;font-size:20px;margin-top:-3px;padding: 3px;text-align:center}@media (min-width: 0px) and (max-width: 799px){figure,figure img{width:80%;height:auto;margin:auto;text-align:center;margin-top:5px}figcaption{width:79%;margin:auto;text-align:center;margin-top:-4px;font-size:40px}}</style>
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="theme-color" content="#ffffff">
</head>
<body>
<br><br><br><br>

<div class="container">

<script type="text/javascript">
const params = new URLSearchParams(window.location.search);
/* Uncomment next three lines for debugging */
//for (let p of params) {
//   console.log(p);
//}
/* Check required parameters
// There are currently two required parameters: workflowID and ng_key
// workflowID is the unique identifier of the app you are linking too
// ng_key is the Next Generation WebClient ID
*/
if (params.has('workflowID') === true && params.has('ng_key') === true){
  const mobileUrl = 'https://home.novacuraflow.com/workflow?workflowID=';
  const webUrl    = 'https://web.novacuraflow.com/#execution/';
  var workflow    = params.get('workflowID');
  var ng_key      = params.get('ng_key');
// You should have error checking for your additional parameters...
  var param1      = params.get('customParam1');
  var param2      = params.get('customParam2');
  var param3      = params.get('customParam3');
// This next line writes some code to to display an iOS banner on the webpage that will open the mobile app and jump right to the app you are linking to
  document.write('<meta name="apple-itunes-app" content="app-id=1518800827, app-argument=' + mobileUrl + workflow + '&customParam1=' + param1 + '&customParam2=' + param2 + '&customParam3=' + param3 + '"/>');
  console.log('Attempting to open mobile link...');
// The next line will attempt to open the ncflow:// address and wait 3 seconds to determine if that is a valid URL or not
  document.location = "ncflow://" + mobileUrl + workflow + "&customParam1=" + pl_row + "&customParam2=" + id + "&customParam3=redirect-" + pl_row;
  setTimeout(function() {
    console.log('FAILED to open mobile link. Redirecting...');
// If the first URL fails to open, fallback to the "web" URL in this case the Next Generation WebClient
    document.location = webUrl + workflow + "/" + ng_key + "/?customParam1=" + pl_row + "&customParam2=" + id + "&customParam3=redirect-" + pl_row;
  }, 3000);
} else {
// If no parameters have been passed, we should show something else...
// In this code, we show the end user three QR codes all linked to the Apple, Google, and Microsoft app stores to download Novacura Flow
  if (params.has('workflowID') === false){errTxt = 'workflowID is missing.';}
  if (params.has('ng_key') === false){if (!errTxt){errTxt = 'ng_key is missing.';} else {errTxt = errTxt + ' \n' + 'ng_key is missing.';}}
  console.log('\uD83D\uDD25\uD83D\uDD25\uD83D\uDD25\uD83D\uDD25\uD83D\uDD25 START BUG REPORT \uD83D\uDD25\uD83D\uDD25\uD83D\uDD25\uD83D\uDD25\uD83D\uDD25');
  console.log(errTxt);
  console.log('\uD83D\uDD25\uD83D\uDD25\uD83D\uDD25\uD83D\uDD25\uD83D\uDD25  END BUG REPORT  \uD83D\uDD25\uD83D\uDD25\uD83D\uDD25\uD83D\uDD25\uD83D\uDD25');
  document.write(atob('PGZpZ3VyZT4KPGEgaHJlZj0iaHR0cHM6Ly9hcHBzLmFwcGxlLmNvbS91cy9hcHAvbm92YWN1cmEtZmxvdy9pZDE1MTg4MDA4MjciIHRhcmdldD0iX2JsYW5rIiB0aXRsZT0iQXBwbGUgQXBwIFN0b3JlIiBhbHQ9IkFwcGxlIEFwcCBTdG9yZSI+CjxpbWcgc3JjPSJkYXRhOmltYWdlL3BuZztiYXNlNjQsaVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQVFvQUFBRUtBUU1BQUFEUUJZbUtBQUFBQmxCTVZFVUFBQUQvLy8rbDJaL2RBQUFBQ1hCSVdYTUFBQTdFQUFBT3hBR1ZLdzRiQUFBQ1ZFbEVRVlJvZ2VWWnk1V0VNQXd6ajBPT1V3S2xVRnBTMnBSQ0NYUGNBdyt2SlRrNys2a0FidzdEa09pQ3NHelptTjFyTmNmNmVQaXpuKzFsMW1Nckx0eml5ZjBnUnp6V0duLzJZUmE3ZzVDK25QYVlKeFVodTE4clNZaWRqYjlhRDUxV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pEekw1WTdlb21Qcm9vMGg1aGo5Y2ZMMERndFhVT1VNVTUra1E1UWQvTS9xdXF0UWpGVDZ6a1F2UnlVbGs3S2xwR1k4cStyQlhYNUlocU5wa0pSY1ZxTFJiaUVZRnBUK25XNTlEb3NWRkZkUEUxaEhVc05idkE1SWhQWlh6V3FjN1N0Wnhzd284bWM5OENPSlBsNG45dkh6dFZZOU5jbVFwRWQxQ0Zab1QrSlRkd2p3M3ljeTdkeitKaktyS24vdUFyZWdBN0RYV0taRitVVVY5a2FocUNoNkxrdzJKdmF2aFJackFPeDNwL1kzR0xNaWpMeno5NS9Yb3BhdWJKc2NadDFEZlEzSzFmNkdJMkRZY0FUanVBQUFBQUVsRlRrU3VRbUNDIiBhbHQ9Ik1vYmlsZSBhcHAgbGluayIvPgo8L2E+CjxmaWdjYXB0aW9uPk1pY3Jvc29mdCBTdG9yZTwvZmlnY2FwdGlvbj4KPC9maWd1cmU+'));
}
</script>
<!-- If for whatever reason an end user has disabled or does not support javascript, tell them you need to enable it in order to continue. In this example, we show hard coded link to https://web.novacuraflow.com -->
<noscript>
<meta name="apple-itunes-app" content="app-id=1518800827"/>
<meta http-equiv="refresh" content="3;URL='https://web.novacuraflow.com'" />
<p>This browser does not support javascript. Please click here to be redirected: <a href="https://web.novacuraflow.com">Novacura WebClient</a>.</p> 
</noscript>

</div>

<br><br><br><br>
</body>
</html>

Hi we do this too and I found that if you generated the links with the servername embedded it was better. Because you could have a user click a link to a flow that was generated from a test environment and if they are logged into their production environment in the browser already it would open the flow in PROD.

To fix this, I put my server code in the environment and then build links based on that.

https://web.novacuraflow.com/#execution/{flowID}/{environment.thisInstanceNGServerCode}

This is inserting. Tried this it didn’t get it to work. Can you provide an example? It is indeed an issue that you en up in the server that you were previously logged into.

Hi. I am not sure I understand your question. But here’s some info:

  1. Right click on a flow and generate a NG Link.
  2. Paste into notepad++ and then find the server code.
  3. Do the same in both environments.
  4. Then I save the ServerCode in the variable.
  5. Then I make the links like above.
  6. Keep in mind my flowID is the same in test and prod for the same flow. So I can use this link generator anywhere and I get a link to the flow I want on the same server where the link was built.

What didn’t work?

1 Like

Yes I had to do this as well. In order to have your app work in multiple environments, you have to create a server global variable (something like AppEmailID) and when you generate link using the NG Client, the app ID will be the same (if you use the subscribe workflow method) and the environment app variable will change depending on which environment you are in. You would need to copy this value into the variable you created.

Thanks for the hint/tip!