SlideShare une entreprise Scribd logo
1  sur  35
Developing Azure Functions to create
custom connectors for Microsoft Flow,
PowerApps and Nintex
Tom Castiglia
ShareSquared
AboutTom Castiglia…
SharePoint / Office 365
Consultant
Speaker at various
SharePoint
Saturday
conferences
President of the
San Diego
SharePointUser
Group
Nintex vTE
(virtualTechnical
Evangelist)
@TomCastiglia
linkedin.com/in/tomcastiglia
slideshare.net/tomcastiglia
tom.castiglia@sharesquared.com
meetup.com/sanspug/
meetup.com/nintexSD/
https://www.sharesquared.com
Today’s Agenda
Overview
•Azure Functions
Overview
•REST Services -
Open API /
Swagger
Development
•Visual Studio 2017
•Sample Project –
Requirements
•Example Code
•Debugging
Azure
Configuration
•Azure Function
App
•Swagger Definition
Connector
Configuration
•Flow / PowerApps
•Nintex Workflow
Cloud
QuickWorkflow
demos in Flow
& Nintex using
custom
connectors
Prerequisites
Basics of
Microsoft Flow
Basic Programming
(C# or other
languages)
Visual Studio
Azure Functions - Overview
Build apps faster with a serverless architecture
Accelerate your development with an event-driven, serverless compute
experience. Scale on demand and pay only for the resources you
consume.
Manage your apps instead of infrastructure
Don’t worry about provisioning and maintaining servers, especially when
your workload grows. Functions provides a fully managed compute
platform with high reliability and security and they scale on demand.
Azure Functions - Overview
Develop your way
• Languages: JavaScript, C#, and F#, and scripting options such as
Python, PHP, Bash, Batch, and PowerShell.
• Code directly in Azure portal
-- OR --
• Code in Visual Studio 2017 15.3 or later (Still in preview)
• Install “Azure Development” workload
• Includes tooling to create Azure Function projects and classes locally and
publish
• Includes Azure CLI (Command Line Interface) which allow you to run and debug
your functional locally.
Azure Functions - Pricing
Azure Functions consumption plan is billed based on per-second resource
consumption and executions. Consumption plan pricing includes a monthly
free grant of 1 million requests and 400,000 GB-s of resource consumption
per month.
METER PRICE FREE GRANT
(PER MONTH)
ExecutionTime* $0.000016/GB-s 400,000 GB-s
Total Executions* $0.20 per million 1 million
*Free grants apply to paid, consumption subscriptions only.
Demo
Super Quick Azure
Functions Demo
OpenAPI (Swagger) Overview
•When you publish an Azure Function, it creates a
REST endpoint for your function.
•OpenAPI allows you to configure the details of
your endpoint
• URL
• HTTP Methods (GET, POST, PUT, etc.)
• Inputs
• Outputs
OpenAPI (Swagger) Overview
•It’s a JSON file
•Configured using “YAML”…
• “a human friendly data serialization standard for all
programming languages.”
• “YAML Ain't Markup Language”
•Used by MS Flow and Nintex to import your
function as a new custom connector / action
•Help available at https://swagger.io
Sample Project - Goals
Accepts
complex input
types (JSON)
Does
something
useful
Returns
complex types
(JSON)
GSA PerDiem API
• Common workflow use cases areTravel Authorization Requests and
Expense reports, where employees travel and incur expenses for Meals and
Hotels.
• The GSA publishes official “PerDiems” that dictate the maximum amounts
that are may be expensed for Hotels and Meals.
• The PerDiem amounts are updated each year.
• Each region has its own per diems (e.g. Hotels in NYC cost more than in Des Moine)
• PerDiems also vary by month, based on peak travel seasons.
• Public web site: https://www.gsa.gov/travel/plan-book/per-diem-rates
• Often Government employees are trained to manually look up their Per Diems for
each trip prior to submitting expense reports (or better yet, before booking their
hotels)
GSA PerDiem API
REST API:
https://www.gsa.gov/technology/government-it-initiatives/digital-
strategy/per-diem-apis/api-for-per-diem-rates
• FiscalYear and Zip
https://inventory.data.gov/api/action/datastore_search?resource_id=8ea44
bc4-22ba-4386-b84c-
1494ab28964b&filters={"FiscalYear":"2017","Zip":“92131"}
• FiscalYear and County
https://inventory.data.gov/api/action/datastore_search?resource_id=8ea44
bc4-22ba-4386-b84c-
1494ab28964b&filters={"FiscalYear":"2017","County":"Worcester"}
Sample Response (abbreviated)
• The “Records” element is nested
within a bunch of stuff that can
be ignored
• The element for each month
represents the Hotel PerDiem for
that month.
• The “Meals” element represents
the PerDiem allowed for meals
for the year.
UsingVisual Studio
• New Project>Visual
C#>Cloud>Azure
Functions
• “Azure Functions”
maps to a “Function
App”, which can
contain 1 – N individual
functions
• Right-click the project
and select Publish
• Create new Azure
Function App. Then
click Publish.
Function App
• Log into Azure Portal to
review new Function App
• Notice it does not contain
any functions yet
• InVisual Studio, Right-
Click the Project and click
Add > New Azure
Function
• Name the function and
click Add
• Select function type as
HttpTrigger and click OK
Sample “Hello,World” Function …
Republish fromVS2017
and notice your functional
app now contains the new
function
GSA Per DiemWrapper
Accept Zipcode
andTripdate in
JSON as input
(in body of
request)
Validate inputs
Format REST
call to GSA API
Format JSON
response with
GSA per diem
amounts (Hotel
and Meals)
INPUT
JSON Formatting
OUTPUT
Classes for GSA Per Diem JSON
Deserialize Input JSON
Incoming JSON
Call to GSA RESTAPI
Output JSON / HTTP Response
JSON Response
Configure HTTP Methods
Configure API Definition
Export to Flow & Power Apps
Express
• Easier
• Use this if your Function App is in the same tenant as
your Flow / Office 365 AAD
Manual
• A few extra steps
• use this if yourAzure Function App is in a separate
Azure tenant.
Export to Flow - Express
Create Connection
Configure actions in Flow
NintexWorkflow Cloud
NintexWorkflow Cloud
Configure GSA Per Diem Action in NWC
Thank You to Our Sponsors
PLATINUM
GOLD
SILVER BRONZE
Join us right after at The Urge
Bocce Ball, Cornhole and Bowling!
Urge Gastropub & Common House
(practically across the street)
255 Redel Road, San Marcos, CA 92078
https://sm.urgegastropub.com/
Thank you for joining us today!
Don’t Forget SharePint

Contenu connexe

Tendances

Active Cloud DB at CloudComp '10
Active Cloud DB at CloudComp '10Active Cloud DB at CloudComp '10
Active Cloud DB at CloudComp '10
Chris Bunch
 
Architectures, Frameworks and Infrastructure
Architectures, Frameworks and InfrastructureArchitectures, Frameworks and Infrastructure
Architectures, Frameworks and Infrastructure
harendra_pathak
 

Tendances (20)

Using Elasticsearch for Analytics
Using Elasticsearch for AnalyticsUsing Elasticsearch for Analytics
Using Elasticsearch for Analytics
 
Quick and Easy Development with Node.js and Couchbase Server
Quick and Easy Development with Node.js and Couchbase ServerQuick and Easy Development with Node.js and Couchbase Server
Quick and Easy Development with Node.js and Couchbase Server
 
Test driving Azure Search and DocumentDB
Test driving Azure Search and DocumentDBTest driving Azure Search and DocumentDB
Test driving Azure Search and DocumentDB
 
06 integrate elasticsearch
06 integrate elasticsearch06 integrate elasticsearch
06 integrate elasticsearch
 
SOA on Rails
SOA on RailsSOA on Rails
SOA on Rails
 
SharePoint 2013 on Azure: Your Dedicated Farm in the Cloud
SharePoint 2013 on Azure: Your Dedicated Farm in the CloudSharePoint 2013 on Azure: Your Dedicated Farm in the Cloud
SharePoint 2013 on Azure: Your Dedicated Farm in the Cloud
 
SharePoint Framework, React, and Office UI Fabric spc adriatics 2016
SharePoint Framework, React, and Office UI Fabric spc adriatics 2016SharePoint Framework, React, and Office UI Fabric spc adriatics 2016
SharePoint Framework, React, and Office UI Fabric spc adriatics 2016
 
Creating Real-Time Data Mashups with Node.JS and Adobe CQ
Creating Real-Time Data Mashups with Node.JS and Adobe CQCreating Real-Time Data Mashups with Node.JS and Adobe CQ
Creating Real-Time Data Mashups with Node.JS and Adobe CQ
 
03 integrate webapisignalr
03 integrate webapisignalr03 integrate webapisignalr
03 integrate webapisignalr
 
ECS19 - Marco Rocca and Fabio Franzini - Need a custom logic in PowerApps? Us...
ECS19 - Marco Rocca and Fabio Franzini - Need a custom logic in PowerApps? Us...ECS19 - Marco Rocca and Fabio Franzini - Need a custom logic in PowerApps? Us...
ECS19 - Marco Rocca and Fabio Franzini - Need a custom logic in PowerApps? Us...
 
Active Cloud DB at CloudComp '10
Active Cloud DB at CloudComp '10Active Cloud DB at CloudComp '10
Active Cloud DB at CloudComp '10
 
Stacktician - CloudStack Collab Conference 2014
Stacktician - CloudStack Collab Conference 2014Stacktician - CloudStack Collab Conference 2014
Stacktician - CloudStack Collab Conference 2014
 
10 minutes fun with Cloud API comparison
10 minutes fun with Cloud API comparison10 minutes fun with Cloud API comparison
10 minutes fun with Cloud API comparison
 
Building a friendly .NET SDK to connect to Space
Building a friendly .NET SDK to connect to SpaceBuilding a friendly .NET SDK to connect to Space
Building a friendly .NET SDK to connect to Space
 
How Serverless Changes DevOps
How Serverless Changes DevOpsHow Serverless Changes DevOps
How Serverless Changes DevOps
 
Architectures, Frameworks and Infrastructure
Architectures, Frameworks and InfrastructureArchitectures, Frameworks and Infrastructure
Architectures, Frameworks and Infrastructure
 
Padrino - the Godfather of Sinatra
Padrino - the Godfather of SinatraPadrino - the Godfather of Sinatra
Padrino - the Godfather of Sinatra
 
Make your SharePoint fly by tuning and optimizing SQL Server
Make your SharePoint  fly by tuning and optimizing SQL ServerMake your SharePoint  fly by tuning and optimizing SQL Server
Make your SharePoint fly by tuning and optimizing SQL Server
 
7 steps to simplifying your AI workflows
7 steps to simplifying your AI workflows7 steps to simplifying your AI workflows
7 steps to simplifying your AI workflows
 
O365Con19 - Things I've Learned While Building a Product on SharePoint Modern...
O365Con19 - Things I've Learned While Building a Product on SharePoint Modern...O365Con19 - Things I've Learned While Building a Product on SharePoint Modern...
O365Con19 - Things I've Learned While Building a Product on SharePoint Modern...
 

Similaire à Developing Azure Functions for Flow and Nintex SPS SD 2018

Introduction to Microsoft Flow and Azure Functions
Introduction to Microsoft Flow and Azure FunctionsIntroduction to Microsoft Flow and Azure Functions
Introduction to Microsoft Flow and Azure Functions
BIWUG
 

Similaire à Developing Azure Functions for Flow and Nintex SPS SD 2018 (20)

Developing Azure Functions as custom connectors for Flow and Nintex
Developing Azure Functions as custom connectors for Flow and NintexDeveloping Azure Functions as custom connectors for Flow and Nintex
Developing Azure Functions as custom connectors for Flow and Nintex
 
Building API in the cloud using Azure Functions
Building API in the cloud using Azure FunctionsBuilding API in the cloud using Azure Functions
Building API in the cloud using Azure Functions
 
Xtending nintex workflow cloud w azure functions - xchange conference
Xtending nintex workflow cloud w azure functions - xchange conferenceXtending nintex workflow cloud w azure functions - xchange conference
Xtending nintex workflow cloud w azure functions - xchange conference
 
Serverless API with Azure Functions
Serverless API with Azure FunctionsServerless API with Azure Functions
Serverless API with Azure Functions
 
First Look at Azure Logic Apps (BAUG)
First Look at Azure Logic Apps (BAUG)First Look at Azure Logic Apps (BAUG)
First Look at Azure Logic Apps (BAUG)
 
Getting started with development in azure
Getting started with development in azureGetting started with development in azure
Getting started with development in azure
 
Vincent biret azure functions and flow (ottawa)
Vincent biret azure functions and flow (ottawa)Vincent biret azure functions and flow (ottawa)
Vincent biret azure functions and flow (ottawa)
 
Vincent biret azure functions and flow (toronto)
Vincent biret azure functions and flow (toronto)Vincent biret azure functions and flow (toronto)
Vincent biret azure functions and flow (toronto)
 
SPS calgary 2017 introduction to azure functions microsoft flow
SPS calgary 2017 introduction to azure functions microsoft flowSPS calgary 2017 introduction to azure functions microsoft flow
SPS calgary 2017 introduction to azure functions microsoft flow
 
Introduction to Azure Functions
Introduction to Azure FunctionsIntroduction to Azure Functions
Introduction to Azure Functions
 
Web jobs, Azure Functions and Serverless Computing
Web jobs, Azure Functions and Serverless ComputingWeb jobs, Azure Functions and Serverless Computing
Web jobs, Azure Functions and Serverless Computing
 
Azure Functions Real World Examples
Azure Functions Real World Examples Azure Functions Real World Examples
Azure Functions Real World Examples
 
Office apps in Office 365 - Napa the next big thing
Office apps in Office 365 - Napa the next big thingOffice apps in Office 365 - Napa the next big thing
Office apps in Office 365 - Napa the next big thing
 
Play with azure functions
Play with azure functionsPlay with azure functions
Play with azure functions
 
Made for Mobile - Let Office 365 Power Your Mobile Apps
Made for Mobile - Let Office 365 Power Your Mobile AppsMade for Mobile - Let Office 365 Power Your Mobile Apps
Made for Mobile - Let Office 365 Power Your Mobile Apps
 
#SPSBrussels 2017 vincent biret #azure #functions microsoft #flow
#SPSBrussels 2017 vincent biret #azure #functions microsoft #flow#SPSBrussels 2017 vincent biret #azure #functions microsoft #flow
#SPSBrussels 2017 vincent biret #azure #functions microsoft #flow
 
Introduction to Microsoft Flow and Azure Functions
Introduction to Microsoft Flow and Azure FunctionsIntroduction to Microsoft Flow and Azure Functions
Introduction to Microsoft Flow and Azure Functions
 
Why and How SmartNews uses SaaS?
Why and How SmartNews uses SaaS?Why and How SmartNews uses SaaS?
Why and How SmartNews uses SaaS?
 
ASP .Net Core SPA Templates
ASP .Net Core SPA TemplatesASP .Net Core SPA Templates
ASP .Net Core SPA Templates
 
How to create a Function App on Cosmos DB
How to create a Function App on Cosmos DBHow to create a Function App on Cosmos DB
How to create a Function App on Cosmos DB
 

Plus de DocFluix, LLC

Plus de DocFluix, LLC (7)

Microsoft flow how, when & why
Microsoft flow   how, when & whyMicrosoft flow   how, when & why
Microsoft flow how, when & why
 
Using Nintex Workflow Cloud with Salesforce for customer surveys
Using Nintex Workflow Cloud with Salesforce for customer surveysUsing Nintex Workflow Cloud with Salesforce for customer surveys
Using Nintex Workflow Cloud with Salesforce for customer surveys
 
Using SharePoint, Nintex & DocuSign for Employee Onboarding and Open Enrollme...
Using SharePoint, Nintex & DocuSign for Employee Onboarding and Open Enrollme...Using SharePoint, Nintex & DocuSign for Employee Onboarding and Open Enrollme...
Using SharePoint, Nintex & DocuSign for Employee Onboarding and Open Enrollme...
 
14 tips for planning a ecm content migration to share point
14 tips for planning a ecm content migration to share point14 tips for planning a ecm content migration to share point
14 tips for planning a ecm content migration to share point
 
SPS Phoenix Optimizing SharePoint for Transactional Content Management
SPS Phoenix Optimizing SharePoint for Transactional Content ManagementSPS Phoenix Optimizing SharePoint for Transactional Content Management
SPS Phoenix Optimizing SharePoint for Transactional Content Management
 
15 tips for bullet proof requirements analysis on SharePoint projects
15 tips for bullet proof requirements analysis on SharePoint projects15 tips for bullet proof requirements analysis on SharePoint projects
15 tips for bullet proof requirements analysis on SharePoint projects
 
Optimizing SharePoint for Transactional Content Management
Optimizing SharePoint for Transactional Content ManagementOptimizing SharePoint for Transactional Content Management
Optimizing SharePoint for Transactional Content Management
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Dernier (20)

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 

Developing Azure Functions for Flow and Nintex SPS SD 2018

  • 1.
  • 2. Developing Azure Functions to create custom connectors for Microsoft Flow, PowerApps and Nintex Tom Castiglia ShareSquared
  • 3. AboutTom Castiglia… SharePoint / Office 365 Consultant Speaker at various SharePoint Saturday conferences President of the San Diego SharePointUser Group Nintex vTE (virtualTechnical Evangelist) @TomCastiglia linkedin.com/in/tomcastiglia slideshare.net/tomcastiglia tom.castiglia@sharesquared.com meetup.com/sanspug/ meetup.com/nintexSD/ https://www.sharesquared.com
  • 4. Today’s Agenda Overview •Azure Functions Overview •REST Services - Open API / Swagger Development •Visual Studio 2017 •Sample Project – Requirements •Example Code •Debugging Azure Configuration •Azure Function App •Swagger Definition Connector Configuration •Flow / PowerApps •Nintex Workflow Cloud QuickWorkflow demos in Flow & Nintex using custom connectors
  • 5. Prerequisites Basics of Microsoft Flow Basic Programming (C# or other languages) Visual Studio
  • 6. Azure Functions - Overview Build apps faster with a serverless architecture Accelerate your development with an event-driven, serverless compute experience. Scale on demand and pay only for the resources you consume. Manage your apps instead of infrastructure Don’t worry about provisioning and maintaining servers, especially when your workload grows. Functions provides a fully managed compute platform with high reliability and security and they scale on demand.
  • 7. Azure Functions - Overview Develop your way • Languages: JavaScript, C#, and F#, and scripting options such as Python, PHP, Bash, Batch, and PowerShell. • Code directly in Azure portal -- OR -- • Code in Visual Studio 2017 15.3 or later (Still in preview) • Install “Azure Development” workload • Includes tooling to create Azure Function projects and classes locally and publish • Includes Azure CLI (Command Line Interface) which allow you to run and debug your functional locally.
  • 8. Azure Functions - Pricing Azure Functions consumption plan is billed based on per-second resource consumption and executions. Consumption plan pricing includes a monthly free grant of 1 million requests and 400,000 GB-s of resource consumption per month. METER PRICE FREE GRANT (PER MONTH) ExecutionTime* $0.000016/GB-s 400,000 GB-s Total Executions* $0.20 per million 1 million *Free grants apply to paid, consumption subscriptions only.
  • 10. OpenAPI (Swagger) Overview •When you publish an Azure Function, it creates a REST endpoint for your function. •OpenAPI allows you to configure the details of your endpoint • URL • HTTP Methods (GET, POST, PUT, etc.) • Inputs • Outputs
  • 11. OpenAPI (Swagger) Overview •It’s a JSON file •Configured using “YAML”… • “a human friendly data serialization standard for all programming languages.” • “YAML Ain't Markup Language” •Used by MS Flow and Nintex to import your function as a new custom connector / action •Help available at https://swagger.io
  • 12. Sample Project - Goals Accepts complex input types (JSON) Does something useful Returns complex types (JSON)
  • 13. GSA PerDiem API • Common workflow use cases areTravel Authorization Requests and Expense reports, where employees travel and incur expenses for Meals and Hotels. • The GSA publishes official “PerDiems” that dictate the maximum amounts that are may be expensed for Hotels and Meals. • The PerDiem amounts are updated each year. • Each region has its own per diems (e.g. Hotels in NYC cost more than in Des Moine) • PerDiems also vary by month, based on peak travel seasons. • Public web site: https://www.gsa.gov/travel/plan-book/per-diem-rates • Often Government employees are trained to manually look up their Per Diems for each trip prior to submitting expense reports (or better yet, before booking their hotels)
  • 14. GSA PerDiem API REST API: https://www.gsa.gov/technology/government-it-initiatives/digital- strategy/per-diem-apis/api-for-per-diem-rates • FiscalYear and Zip https://inventory.data.gov/api/action/datastore_search?resource_id=8ea44 bc4-22ba-4386-b84c- 1494ab28964b&filters={"FiscalYear":"2017","Zip":“92131"} • FiscalYear and County https://inventory.data.gov/api/action/datastore_search?resource_id=8ea44 bc4-22ba-4386-b84c- 1494ab28964b&filters={"FiscalYear":"2017","County":"Worcester"}
  • 15. Sample Response (abbreviated) • The “Records” element is nested within a bunch of stuff that can be ignored • The element for each month represents the Hotel PerDiem for that month. • The “Meals” element represents the PerDiem allowed for meals for the year.
  • 16. UsingVisual Studio • New Project>Visual C#>Cloud>Azure Functions • “Azure Functions” maps to a “Function App”, which can contain 1 – N individual functions • Right-click the project and select Publish • Create new Azure Function App. Then click Publish.
  • 17. Function App • Log into Azure Portal to review new Function App • Notice it does not contain any functions yet • InVisual Studio, Right- Click the Project and click Add > New Azure Function • Name the function and click Add • Select function type as HttpTrigger and click OK
  • 18. Sample “Hello,World” Function … Republish fromVS2017 and notice your functional app now contains the new function
  • 19. GSA Per DiemWrapper Accept Zipcode andTripdate in JSON as input (in body of request) Validate inputs Format REST call to GSA API Format JSON response with GSA per diem amounts (Hotel and Meals)
  • 21. Classes for GSA Per Diem JSON
  • 23. Call to GSA RESTAPI
  • 24. Output JSON / HTTP Response JSON Response
  • 27. Export to Flow & Power Apps Express • Easier • Use this if your Function App is in the same tenant as your Flow / Office 365 AAD Manual • A few extra steps • use this if yourAzure Function App is in a separate Azure tenant.
  • 28. Export to Flow - Express
  • 33. Configure GSA Per Diem Action in NWC
  • 34. Thank You to Our Sponsors PLATINUM GOLD SILVER BRONZE
  • 35. Join us right after at The Urge Bocce Ball, Cornhole and Bowling! Urge Gastropub & Common House (practically across the street) 255 Redel Road, San Marcos, CA 92078 https://sm.urgegastropub.com/ Thank you for joining us today! Don’t Forget SharePint

Notes de l'éditeur

  1. This session will make use of these technologies, but I won’t spend much time explaining them, as I assume you’ve at least dabbled in MS Flow and have done some development in Visual Studio.
  2. Fair warning … this is the most complex part of the process. Troubleshooting is tricky. We could easily spend an hour on this alone, but we’ll have to skim over this part later. There are
  3. Fair warning … this is the most complex part of the process. Troubleshooting is tricky. We could easily spend an hour on this alone, but we’ll have to skim over this part later. There are
  4. All the Azure function tutorials that I found were really simplistic, using the GET method and passing params in the URL querystring. But systems like MS Flow, PowerApps and Nintex send and receive data in JSON format. So I needed to come up with a more realistic sample. I also wanted something that would make sense in the context of a workflow solution.
  5. Visual Studio provides excellent support for serializing / deserializing between JSON. Also can auto-generate new classes from existing JSON, using the Paste Special menu under Edit.
  6. The CreateResponse method automatically serializes the PerDiemOutput class into JSON.
  7. If we enable additional methods that aren’t needed the API definition (next step) will be more complex, so its best to limit to just POST.
  8. Select the Function App > Platform Features > API Definition Click Generate API Definition template Edit the API Definition Save
  9. Select Express Select Environment Enter friendly name for the Custom API that will be displayed in Flow / Power Apps If using API Key, enter the friendly label that shall be displayed in Flow when a user creates a unique connection using the connector. For example, provide email address for Azure admin who has the API KEYS. Click OK
  10. From Flow.Microsoft.com, click the gear icon > Custom Connectors Locate the desired connector, then click the plus (+) sign for that connector This will display a dialog to enter the API KEY Locate
  11. Click Xtensions then the Plus (+) sign Copy/Paste the API Definition Url including the key (from Azure portal). Then click Next. Accept default settings on the Security page. Then click Next. Specify a friendly Name and Description for the connector. Select an icon or upload a custom icon. Then click Save.
  12. Click Connections > Add New Select the DocFluix Demo App from the Connector list, then click Connect Give the new connection a friendly name (e.g. DocFluix Demo) and paste in the API Key, the click Connect Verify the connection is created successfully, then click Ok
  13. SharePint