logic apps and powerapps - integrate across your apis

34
Sponsored & Brought to you by Logic apps and PowerApps – Integrate across your APIs Stephen Siciliano http://www.twitter.com/iscsus https://www.linkedin.com/in/ssiciliano

Upload: sriram-hariharan

Post on 16-Apr-2017

1.403 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Logic apps and PowerApps - Integrate across your APIs

Sponsored & Brought to you by

Logic apps and PowerApps – Integrate across your APIsStephen Siciliano

http://www.twitter.com/iscsus

https://www.linkedin.com/in/ssiciliano

Page 2: Logic apps and PowerApps - Integrate across your APIs

Logic apps and Power Apps – Integrate across

your APIsStephen Siciliano, April 2016

Page 3: Logic apps and PowerApps - Integrate across your APIs

Agenda• Background• Visualizing your flow• Triggering Logic apps• Connect to your APIs• Building a Business app• What if you need code?• Q & A

Page 4: Logic apps and PowerApps - Integrate across your APIs

Background

Page 5: Logic apps and PowerApps - Integrate across your APIs

Democratize Development

Vision:

Platform Leader

RichEcosystem

Page 6: Logic apps and PowerApps - Integrate across your APIs

Platform Value

flexible business solutions, delivered quickly –without the time and cost of

custom software development

Page 7: Logic apps and PowerApps - Integrate across your APIs

Or…

Clicks, not code

Page 8: Logic apps and PowerApps - Integrate across your APIs

Businesses need to deliver that flexibility in a way that stays extensible, connected, secure and

scalable

AUTOMATE

Logic AppsACT

PowerApps

Connectors to Data and APIs

Page 9: Logic apps and PowerApps - Integrate across your APIs

Connect and automate common tasks with Logic Apps

Use simple, intuitive tools

Create crucial, reliable tasks without coding

Integrate your mobile and web-based apps

Connect existing apps to SaaS services

BizTalk APIs for expert integration scenarios

Page 10: Logic apps and PowerApps - Integrate across your APIs

Visualizing your flow

Page 11: Logic apps and PowerApps - Integrate across your APIs

Designer feature improvements • Much better control flow handling• More visual way to populate parameters than before • New swagger (OpenAPI) extensions• Dynamic content without dynamic swagger• Folder browsers

Long term goal: don't require code view for any features

Page 12: Logic apps and PowerApps - Integrate across your APIs

Control flow in the designer

Response For Each Split On Do UntilConditions

EXPLICIT IN THE UI IMPLICT IN THE UI COMING SOON

Page 13: Logic apps and PowerApps - Integrate across your APIs

DemoControl Flow in the DesignerDynamic Content

Page 14: Logic apps and PowerApps - Integrate across your APIs

Dynamic content in the designerWorks by specifying another API to call for the contentx-ms-dynamic-values• For dynamic dropdowns (static dropdowns can just use an

enum)x-ms-dynamic-schema• In SharePoint or SQL, the columns vary from table-to-table• Rather that define all possible tables in swagger, you expose an

endpoint to get the JSON schema on• Swagger can be public, allowing searching / indexing

https://azure.microsoft.com/en-us/documentation/articles/powerapps-develop-api/

Page 15: Logic apps and PowerApps - Integrate across your APIs
Page 16: Logic apps and PowerApps - Integrate across your APIs
Page 17: Logic apps and PowerApps - Integrate across your APIs

Triggering Logic apps

Page 18: Logic apps and PowerApps - Integrate across your APIs

Triggering from your APIs

Webhooks• Preferred way to trigger a

workflow• Instantaneous• Highly scalable• Your API needs to

implement 2 methods:1. Subscribe2. Unsubscribe

Polling• Fallback if you’re

shimming an existing API• Much chattier and laggier• Need to add 2 headers:

1. Retry-after2. Location

• Two options: 202-async or batched

Page 19: Logic apps and PowerApps - Integrate across your APIs

WebhooksSubscribe

Called whenever the Logic app is created/enabledUse the @listCallbackUri() function to get the endpoint of the trigger to pass to the backing servicePass whatever content you want in the body

UnsubscribeCalled when the Logic app is delete/disabledUse the @triggerOutputs().subscribe object to get values from the subscribe (e.g. the id of a webhook)

Page 20: Logic apps and PowerApps - Integrate across your APIs
Page 21: Logic apps and PowerApps - Integrate across your APIs

Polling triggersRetry-after header used to tell the engine when to poll again

Retry-after 60

Location header to tell the engine where to poll next• Use the Location header to store some watermark• E.g. for an OData endpoint return: Location https://{orig endpoint}?$filter=_createdTime gt {utcnow}

x-ms-trigger: single• Returns 200 when there is

trigger payload• Returns 202 when not

x-ms-trigger: batched• Return an array to split on• Can return an empty array if

you don’t want to trigger

Page 22: Logic apps and PowerApps - Integrate across your APIs

Using async in the middle of your Logic app• The async operations you define (webhook or polling)

can both be used inside of an action• Think of the "when a file is added" api. You can create a

workflow to:• Whenever a new case is opened in CRM • Send an email asking for the details to be put into a doc in a

folder • When a file is added to the folder • Attach to the case in CRM and close it

Page 23: Logic apps and PowerApps - Integrate across your APIs

Using a Logic app as an HTTP endpoint• Easily create APIs to call that

orchestrate across 1 or more other services• You have full control to define

the body of the response• You can have as many response

shapes as you need

Page 24: Logic apps and PowerApps - Integrate across your APIs

Connect to your APIs

Page 25: Logic apps and PowerApps - Integrate across your APIs

Easily use cloud or custom APIs:• Dozens of built-in APIs for popular

SaaS

• An ecosystem of APIs for any need

• Create and publish custom, reusable APIs

• Easily connect to existing APIs in the cloud

• Visual Studio tooling with one click publish and remote debugging

Create, consume andhost APIs more easily

API’S

Page 26: Logic apps and PowerApps - Integrate across your APIs

Different levels of integration• HTTP action

• Manually define all of the parts of the request (URI, method, body payload)

• HTTP + Swagger action• Paste in your swagger’s endpoint• Needs to be CORS enabled and

unauthenticated• App Services deployed in your subscription

• Same requirements for the swagger• Easy auth to protect the API • Auto-discovers the operations

• "API connections"

Page 27: Logic apps and PowerApps - Integrate across your APIs

API connection action type• Managed APIs• OOB APIs hosted by Logic

Apps• Serviced by the product team• First class designer experience• Rapid development

• Custom and External APIs• First class designer experience

using Swagger• Auto discovery of Azure hosted APIs• Declaratively reference an External

API• Raw HTTP request for all other

API• API Connections• Authenticate once and re-use• Differentiate connection

configuration• Simple to deploy

Page 28: Logic apps and PowerApps - Integrate across your APIs

DemoCustom APIs

Page 29: Logic apps and PowerApps - Integrate across your APIs

Building a business app

Page 30: Logic apps and PowerApps - Integrate across your APIs

• Easily create mobile-optimized applications• Connect to your data where it

resides, access a wide variety of data sources, from SharePoint lists to Excel files• Integrate apps with larger processes; trigger workflows across your Enterprise based on user actions

PowerApps

Page 31: Logic apps and PowerApps - Integrate across your APIs

DemoBuilding a business app

Page 32: Logic apps and PowerApps - Integrate across your APIs

What if you need code?

Page 33: Logic apps and PowerApps - Integrate across your APIs

Azure Functions• Very easy way to host small snippets of code that run

some logic• Supports all of the App Service languages • Native integration inside of Logic apps

Page 34: Logic apps and PowerApps - Integrate across your APIs

Q & A