#Flow – Calling a Flow from a #CSharp ConsoleApp


A couple of days ago I wrote a post where I shared how to use a Http Request as a trigger to be able to invoke a Flow definition from an external App (link). Today I´ll share an example with a bit of C# code to launch a Flow.

Let’s start with the definition of the Flow with 4 steps

  • Request
  • Create a file in OneDrive for Business with the contents of the Body that is received
  • Send a Push Notification
  • Return a code HTTP 200 in the Response


Remember to copy the Url to invoke the flow. A sample C# source code may be similar the following image:


A couple of notes

  • Lines 10 to 15, create a JSON message from a C# class
  • With the body converted to JSON, I use JsonSchema.Net to create the Schema that I then add to the definition of the Flow
  • Lines 17 to 22, made the call to the Flow using RestSharp (link)

Ready! Our Flow Console App is complete and now we can run the app to call the Flow. Once the Flow is invoked we can see how the process triggers a notification to our device, with the link for access to the Url of the message!


The sample code can be downloaded from here (link)

Greetings @ Toronto

El Bruno




Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: