├── .github ├── ISSUE_TEMPLATE │ ├── bug.yml │ ├── config.yml │ └── vscode.yml └── workflows │ ├── IssueManagement.yml │ └── IssueSync.yml ├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── LogicApps-AI-RAG-Demo ├── Deployment │ └── aisearch_index.json ├── SampleAIWorkflows │ ├── RAG-Ingestion-Workflow │ │ └── workflow.json │ ├── RAG-Retrieval-Workflow │ │ └── workflow.json │ ├── connections.json │ ├── host.json │ ├── local.settings.json │ └── parameters.json ├── TokenizeDocFunction │ ├── function_app.py │ ├── host.json │ ├── local.settings.json │ └── requirements.txt └── readme.md ├── LogicAppsSampleTestFramework ├── LogicAppsSampleTestFramework.sln ├── TestCases │ ├── TestCases.cs │ ├── TestCases.csproj │ └── TestFiles │ │ ├── apiconnectionactionworkflow.json │ │ ├── connections.json │ │ ├── host.json │ │ ├── httpactionworkflow.json │ │ ├── local.settings.json │ │ └── requestresponseworkflow.json └── TestFramework │ ├── CallbackUrlDefinition.cs │ ├── HttpRequestMessageFeature.cs │ ├── MockHttpHost.cs │ ├── TestEnvironment.cs │ ├── TestFramework.csproj │ ├── WorkflowTestHost.cs │ └── WorkflowTestInput.cs ├── README.md ├── SECURITY.md ├── ai-sample ├── Deployment │ └── aisearch_index.json ├── SampleAIWorkflows │ ├── chat-workflow │ │ └── workflow.json │ ├── connections.json │ ├── host.json │ ├── ingest-data │ │ └── workflow.json │ ├── local.settings.json │ ├── parameters.json │ └── workflow-designtime │ │ ├── host.json │ │ └── local.settings.json ├── TokenizeDocFunction │ ├── function_app.py │ ├── host.json │ ├── local.settings.json │ └── requirements.txt └── readme.md ├── arc-enabled-logic-app-sample ├── .devcontainer │ ├── Dockerfile │ └── devcontainer.json ├── .gitattributes ├── .gitignore ├── .vscode │ ├── extensions.json │ ├── launch.json │ ├── settings.json │ └── tasks.json ├── README.md ├── data │ └── ratings.csv ├── docs │ └── SolutionDiagramLogicAppsSample.png ├── env │ ├── aks.bicep │ ├── deploy.sh │ ├── deployFeatureRegister.sh │ ├── environment-variables.sh │ ├── ipAddress.bicep │ ├── main.bicep │ └── provisionKubernetesHostInfra.sh └── src │ ├── .funcignore │ ├── .gitignore │ ├── RatingsWorkflow │ └── workflow.json │ ├── connections.json │ ├── host.json │ └── workflow-designtime │ └── host.json ├── articles ├── enterprise-integration-e2e-case-management-utilities-azure-logic-apps.pdf ├── ip_updates_061720.md ├── logic-apps-public-preview-known-issues.md ├── microsoft-integration-with-azure-logic-apps.pdf └── worker-packages-dependencies-custom-code.pdf ├── azure-devops-sample ├── .dockerignore ├── .funcignore ├── .gitignore ├── .pipelines │ ├── classic │ │ ├── cd-pipeline.yml │ │ ├── ci-pipeline.yml │ │ ├── iac-pipeline.yml │ │ ├── templates │ │ │ └── template-iac-logicapp.yml │ │ └── variables │ │ │ └── pipeline-vars.yml │ ├── container │ │ ├── cd-pipeline.yml │ │ ├── ci-pipeline.yml │ │ ├── iac-pipeline.yml │ │ ├── templates │ │ │ └── template-iac-logicapp.yml │ │ └── variables │ │ │ └── pipeline-vars.yml │ └── scripts │ │ └── Generate-Connections.ps1 ├── .vscode │ ├── extensions.json │ ├── launch.json │ ├── settings.json │ └── tasks.json ├── Dockerfile ├── README.md ├── deploy │ ├── classic │ │ └── logicapp-template.json │ ├── connectors-template.json │ └── container │ │ ├── acr-template.json │ │ └── logicapp-template.json └── logic │ ├── .funcignore │ ├── EventProcessor │ └── workflow.json │ ├── EventTrigger │ └── workflow.json │ ├── azure.parameters.json │ ├── connections.json │ ├── host.json │ └── parameters.json ├── codeful-workflows └── samples │ └── recommend-coffee │ └── codeful-logicapp-recommendcoffee │ ├── .funcignore │ ├── .gitignore │ ├── .vscode │ ├── extensions.json │ ├── launch.json │ ├── settings.json │ └── tasks.json │ ├── Properties │ └── launchSettings.json │ ├── RecommendCoffee │ └── workflow.cs │ ├── codeful-logicapp.csproj │ ├── codeful-logicapp.sln │ ├── connections.json │ ├── global.json │ ├── host.json │ ├── local.settings.json │ ├── nuget.config │ ├── parameters.json │ └── test-recommendcoffee-sample-http │ └── RecommendCoffee.http ├── connectors ├── AzureVM │ ├── README.md │ ├── azuredeploy.json │ └── images │ │ └── aad-reply-ux.png └── Microsoft Graph │ ├── README.md │ ├── azuredeploy.json │ └── images │ └── aad-reply-ux.png ├── github-sample ├── .funcignore ├── .github │ └── workflows │ │ ├── IaC_deploy.yml │ │ └── logicapp_deploy.yml ├── .gitignore ├── .vscode │ ├── extensions.json │ ├── launch.json │ ├── settings.json │ └── tasks.json ├── ARM │ ├── connectors-parameters.json │ ├── connectors-template.json │ ├── la-parameters.json │ └── la-template.json ├── Dockerfile ├── README.md └── logic │ ├── .funcignore │ ├── EventProcessor │ └── workflow.json │ ├── EventTrigger │ └── workflow.json │ ├── azure.parameters.json │ ├── connections.json │ ├── host.json │ └── parameters.json ├── labs └── twitter-to-powerbi │ ├── README.md │ └── images │ ├── functionConfig.png │ ├── powerbiConfig.png │ └── twitterConfig.png ├── preview ├── Images │ ├── DisableUpdate.png │ ├── InstallVsix.png │ ├── RuntimeVersion.png │ └── logicapp.png ├── LICENSE ├── LogicAppsV2Demo.mp4 └── readme.md ├── scripts ├── README.md ├── cancel-all-runs │ └── cancel-runs.ps1 ├── hybrid │ ├── EnvironmentSetup.ps1 │ └── troubleshoot.ps1 ├── recurrence-jobs │ ├── README.md │ ├── deploy.ps1 │ └── schedulesWithConn.json ├── resubmit-all-failed-runs │ ├── README.md │ └── resubmit-all-failed-runs.ps1 └── scheduler-migration │ ├── README.md │ ├── run-once-handler.json │ └── scheduler-migration.ps1 ├── templates ├── Azure-Blob-Auto-Expiration.json ├── Azure-Blob-Auto-Tier.json ├── README.md ├── _sample.json ├── as2-response.json ├── asc-alert-send-notification-email.json ├── asc-recommendation-send-notification-email.json ├── asc-regulatoryCompliance-send-notification-email.json ├── azure-monitor-metric-alert-handler.json ├── benchmarks │ └── burst │ │ ├── dispatcher.json │ │ ├── enricher.json │ │ ├── functionAppCode.cs │ │ └── readme.md ├── blob-storage-to-dynamics-365-import.json ├── blockchain-dataworkflow.json ├── blockchain-messagingworkflow-eventgrid.json ├── blockchain-messagingworkflow-servicebus.json ├── blockchain-reportingworkflow.json ├── blockchain-serviceworkflow-nogas.json ├── blockchain-serviceworkflow-withgas.json ├── cancel-runs-by-tracking-id.json ├── daily-reminders.json ├── dropbox-onedrive.json ├── dropbox-to-sharepoint.json ├── dynamics-online-common-data-model-contacts.json ├── images │ └── azure-monitor.png ├── instagram-to-twitter.json ├── mailchimp-sharepoint.json ├── manifest.json ├── office-to-wunderlist.json ├── request-response.json ├── rosettanet-decode-response.json ├── rosettanet-encode-response.json ├── salesforce-common-data-model-accounts.json ├── sap-receive-batch.json ├── scheduler-recurrence-storage-queue.json ├── scheduler-run-once-http.json ├── service-bus-peek-lock-complete.json ├── service-bus-peek-lock-dead-letter.json ├── service-bus-sessions.json ├── sharepoint-attachments.json ├── sharepoint-file-email.json ├── sharepoint-list-email.json ├── sharepoint-modified.json ├── sharepoint-move.json ├── slack-tweet.json ├── twitter-facebook.json ├── twitter-sharepoint.json ├── twitter-to-office.json ├── twitter-to-outlook.json ├── twitter-to-smtp.json ├── veter.json └── x12-to-as2.json └── tools └── powerapps-swagger-generator └── generateSwagger.ps1 /.github/ISSUE_TEMPLATE/bug.yml: -------------------------------------------------------------------------------- 1 | name: '🐞 Report A Bug' 2 | description: Use this to create a report if you found Logic Apps Bug 3 | labels: ["triage"] 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: | 8 | Thank you for reporting an issue. 9 | 10 | This issue tracker is for reporting bugs found in Logic Apps (https://github.com/Azure/logicapps) 11 | If you have a question about how to achieve something and are struggling with a broader Logic App issue, please post a question 12 | inside of Logic App's discussion tab: https://github.com/Azure/logicapps/discussions 13 | 14 | Before submitting a new bug/issue, please check the links below to see if there is a solution or question posted there already: 15 | - Open Issue's tab: https://github.com/Azure/logicapps/issues?q=is%3Aissue+sort%3Aupdated-desc+position 16 | - Closed Issues tab: https://github.com/Azure/logicapps/issues?q=is%3Aissue+sort%3Aupdated-desc+position+is%3Aclosed 17 | 18 | The more information you fill in, the better we can help you. 19 | 20 | - type: textarea 21 | id: description 22 | attributes: 23 | label: Describe the Bug 24 | description: Provide a clear and concise description of the challenge you are running into. 25 | validations: 26 | required: true 27 | 28 | 29 | - type: input 30 | id: plantype 31 | attributes: 32 | label: Plan Type 33 | placeholder: Standard/Consumption/Local 34 | validations: 35 | required: true 36 | 37 | - type: textarea 38 | id: steps 39 | attributes: 40 | label: Steps to Reproduce the Bug or Issue 41 | description: Describe the steps we have to take to reproduce the behavior. 42 | placeholder: | 43 | 1. Go to '...' 44 | 2. Click on '....' 45 | 3. Scroll down to '....' 46 | 4. See error 47 | validations: 48 | required: true 49 | 50 | - type: textarea 51 | id: workflow 52 | attributes: 53 | label: Workflow JSON 54 | description: If able, provide a workflow json that reproduces the issue. 55 | placeholder: | 56 | { 57 | "definition": { 58 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", 59 | "actions": {}, 60 | "contentVersion": "1.0.0.0", 61 | "outputs": {}, 62 | "triggers": {} 63 | }, 64 | "kind": "Stateful" 65 | } 66 | render: json 67 | validations: 68 | required: false 69 | 70 | - type: textarea 71 | id: screenshots_or_videos 72 | attributes: 73 | label: Screenshots or Videos 74 | description: | 75 | If applicable, add screenshots or a video to help explain your problem. 76 | For more information on the supported file image/file types and the file size limits, please refer 77 | to the following link: https://docs.github.com/en/github/writing-on-github/working-with-advanced-formatting/attaching-files 78 | placeholder: | 79 | You can drag your video or image files inside of this editor ↓ 80 | 81 | - type: textarea 82 | id: additional 83 | attributes: 84 | label: Additional context 85 | description: Add any other context about the problem here. -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: 🤔 Feature Requests & Questions 4 | url: https://github.com/Azure/logicapps/discussions 5 | about: Please ask and answer questions in the discussions section -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/vscode.yml: -------------------------------------------------------------------------------- 1 | name: 'Visual Studio Code' 2 | description: Use this to create a report if you were brought here from a VSCode Crash 3 | labels: ["triage", "vscode"] 4 | body: 5 | - type: textarea 6 | id: vscodedump 7 | attributes: 8 | label: VSCode Dump 9 | placeholder: The issue text was copied to the clipboard. Please paste it into this window. 10 | validations: 11 | required: true 12 | 13 | - type: textarea 14 | id: steps 15 | attributes: 16 | label: Steps to Reproduce the Bug or Issue 17 | description: Describe the steps we have to take to reproduce the behavior. Please also include any other context. 18 | placeholder: | 19 | 1. Go to '...' 20 | 2. Click on '....' 21 | 3. Scroll down to '....' 22 | 4. See error 23 | validations: 24 | required: true -------------------------------------------------------------------------------- /.github/workflows/IssueManagement.yml: -------------------------------------------------------------------------------- 1 | name: Close inactive issues 2 | on: 3 | schedule: 4 | - cron: "0 * * * *" 5 | 6 | jobs: 7 | close-issues: 8 | runs-on: ubuntu-latest 9 | permissions: 10 | issues: write 11 | pull-requests: write 12 | steps: 13 | - uses: actions/stale@v4 14 | with: 15 | exempt-issue-labels: "bug" 16 | days-before-issue-stale: 45 17 | days-before-issue-close: 14 18 | stale-issue-label: "stale" 19 | stale-issue-message: "This issue is stale because it has been open for 45 days with no activity." 20 | close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale." 21 | days-before-pr-stale: 45 22 | days-before-pr-close: 14 23 | stale-pr-message: "This PR is stale because it has been open for 30 days with no activity." 24 | close-pr-message: "This issue was closed because it has been inactive for 7 days since being marked as stale." 25 | operations-per-run: 1000 26 | repo-token: ${{ secrets.GITHUB_TOKEN }} 27 | -------------------------------------------------------------------------------- /.github/workflows/IssueSync.yml: -------------------------------------------------------------------------------- 1 | name: Sync issue to Azure DevOps work item 2 | 3 | on: 4 | issues: 5 | types: [opened, edited, deleted, closed, reopened, labeled, unlabeled, assigned] 6 | issue_comment: 7 | types: [created, edited, deleted] 8 | 9 | jobs: 10 | alert: 11 | runs-on: ubuntu-latest 12 | permissions: 13 | contents: write 14 | issues: write 15 | pull-requests: write 16 | steps: 17 | - uses: danhellem/github-actions-issue-to-work-item@master 18 | env: 19 | ado_token: '${{ secrets.SYNC_SECRET }}' 20 | github_token: '${{ secrets.GITHUB_TOKEN }}' 21 | ado_organization: 'msazure' 22 | ado_project: 'One' 23 | ado_area_path: "One\\Azure\\LogicApps" 24 | ado_iteration_path: "One\\Custom\\Azure\\LogicApps" 25 | ado_wit: 'Bug' 26 | ado_new_state: 'New' 27 | ado_active_state: 'Active' 28 | ado_close_state: 'Done' 29 | log_level: 100 30 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Microsoft Corporation. All rights reserved. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE 22 | -------------------------------------------------------------------------------- /LogicApps-AI-RAG-Demo/Deployment/aisearch_index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "chat-index", 3 | "fields": [ 4 | { 5 | "name": "id", 6 | "type": "Edm.String", 7 | "searchable": false, 8 | "filterable": false, 9 | "retrievable": true, 10 | "sortable": false, 11 | "facetable": false, 12 | "key": true, 13 | "indexAnalyzer": null, 14 | "searchAnalyzer": null, 15 | "analyzer": null, 16 | "normalizer": null, 17 | "dimensions": null, 18 | "vectorSearchProfile": null, 19 | "synonymMaps": [] 20 | }, 21 | { 22 | "name": "documentName", 23 | "type": "Edm.String", 24 | "searchable": false, 25 | "filterable": true, 26 | "retrievable": true, 27 | "sortable": false, 28 | "facetable": false, 29 | "key": false, 30 | "indexAnalyzer": null, 31 | "searchAnalyzer": null, 32 | "analyzer": null, 33 | "normalizer": null, 34 | "dimensions": null, 35 | "vectorSearchProfile": null, 36 | "synonymMaps": [] 37 | }, 38 | { 39 | "name": "documentUrl", 40 | "type": "Edm.String", 41 | "searchable": false, 42 | "filterable": true, 43 | "retrievable": true, 44 | "sortable": false, 45 | "facetable": false, 46 | "key": false, 47 | "indexAnalyzer": null, 48 | "searchAnalyzer": null, 49 | "analyzer": null, 50 | "normalizer": null, 51 | "dimensions": null, 52 | "vectorSearchProfile": null, 53 | "synonymMaps": [] 54 | }, 55 | { 56 | "name": "content", 57 | "type": "Edm.String", 58 | "searchable": true, 59 | "filterable": true, 60 | "retrievable": true, 61 | "sortable": false, 62 | "facetable": false, 63 | "key": false, 64 | "indexAnalyzer": null, 65 | "searchAnalyzer": null, 66 | "analyzer": "standard.lucene", 67 | "normalizer": null, 68 | "dimensions": null, 69 | "vectorSearchProfile": null, 70 | "synonymMaps": [] 71 | }, 72 | { 73 | "name": "embeddings", 74 | "type": "Collection(Edm.Single)", 75 | "searchable": true, 76 | "filterable": false, 77 | "retrievable": true, 78 | "sortable": false, 79 | "facetable": false, 80 | "key": false, 81 | "indexAnalyzer": null, 82 | "searchAnalyzer": null, 83 | "analyzer": null, 84 | "normalizer": null, 85 | "dimensions": 1536, 86 | "vectorSearchProfile": "vector-profile", 87 | "synonymMaps": [] 88 | } 89 | ], 90 | "scoringProfiles": [], 91 | "corsOptions": null, 92 | "suggesters": [], 93 | "analyzers": [], 94 | "normalizers": [], 95 | "tokenizers": [], 96 | "tokenFilters": [], 97 | "charFilters": [], 98 | "encryptionKey": null, 99 | "semantic": null, 100 | "vectorSearch": { 101 | "algorithms": [ 102 | { 103 | "name": "vector-config", 104 | "kind": "hnsw", 105 | "hnswParameters": { 106 | "metric": "cosine", 107 | "m": 4, 108 | "efConstruction": 400, 109 | "efSearch": 500 110 | }, 111 | "exhaustiveKnnParameters": null 112 | } 113 | ], 114 | "profiles": [ 115 | { 116 | "name": "vector-profile", 117 | "algorithm": "vector-config", 118 | "vectorizer": null 119 | } 120 | ], 121 | "vectorizers": [] 122 | } 123 | } -------------------------------------------------------------------------------- /LogicApps-AI-RAG-Demo/SampleAIWorkflows/connections.json: -------------------------------------------------------------------------------- 1 | { 2 | "serviceProviderConnections": { 3 | "sql": { 4 | "parameterValues": { 5 | "connectionString": "@parameters('sql_connectionString')" 6 | }, 7 | "parameterSetName": "connectionString", 8 | "serviceProvider": { 9 | "id": "/serviceProviders/sql" 10 | }, 11 | "displayName": "sql-con" 12 | }, 13 | "openai": { 14 | "parameterValues": { 15 | "openAIEndpoint": "@parameters('openai_openAIEndpoint')", 16 | "openAIKey": "@parameters('openai_openAIKey')" 17 | }, 18 | "parameterSetName": "KeyAndEndpointConnection", 19 | "serviceProvider": { 20 | "id": "/serviceProviders/openai" 21 | }, 22 | "displayName": "openai-con" 23 | }, 24 | "azureaisearch": { 25 | "parameterValues": { 26 | "searchServiceEndpoint": "@parameters('azureaisearch_searchServiceEndpoint')", 27 | "searchServiceAdminKey": "@parameters('azureaisearch_searchServiceAdminKey')" 28 | }, 29 | "parameterSetName": "ConnectionString", 30 | "serviceProvider": { 31 | "id": "/serviceProviders/azureaisearch" 32 | }, 33 | "displayName": "aisearch-con" 34 | } 35 | }, 36 | "managedApiConnections": {} 37 | } -------------------------------------------------------------------------------- /LogicApps-AI-RAG-Demo/SampleAIWorkflows/host.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0", 3 | "extensionBundle": { 4 | "id": "Microsoft.Azure.Functions.ExtensionBundle.Workflows", 5 | "version": "[1.*, 2.0.0)" 6 | } 7 | } -------------------------------------------------------------------------------- /LogicApps-AI-RAG-Demo/SampleAIWorkflows/local.settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "IsEncrypted": false, 3 | "Values": { 4 | "openai_openAIKey": "", 5 | "openai_openAIEndpoint": "", 6 | "sql_connectionString": "", 7 | "azureaisearch_searchServiceEndpoint": "", 8 | "azureaisearch_searchServiceAdminKey": "" 9 | } 10 | } -------------------------------------------------------------------------------- /LogicApps-AI-RAG-Demo/SampleAIWorkflows/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "tokenize_function_url": { 3 | "type": "String", 4 | "value": "" 5 | }, 6 | "openai_embedding_deployment_model": { 7 | "type": "String", 8 | "value": "" 9 | }, 10 | "aisearch_index_name": { 11 | "type": "string", 12 | "value": "" 13 | }, 14 | "sql_table_name": { 15 | "type": "String", 16 | "value": "" 17 | }, 18 | "openai_chat_deployment_model": { 19 | "type": "String", 20 | "value": "" 21 | } 22 | } -------------------------------------------------------------------------------- /LogicApps-AI-RAG-Demo/TokenizeDocFunction/host.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0", 3 | "logging": { 4 | "applicationInsights": { 5 | "samplingSettings": { 6 | "isEnabled": true, 7 | "excludedTypes": "Request" 8 | } 9 | } 10 | }, 11 | "extensionBundle": { 12 | "id": "Microsoft.Azure.Functions.ExtensionBundle", 13 | "version": "[3.*, 4.0.0)" 14 | } 15 | } -------------------------------------------------------------------------------- /LogicApps-AI-RAG-Demo/TokenizeDocFunction/local.settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "IsEncrypted": false, 3 | "Values": { 4 | "AzureWebJobsStorage": "UseDevelopmentStorage=true", 5 | "FUNCTIONS_WORKER_RUNTIME": "python", 6 | "AzureWebJobsFeatureFlags": "EnableWorkerIndexing" 7 | } 8 | } -------------------------------------------------------------------------------- /LogicApps-AI-RAG-Demo/TokenizeDocFunction/requirements.txt: -------------------------------------------------------------------------------- 1 | # DO NOT include azure-functions-worker in this file 2 | # The Python Worker is managed by Azure Functions platform 3 | # Manually managing azure-functions-worker may cause unexpected issues 4 | 5 | azure-functions 6 | langchain==0.0.326 7 | tiktoken==0.5.1 8 | pypdf==3.15.5 9 | -------------------------------------------------------------------------------- /LogicAppsSampleTestFramework/LogicAppsSampleTestFramework.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.31729.503 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestCases", "TestCases\TestCases.csproj", "{41BA60A8-C09D-404B-85D3-8C6EA0208244}" 7 | ProjectSection(ProjectDependencies) = postProject 8 | {A38F3075-86D0-489C-9533-77B73551F894} = {A38F3075-86D0-489C-9533-77B73551F894} 9 | EndProjectSection 10 | EndProject 11 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestFramework", "TestFramework\TestFramework.csproj", "{A38F3075-86D0-489C-9533-77B73551F894}" 12 | EndProject 13 | Global 14 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 15 | Debug|Any CPU = Debug|Any CPU 16 | Release|Any CPU = Release|Any CPU 17 | EndGlobalSection 18 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 19 | {41BA60A8-C09D-404B-85D3-8C6EA0208244}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 20 | {41BA60A8-C09D-404B-85D3-8C6EA0208244}.Debug|Any CPU.Build.0 = Debug|Any CPU 21 | {41BA60A8-C09D-404B-85D3-8C6EA0208244}.Release|Any CPU.ActiveCfg = Release|Any CPU 22 | {41BA60A8-C09D-404B-85D3-8C6EA0208244}.Release|Any CPU.Build.0 = Release|Any CPU 23 | {A38F3075-86D0-489C-9533-77B73551F894}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 24 | {A38F3075-86D0-489C-9533-77B73551F894}.Debug|Any CPU.Build.0 = Debug|Any CPU 25 | {A38F3075-86D0-489C-9533-77B73551F894}.Release|Any CPU.ActiveCfg = Release|Any CPU 26 | {A38F3075-86D0-489C-9533-77B73551F894}.Release|Any CPU.Build.0 = Release|Any CPU 27 | EndGlobalSection 28 | GlobalSection(SolutionProperties) = preSolution 29 | HideSolutionNode = FALSE 30 | EndGlobalSection 31 | GlobalSection(ExtensibilityGlobals) = postSolution 32 | SolutionGuid = {088BAC01-EB70-440C-950B-2B887C066FCC} 33 | EndGlobalSection 34 | EndGlobal 35 | -------------------------------------------------------------------------------- /LogicAppsSampleTestFramework/TestCases/TestCases.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | false 5 | netcoreapp3.1 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /LogicAppsSampleTestFramework/TestCases/TestFiles/apiconnectionactionworkflow.json: -------------------------------------------------------------------------------- 1 | { 2 | "definition": { 3 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", 4 | "actions": { 5 | "Response": { 6 | "type": "Response", 7 | "kind": "http", 8 | "inputs": { 9 | "statusCode": 200, 10 | "body": "@body('List_resource_groups')" 11 | }, 12 | "runAfter": { 13 | "List_resource_groups": [ 14 | "Succeeded" 15 | ] 16 | } 17 | }, 18 | "List_resource_groups": { 19 | "type": "ApiConnection", 20 | "inputs": { 21 | "host": { 22 | "connection": { 23 | "referenceName": "arm" 24 | } 25 | }, 26 | "method": "get", 27 | "path": "/subscriptions/@{encodeURIComponent('someSubscription')}/resourcegroups", 28 | "queries": { 29 | "x-ms-api-version": "2016-06-01" 30 | } 31 | }, 32 | "runAfter": {} 33 | } 34 | }, 35 | "triggers": { 36 | "manual": { 37 | "type": "Request", 38 | "kind": "Http", 39 | "inputs": {} 40 | } 41 | }, 42 | "contentVersion": "1.0.0.0", 43 | "outputs": {} 44 | }, 45 | "kind": "Stateful" 46 | } -------------------------------------------------------------------------------- /LogicAppsSampleTestFramework/TestCases/TestFiles/connections.json: -------------------------------------------------------------------------------- 1 | { 2 | "managedApiConnections": { 3 | "arm": { 4 | "api": { 5 | "id": "/subscriptions/someSubscription/providers/Microsoft.Web/locations/eastus/managedApis/arm" 6 | }, 7 | "connection": { 8 | "id": "/subscriptions/someSubscription/resourceGroups/someResourceGroup/providers/Microsoft.Web/connections/arm-1" 9 | }, 10 | "connectionRuntimeUrl": "@appsetting('arm-connectionRuntimeUrl')", 11 | "authentication": { 12 | "type": "Raw", 13 | "scheme": "Key", 14 | "parameter": "@appsetting('arm-connectionKey')" 15 | } 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /LogicAppsSampleTestFramework/TestCases/TestFiles/host.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0", 3 | "extensionBundle": { 4 | "id": "Microsoft.Azure.Functions.ExtensionBundle.Workflows", 5 | "version": "[1.*, 2.0.0)" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /LogicAppsSampleTestFramework/TestCases/TestFiles/httpactionworkflow.json: -------------------------------------------------------------------------------- 1 | { 2 | "definition": { 3 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", 4 | "actions": { 5 | "HTTP": { 6 | "type": "Http", 7 | "inputs": { 8 | "method": "GET", 9 | "uri": "@appsetting('httpuri')" 10 | }, 11 | "runAfter": {} 12 | }, 13 | "Response": { 14 | "type": "Response", 15 | "kind": "http", 16 | "inputs": { 17 | "statusCode": 200, 18 | "body": "@body('HTTP')" 19 | }, 20 | "runAfter": { 21 | "HTTP": [ 22 | "Succeeded" 23 | ] 24 | } 25 | } 26 | }, 27 | "triggers": { 28 | "manual": { 29 | "type": "Request", 30 | "kind": "Http", 31 | "inputs": {} 32 | } 33 | }, 34 | "contentVersion": "1.0.0.0", 35 | "outputs": {} 36 | }, 37 | "kind": "Stateful" 38 | } -------------------------------------------------------------------------------- /LogicAppsSampleTestFramework/TestCases/TestFiles/local.settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "IsEncrypted": false, 3 | "Values": { 4 | "AzureWebJobsStorage": "UseDevelopmentStorage=true", 5 | "FUNCTIONS_WORKER_RUNTIME": "node" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /LogicAppsSampleTestFramework/TestCases/TestFiles/requestresponseworkflow.json: -------------------------------------------------------------------------------- 1 | { 2 | "definition": { 3 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", 4 | "actions": { 5 | "Response": { 6 | "type": "Response", 7 | "kind": "http", 8 | "inputs": { 9 | "statusCode": 200, 10 | "body": "@outputs('Compose')" 11 | }, 12 | "runAfter": { 13 | "Compose": [ 14 | "Succeeded" 15 | ] 16 | } 17 | }, 18 | "Compose": { 19 | "type": "Compose", 20 | "inputs": "Hello from Logic Apps!", 21 | "runAfter": {} 22 | } 23 | }, 24 | "triggers": { 25 | "manual": { 26 | "type": "Request", 27 | "kind": "Http", 28 | "inputs": {} 29 | } 30 | }, 31 | "contentVersion": "1.0.0.0", 32 | "outputs": {} 33 | }, 34 | "kind": "Stateful" 35 | } -------------------------------------------------------------------------------- /LogicAppsSampleTestFramework/TestFramework/CallbackUrlDefinition.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) .NET Foundation. All rights reserved. 2 | // Licensed under the MIT License. See License.txt in the project root for license information 3 | 4 | namespace TestFramework 5 | { 6 | using System; 7 | using System.Collections.Generic; 8 | using Newtonsoft.Json; 9 | 10 | /// 11 | /// Flow callback URL definition. 12 | /// 13 | public class CallbackUrlDefinition 14 | { 15 | /// 16 | /// Gets or sets the value. 17 | /// 18 | [JsonProperty] 19 | public Uri Value { get; set; } 20 | 21 | /// 22 | /// Gets or sets the method. 23 | /// 24 | [JsonProperty] 25 | public string Method { get; set; } 26 | 27 | /// 28 | /// Gets or sets the base path. 29 | /// 30 | [JsonProperty] 31 | public Uri BasePath { get; set; } 32 | 33 | /// 34 | /// Gets or sets the relative path. 35 | /// 36 | [JsonProperty] 37 | public string RelativePath { get; set; } 38 | 39 | /// 40 | /// Gets or sets relative path parameters. 41 | /// 42 | [JsonProperty] 43 | public List RelativePathParameters { get; set; } 44 | 45 | /// 46 | /// Gets or sets queries. 47 | /// 48 | [JsonProperty] 49 | public Dictionary Queries { get; set; } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /LogicAppsSampleTestFramework/TestFramework/HttpRequestMessageFeature.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) .NET Foundation. All rights reserved. 2 | // Licensed under the MIT License. See License.txt in the project root for license information. 3 | 4 | namespace TestFramework 5 | { 6 | using System; 7 | using System.Collections.Generic; 8 | using System.Net.Http; 9 | using System.Threading; 10 | using Microsoft.AspNetCore.Http; 11 | 12 | /// 13 | /// Http request message feature. 14 | /// 15 | public class HttpRequestMessageFeature 16 | { 17 | /// 18 | /// The request message. 19 | /// 20 | private HttpRequestMessage httpRequestMessage; 21 | 22 | /// 23 | /// Gets or sets the http context. 24 | /// 25 | private HttpContext HttpContext { get; set; } 26 | 27 | /// 28 | /// Gets or sets the http request message. 29 | /// 30 | public HttpRequestMessage HttpRequestMessage 31 | { 32 | get => this.httpRequestMessage ?? Interlocked.CompareExchange(ref this.httpRequestMessage, HttpRequestMessageFeature.CreateHttpRequestMessage(this.HttpContext), null) ?? this.httpRequestMessage; 33 | 34 | set 35 | { 36 | var oldValue = this.httpRequestMessage; 37 | if (Interlocked.Exchange(ref this.httpRequestMessage, value) != oldValue) 38 | { 39 | oldValue?.Dispose(); 40 | } 41 | } 42 | } 43 | 44 | /// 45 | /// Initializes a new instance of the class. 46 | /// 47 | /// The http request message feature. 48 | public HttpRequestMessageFeature(HttpContext httpContext) 49 | { 50 | this.HttpContext = httpContext; 51 | } 52 | 53 | /// 54 | /// Creates the http request message. 55 | /// 56 | /// The http context. 57 | private static HttpRequestMessage CreateHttpRequestMessage(HttpContext httpContext) 58 | { 59 | HttpRequestMessage message = null; 60 | try 61 | { 62 | var httpRequest = httpContext.Request; 63 | var uriString = 64 | httpRequest.Scheme + "://" + 65 | httpRequest.Host + 66 | httpRequest.PathBase + 67 | httpRequest.Path + 68 | httpRequest.QueryString; 69 | 70 | message = new HttpRequestMessage(new HttpMethod(httpRequest.Method), uriString); 71 | 72 | // This allows us to pass the message through APIs defined in legacy code and then 73 | // operate on the HttpContext inside. 74 | message.Properties[nameof(HttpContext)] = httpContext; 75 | 76 | message.Content = new StreamContent(httpRequest.Body); 77 | 78 | foreach (var header in httpRequest.Headers) 79 | { 80 | // Every header should be able to fit into one of the two header collections. 81 | // Try message.Headers first since that accepts more of them. 82 | if (!message.Headers.TryAddWithoutValidation(header.Key, (IEnumerable)header.Value)) 83 | { 84 | var added = message.Content.Headers.TryAddWithoutValidation(header.Key, (IEnumerable)header.Value); 85 | } 86 | } 87 | 88 | return message; 89 | } 90 | catch (Exception) 91 | { 92 | message?.Dispose(); 93 | throw; 94 | } 95 | } 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /LogicAppsSampleTestFramework/TestFramework/TestFramework.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /LogicAppsSampleTestFramework/TestFramework/WorkflowTestInput.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) .NET Foundation. All rights reserved. 2 | // Licensed under the MIT License. See License.txt in the project root for license information 3 | 4 | namespace TestFramework 5 | { 6 | /// 7 | /// Function test Input 8 | /// 9 | public class WorkflowTestInput 10 | { 11 | /// 12 | /// Gets or sets the function name. 13 | /// 14 | public string FunctionName { get; set; } 15 | 16 | /// 17 | /// Gets or sets the flow definition. 18 | /// 19 | public string FlowDefinition { get; set; } 20 | 21 | /// 22 | /// Gets or sets the file name. 23 | /// 24 | public string Filename { get; set; } 25 | 26 | /// 27 | /// Constructor 28 | /// 29 | /// Function name 30 | /// Flow definition 31 | /// File name. 32 | public WorkflowTestInput(string functionName = null, string flowDefinition = null, string fileName = null) 33 | { 34 | this.FunctionName = functionName; 35 | this.FlowDefinition = flowDefinition; 36 | this.Filename = fileName ?? "workflow.json"; 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Azure Logic Apps 2 | 3 | If you have questions about Logic Apps, please visit [Microsoft Q&A](https://docs.microsoft.com/answers/topics/azure-logic-apps.html). 4 | 5 | If you have feedback regarding Logic Apps, such as suggestions for features or other observations, please visit [feedback.azure.com](https://feedback.azure.com/forums/287593-logic-apps). 6 | 7 | ## Connectors 8 | Samples of custom connectors for Azure Logic Apps. 9 | 10 | * [Azure VM](connectors/AzureVM/README.md) - 11 | 12 | 13 | 14 | * Start, Stop, Deallocate, Restart, and more 15 | * [Microsoft Graph](connectors/Microsoft%20Graph/README.md) - 16 | 17 | 18 | 19 | * Add User, Assign Manager, Assign License, and more 20 | 21 | ## Templates 22 | View the template gallery for logic apps, with [instructions on how to create your own template](templates/README.md) 23 | 24 | ## Articles 25 | View published whitepapers on how Azure Logic Apps have been adopted in the enterprise. 26 | 27 | # Contributing 28 | 29 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. 30 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## Security 4 | 5 | Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). 6 | 7 | If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below. 8 | 9 | ## Reporting Security Issues 10 | 11 | **Please do not report security vulnerabilities through public GitHub issues.** 12 | 13 | Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report). 14 | 15 | If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey). 16 | 17 | You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc). 18 | 19 | Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: 20 | 21 | * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) 22 | * Full paths of source file(s) related to the manifestation of the issue 23 | * The location of the affected source code (tag/branch/commit or direct URL) 24 | * Any special configuration required to reproduce the issue 25 | * Step-by-step instructions to reproduce the issue 26 | * Proof-of-concept or exploit code (if possible) 27 | * Impact of the issue, including how an attacker might exploit the issue 28 | 29 | This information will help us triage your report more quickly. 30 | 31 | If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs. 32 | 33 | ## Preferred Languages 34 | 35 | We prefer all communications to be in English. 36 | 37 | ## Policy 38 | 39 | Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd). 40 | 41 | 42 | -------------------------------------------------------------------------------- /ai-sample/Deployment/aisearch_index.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "chat-index", 3 | "fields": [ 4 | { 5 | "name": "id", 6 | "type": "Edm.String", 7 | "searchable": false, 8 | "filterable": false, 9 | "retrievable": true, 10 | "sortable": false, 11 | "facetable": false, 12 | "key": true, 13 | "indexAnalyzer": null, 14 | "searchAnalyzer": null, 15 | "analyzer": null, 16 | "normalizer": null, 17 | "dimensions": null, 18 | "vectorSearchProfile": null, 19 | "synonymMaps": [] 20 | }, 21 | { 22 | "name": "documentName", 23 | "type": "Edm.String", 24 | "searchable": false, 25 | "filterable": true, 26 | "retrievable": true, 27 | "sortable": false, 28 | "facetable": false, 29 | "key": false, 30 | "indexAnalyzer": null, 31 | "searchAnalyzer": null, 32 | "analyzer": null, 33 | "normalizer": null, 34 | "dimensions": null, 35 | "vectorSearchProfile": null, 36 | "synonymMaps": [] 37 | }, 38 | { 39 | "name": "documentUrl", 40 | "type": "Edm.String", 41 | "searchable": false, 42 | "filterable": true, 43 | "retrievable": true, 44 | "sortable": false, 45 | "facetable": false, 46 | "key": false, 47 | "indexAnalyzer": null, 48 | "searchAnalyzer": null, 49 | "analyzer": null, 50 | "normalizer": null, 51 | "dimensions": null, 52 | "vectorSearchProfile": null, 53 | "synonymMaps": [] 54 | }, 55 | { 56 | "name": "content", 57 | "type": "Edm.String", 58 | "searchable": true, 59 | "filterable": true, 60 | "retrievable": true, 61 | "sortable": false, 62 | "facetable": false, 63 | "key": false, 64 | "indexAnalyzer": null, 65 | "searchAnalyzer": null, 66 | "analyzer": "standard.lucene", 67 | "normalizer": null, 68 | "dimensions": null, 69 | "vectorSearchProfile": null, 70 | "synonymMaps": [] 71 | }, 72 | { 73 | "name": "embeddings", 74 | "type": "Collection(Edm.Single)", 75 | "searchable": true, 76 | "filterable": false, 77 | "retrievable": true, 78 | "sortable": false, 79 | "facetable": false, 80 | "key": false, 81 | "indexAnalyzer": null, 82 | "searchAnalyzer": null, 83 | "analyzer": null, 84 | "normalizer": null, 85 | "dimensions": 1536, 86 | "vectorSearchProfile": "vector-profile", 87 | "synonymMaps": [] 88 | } 89 | ], 90 | "scoringProfiles": [], 91 | "corsOptions": null, 92 | "suggesters": [], 93 | "analyzers": [], 94 | "normalizers": [], 95 | "tokenizers": [], 96 | "tokenFilters": [], 97 | "charFilters": [], 98 | "encryptionKey": null, 99 | "semantic": null, 100 | "vectorSearch": { 101 | "algorithms": [ 102 | { 103 | "name": "vector-config", 104 | "kind": "hnsw", 105 | "hnswParameters": { 106 | "metric": "cosine", 107 | "m": 4, 108 | "efConstruction": 400, 109 | "efSearch": 500 110 | }, 111 | "exhaustiveKnnParameters": null 112 | } 113 | ], 114 | "profiles": [ 115 | { 116 | "name": "vector-profile", 117 | "algorithm": "vector-config", 118 | "vectorizer": null 119 | } 120 | ], 121 | "vectorizers": [] 122 | } 123 | } -------------------------------------------------------------------------------- /ai-sample/SampleAIWorkflows/connections.json: -------------------------------------------------------------------------------- 1 | { 2 | "managedApiConnections": {}, 3 | "serviceProviderConnections": { 4 | "azureaisearch": { 5 | "displayName": "openAI-connection", 6 | "parameterSetName": "ConnectionString", 7 | "parameterValues": { 8 | "searchServiceAdminKey": "@parameters('aisearch_admin_key')", 9 | "searchServiceEndpoint": "@parameters('aisearch_endpoint')" 10 | }, 11 | "serviceProvider": { 12 | "id": "/serviceProviders/azureaisearch" 13 | } 14 | }, 15 | "openai": { 16 | "displayName": "openai", 17 | "parameterSetName": "NotSpecified", 18 | "parameterValues": { 19 | "openAIEndpoint": "@parameters('openai_endpoint')", 20 | "openAIKey": "@parameters('openai_api_key')" 21 | }, 22 | "serviceProvider": { 23 | "id": "/serviceProviders/openai" 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ai-sample/SampleAIWorkflows/host.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0", 3 | "logging": { 4 | "applicationInsights": { 5 | "samplingSettings": { 6 | "isEnabled": true, 7 | "excludedTypes": "Request" 8 | } 9 | } 10 | }, 11 | "extensionBundle": { 12 | "id": "Microsoft.Azure.Functions.ExtensionBundle.Workflows", 13 | "version": "[1.*, 2.0.0)" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ai-sample/SampleAIWorkflows/local.settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "IsEncrypted": false, 3 | "Values": { 4 | "AzureWebJobsStorage": "UseDevelopmentStorage=true", 5 | "APP_KIND": "workflowapp", 6 | "ProjectDirectoryPath": "c:\\dev\\logicapps\\ai-sample\\SampleAIWorkflows", 7 | "FUNCTIONS_WORKER_RUNTIME": "node", 8 | "WORKFLOWS_SUBSCRIPTION_ID": "" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /ai-sample/SampleAIWorkflows/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "openai_chat_deployment_id": { 3 | "type": "string", 4 | "value": "" 5 | }, 6 | "openai_embedding_deployment_id": { 7 | "type": "string", 8 | "value": "" 9 | }, 10 | "openai_api_key": { 11 | "type": "string", 12 | "value": "" 13 | }, 14 | "openai_endpoint": { 15 | "type": "string", 16 | "value": "" 17 | }, 18 | "aisearch_index_name": { 19 | "type": "string", 20 | "value": "" 21 | }, 22 | "aisearch_admin_key": { 23 | "type": "string", 24 | "value": "" 25 | }, 26 | "aisearch_endpoint": { 27 | "type": "string", 28 | "value": "" 29 | }, 30 | "tokenize_function_url": { 31 | "type": "string", 32 | "value": "" 33 | } 34 | } -------------------------------------------------------------------------------- /ai-sample/SampleAIWorkflows/workflow-designtime/host.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0", 3 | "extensionBundle": { 4 | "id": "Microsoft.Azure.Functions.ExtensionBundle.Workflows", 5 | "version": "[1.*, 2.0.0)" 6 | }, 7 | "extensions": { 8 | "workflow": { 9 | "settings": { 10 | "Runtime.WorkflowOperationDiscoveryHostMode": "true" 11 | } 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /ai-sample/SampleAIWorkflows/workflow-designtime/local.settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "IsEncrypted": false, 3 | "Values": { 4 | "AzureWebJobsSecretStorageType": "Files", 5 | "FUNCTIONS_WORKER_RUNTIME": "node", 6 | "APP_KIND": "workflowapp", 7 | "ProjectDirectoryPath": "C:\\dev\\logicapps\\ai-sample\\SampleAIWorkflows" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /ai-sample/TokenizeDocFunction/host.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0", 3 | "logging": { 4 | "applicationInsights": { 5 | "samplingSettings": { 6 | "isEnabled": true, 7 | "excludedTypes": "Request" 8 | } 9 | } 10 | }, 11 | "extensionBundle": { 12 | "id": "Microsoft.Azure.Functions.ExtensionBundle", 13 | "version": "[3.*, 4.0.0)" 14 | } 15 | } -------------------------------------------------------------------------------- /ai-sample/TokenizeDocFunction/local.settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "IsEncrypted": false, 3 | "Values": { 4 | "AzureWebJobsStorage": "UseDevelopmentStorage=true", 5 | "FUNCTIONS_WORKER_RUNTIME": "python", 6 | "AzureWebJobsFeatureFlags": "EnableWorkerIndexing" 7 | } 8 | } -------------------------------------------------------------------------------- /ai-sample/TokenizeDocFunction/requirements.txt: -------------------------------------------------------------------------------- 1 | # DO NOT include azure-functions-worker in this file 2 | # The Python Worker is managed by Azure Functions platform 3 | # Manually managing azure-functions-worker may cause unexpected issues 4 | 5 | azure-functions 6 | langchain==0.0.326 7 | tiktoken==0.5.1 8 | pypdf==3.15.5 9 | -------------------------------------------------------------------------------- /arc-enabled-logic-app-sample/.devcontainer/Dockerfile: -------------------------------------------------------------------------------- 1 | # [Choice] .NET Core version: 3.1, 2.1 2 | ARG VARIANT=3.1 3 | FROM mcr.microsoft.com/vscode/devcontainers/dotnet:0-${VARIANT} 4 | 5 | # Avoid warnings by switching to noninteractive 6 | ENV DEBIAN_FRONTEND=noninteractive 7 | 8 | # install packages 9 | RUN \ 10 | # Install Azure CLI 11 | curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash 12 | 13 | RUN \ 14 | # verify git and needed tools are installed 15 | apt-get -y install \ 16 | git \ 17 | iproute2 \ 18 | procps \ 19 | curl \ 20 | apt-transport-https \ 21 | gnupg2 \ 22 | lsb-release \ 23 | jq \ 24 | software-properties-common \ 25 | zip \ 26 | npm 27 | 28 | RUN \ 29 | # Add source for Azure Functions 30 | curl -sL https://packages.microsoft.com/keys/microsoft.asc | (OUT=$(apt-key add - 2>&1) || echo $OUT) \ 31 | && echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-$(lsb_release -cs)-prod $(lsb_release -cs) main" > /etc/apt/sources.list.d/dotnetdev.list \ 32 | # Add source for Docker CLI 33 | && curl -fsSL https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/gpg | apt-key add - 2>/dev/null \ 34 | && echo "deb [arch=amd64] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list \ 35 | # Add source for Helm 36 | && curl https://baltocdn.com/helm/signing.asc | apt-key add \ 37 | && echo "deb https://baltocdn.com/helm/stable/debian/ all main" | tee /etc/apt/sources.list.d/helm-stable-debian.list \ 38 | && apt-get update \ 39 | && apt-get -y install --no-install-recommends \ 40 | apt-utils \ 41 | dialog \ 42 | # Install Func CLI 43 | azure-functions-core-tools-3 \ 44 | # Install Docker CLI 45 | docker-ce-cli \ 46 | # Install Helm 47 | helm=3.5.0-1 \ 48 | # Install Azure CLI Extensions 49 | && az aks install-cli \ 50 | # Install bicep 51 | && az bicep install \ 52 | && az extension add -n application-insights \ 53 | && az extension add --upgrade --yes -n connectedk8s \ 54 | && az extension add --upgrade --yes -n customlocation \ 55 | && az extension add --upgrade --yes -n k8s-extension \ 56 | && az extension add --yes --source "https://aka.ms/appsvc/appservice_kube-latest-py2.py3-none-any.whl" \ 57 | && az extension add --yes --source "https://aka.ms/logicapp-latest-py2.py3-none-any.whl" \ 58 | # Install Azurite 59 | && npm install -g azurite \ 60 | && apt-get clean -y && rm -rf /var/lib/apt/lists/* 61 | 62 | ENV PATH=/root/.azure/bin:${PATH} 63 | ENV DOCKER_HOST=tcp://host.docker.internal:2375 64 | 65 | # Switch back to dialog for any ad-hoc use of apt-get 66 | ENV DEBIAN_FRONTEND=dialog 67 | -------------------------------------------------------------------------------- /arc-enabled-logic-app-sample/.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | // For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: 2 | // https://github.com/microsoft/vscode-dev-containers/tree/v0.177.0/containers/azure-bicep 3 | { 4 | "name": "Arc-Enabled Logic Apps Sample", 5 | "dockerFile": "Dockerfile", 6 | 7 | // Set *default* container specific settings.json values on container create. 8 | "settings": { 9 | "terminal.integrated.defaultProfile.linux": "bash", 10 | }, 11 | 12 | // Add the IDs of extensions you want installed when the container is created. 13 | "extensions": [ 14 | "azurite.azurite", 15 | "ms-azuretools.vscode-bicep", 16 | "ms-azuretools.vscode-azurelogicapps", 17 | "ms-azuretools.vscode-docker", 18 | "ms-azuretools.vscode-azurestorage", 19 | "ms-azuretools.vscode-azurefunctions", 20 | "ms-kubernetes-tools.vscode-kubernetes-tools", 21 | "ms-dotnettools.vscode-dotnet-runtime", 22 | "ms-dotnettools.csharp", 23 | "ms-vscode.azurecli", 24 | "davidanson.vscode-markdownlint", 25 | "eridem.vscode-postman", 26 | "shd101wyy.markdown-preview-enhanced" 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /arc-enabled-logic-app-sample/.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | # https://www.davidlaing.com/2012/09/19/customise-your-gitattributes-to-become-a-git-ninja/ 3 | * text=auto 4 | 5 | *.cs text diff=csharp -------------------------------------------------------------------------------- /arc-enabled-logic-app-sample/.gitignore: -------------------------------------------------------------------------------- 1 | # Visual Studio 2015 cache/options directory 2 | **/.vs/ 3 | 4 | env/*.json 5 | 6 | # Azurite folders/files 7 | **/__*storage__/ 8 | **/__azurite* 9 | .azurite 10 | 11 | # LogicApp used solely to generate connection information 12 | **/ConnectionsGenerator 13 | 14 | environment-variables.*.sh 15 | env/repopvars.sh 16 | -------------------------------------------------------------------------------- /arc-enabled-logic-app-sample/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "ms-vscode-remote.remote-containers" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /arc-enabled-logic-app-sample/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": "Attach to .NET Functions", 6 | "type": "coreclr", 7 | "request": "attach", 8 | "processId": "${command:azureLogicAppsStandard.pickProcess}" 9 | } 10 | ] 11 | } -------------------------------------------------------------------------------- /arc-enabled-logic-app-sample/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "azureLogicAppsStandard.deploySubpath": "src", 3 | "azureLogicAppsStandard.projectLanguage": "JavaScript", 4 | "azureLogicAppsStandard.projectRuntime": "~3", 5 | "debug.internalConsoleOptions": "neverOpen" 6 | } 7 | -------------------------------------------------------------------------------- /arc-enabled-logic-app-sample/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "label": "generateDebugSymbols", 6 | "command": "dotnet", 7 | "args": [ 8 | "${input:getDebugSymbolDll}" 9 | ], 10 | "type": "process", 11 | "options": { 12 | "cwd": "${workspaceFolder}/src" 13 | }, 14 | "problemMatcher": "$msCompile" 15 | }, 16 | { 17 | "type": "func", 18 | "command": "host start", 19 | "problemMatcher": "$func-watch", 20 | "isBackground": true, 21 | "options": { 22 | "cwd": "${workspaceFolder}/src" 23 | } 24 | } 25 | ], 26 | "inputs": [ 27 | { 28 | "id": "getDebugSymbolDll", 29 | "type": "command", 30 | "command": "azureLogicAppsStandard.getDebugSymbolDll" 31 | } 32 | ] 33 | } -------------------------------------------------------------------------------- /arc-enabled-logic-app-sample/README.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | This sample shows an Azure Logic App running on an Arc-enabled Kubernetes cluster. The Logic App periodically checks Azure Table Storage for new ratings items. Any new ratings are appended to a JSON file in Azure Blob Storage that contain all the ratings for that product. 4 | 5 | ![Architecture Diagram](./docs/SolutionDiagramLogicAppsSample.png) 6 | 7 | ## Deploy to Azure 8 | 9 | 1. Open the `arc-enabled-logic-app-sample` folder in VS Code. 10 | 1. Re-open the window in a dev container. You'll need Docker and the [Remote Development Extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack) installed. This container has all the tools and cli extensions you'll need preinstalled. If you can't open the dev container, check ./devcontainer/Dockerfile for the prerequisites. 11 | 12 | 1. Log into your Azure subscription using `az login`. 13 | 1. Change directory to `arc-enabled-logic-app-sample/env`. 14 | 1. To enable the necessary resource providers in your subscription run 15 | 16 | ```bash 17 | ./deployFeatureRegister.sh 18 | ``` 19 | 20 | 1. Open `environment-variables.sh` and provide a value for the basename variable. This will be used to generate names for other resources. 21 | 1. Run `source environment-variables.sh` in your terminal to load the values. The script will test if the name of the storage account is valid, and output "Storage name is not valid" if not. The result is in the `STORAGE_NAME_VALID` variable. Pick a different, unique name for resource group if this value is `false`, and try again, unless you plan to re-use the existing storage account. 22 | 1. Create a compliant AKS cluster with a public static IP address, Arc connection, and App Service Arc extensions. 23 | 24 | ```bash 25 | source ./provisionKubernetesHostInfra.sh 26 | ``` 27 | 28 | 1. Provision the App service components, and deploy the logic app. 29 | 30 | ```bash 31 | source ./deploy.sh 32 | ``` 33 | 34 | The script will output the portal url of the Logic App and the Storage Account. The deployment script will also populate the *ratings* table with an initial value. You can view the resulting logic app runs and resulting data in the *ratings* table and blob containers using these urls. 35 | 36 | ## Testing in Azure 37 | 38 | Once the app is deployed to Azure, you can upload data to *ratings* table in Azure Table Storage, and view the results in Azure Blob Storage. 39 | 40 | 1. Use the [Azure Storage Explorer](https://azure.microsoft.com/features/storage-explorer/) to connect to the storage account output by the deploy script. 41 | > Check the `deploy.sh1` file for an example on using the azure cli to interact with table storage if you can't use Azure Storage Explorer. 42 | 1. Open the ratings table. 43 | 1. Click the `Import` button 44 | 1. Import the `ratings.csv` file in the `data` folder of the workspace. 45 | 1. Open the Logic app in the portal using the URL ouptut by the deployment script. 46 | 1. Open the `RatingsWorfklow` workflow. 47 | 1. Wait until a new run is completed. 48 | 1. Open the run and view the results. 49 | 1. Refresh the ratings table in the Azure Storage Explorer. The ratings' `publishDate` field should now be set to the time the workflow ran. 50 | 1. Open the `ratings` blob container in the same storage account. 51 | 1. Open the blob called 3. This blob will contain the ratings from the ratings table. 52 | 53 | Try adding more data with different product ID's in the ratings table, or change the publish date of an existing item to `00/00/0000`, to add it to the blobs. 54 | -------------------------------------------------------------------------------- /arc-enabled-logic-app-sample/data/ratings.csv: -------------------------------------------------------------------------------- 1 | PartitionKey,RowKey,createDate,createDate@type,productId,productId@type,publishDate,publishDate@type,rating,rating@type,ratingId,ratingId@type,userName,userName@type,userNotes,userNotes@type 2 | 3,1,6/28/2021 ,Edm.String,3,Edm.Int32,00/00/0000,Edm.String,5,Edm.Int32,1,Edm.Int32,John Doe,Edm.String,Good quality,Edm.String 3 | 3,2,6/29/2021,Edm.String,3,Edm.Int32,00/00/0000,Edm.String,4,Edm.Int32,2,Edm.Int32,Joanna Doe,Edm.String,Nice,Edm.String 4 | 3,3,6/29/2021,Edm.String,3,Edm.Int32,00/00/0000,Edm.String,5,Edm.Int32,4,Edm.Int32,John Doe Jr.,Edm.String,Good stuff,Edm.String 5 | -------------------------------------------------------------------------------- /arc-enabled-logic-app-sample/docs/SolutionDiagramLogicAppsSample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/logicapps/a3f00d170e23329c78a4e55bee11d93bab30d16a/arc-enabled-logic-app-sample/docs/SolutionDiagramLogicAppsSample.png -------------------------------------------------------------------------------- /arc-enabled-logic-app-sample/env/aks.bicep: -------------------------------------------------------------------------------- 1 | param clusterName string 2 | 3 | resource aks 'Microsoft.ContainerService/managedClusters@2021-03-01' = { 4 | name: clusterName 5 | location: resourceGroup().location 6 | properties: { 7 | 'dnsPrefix': 'dnsprefix' 8 | 'agentPoolProfiles': [ 9 | { 10 | 'count': 3 11 | 'vmSize': 'Standard_DS2_v2' 12 | 'osType': 'Linux' 13 | 'name': 'nodepool1' 14 | 'mode' : 'System' 15 | } 16 | ] 17 | 'networkProfile': { 18 | 'outboundType': 'loadBalancer' 19 | 'loadBalancerSku': 'standard' 20 | } 21 | 'aadProfile': { 22 | 'managed': true 23 | } 24 | 'servicePrincipalProfile': { 25 | 'clientId': 'msi' 26 | } 27 | } 28 | 'identity': { 29 | 'type': 'SystemAssigned' 30 | } 31 | } 32 | 33 | output nodeResourceGroup string = aks.properties.nodeResourceGroup 34 | 35 | -------------------------------------------------------------------------------- /arc-enabled-logic-app-sample/env/deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -ux 3 | 4 | echo 'Create Service Principal...' 5 | 6 | # create service principal 7 | export SP_INFO=$(az ad sp create-for-rbac --skip-assignment -n $SP_NAME) 8 | export CLIENT_ID=$(echo $SP_INFO | jq .appId -r) 9 | export OBJECT_ID=$(az ad app show --id $CLIENT_ID --query 'id' -o tsv) 10 | export CLIENT_SECRET=$(echo $SP_INFO | jq .password -r) 11 | export TENANT_ID=$(echo $SP_INFO | jq .tenant -r) 12 | 13 | echo 'Deploying resources logic app hosting resources...' 14 | 15 | # az bicep build --file main.bicep 16 | # # add the 'kind=v2' to our tablestorage connector; only way to do this right now 17 | # sed -i 's/"name": "tablestorage",/"name": "tablestorage","kind":"V2",/g' main.json 18 | 19 | az deployment group create \ 20 | --name $DEPLOYMENT_NAME-logicapp \ 21 | --resource-group $RESOURCE_GROUP \ 22 | --template-file main.bicep \ 23 | --parameters appName=$APP_NAME \ 24 | storageAccountName=$STORAGE_ACCOUNT \ 25 | spClientSecret=$CLIENT_SECRET \ 26 | spTenantId=$TENANT_ID \ 27 | spObjectId=$OBJECT_ID \ 28 | spClientId=$CLIENT_ID \ 29 | customLocationId=$CUSTOM_LOCATION_ID \ 30 | appServicePlanName=$APP_SERVICE_PLAN \ 31 | kubeEnvironmentName=$KUBE_ENVIRONMENT_NAME \ 32 | appServiceIP=$STATIC_IP 33 | 34 | echo 'Deploying Logic App code...' 35 | pushd ../src 36 | func azure functionapp publish $APP_NAME --node 37 | popd 38 | 39 | az storage entity insert --account-name $STORAGE_ACCOUNT --if-exists replace -t ratings -e \ 40 | PartitionKey=3 \ 41 | RowKey=5 \ 42 | createDate=6/28/2021 \ 43 | productId=3 \ 44 | productId@odata.type=Edm.Int32 \ 45 | publishDate=00/00/0000 \ 46 | publishDate@odata.type=Edm.String \ 47 | rating=1 \ 48 | rating@odata.type=Edm.Int32 \ 49 | ratingId=5 \ 50 | ratingId@odata.type=Edm.Int32 \ 51 | userName="Frank Jones" \ 52 | userNotes="Did not enjoy this!" 53 | 54 | echo "Logic App deployed to: https://ms.portal.azure.com/#resource/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.Web/sites/$APP_NAME/appServices" 55 | echo "Storage account available at: https://ms.portal.azure.com/#resource/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.Storage/storageAccounts/$STORAGE_ACCOUNT/storageexplorer" 56 | echo 'Done!' 57 | 58 | set +ux -------------------------------------------------------------------------------- /arc-enabled-logic-app-sample/env/deployFeatureRegister.sh: -------------------------------------------------------------------------------- 1 | az provider register --namespace Microsoft.ExtendedLocation --wait 2 | az provider register --namespace Microsoft.Web --wait 3 | az provider register --namespace Microsoft.KubernetesConfiguration --wait -------------------------------------------------------------------------------- /arc-enabled-logic-app-sample/env/environment-variables.sh: -------------------------------------------------------------------------------- 1 | export BASENAME="{basename}" 2 | export LOCATION="eastus" 3 | export RESOURCE_GROUP=$BASENAME 4 | export APP_NAME=$BASENAME 5 | export DEPLOYMENT_NAME="${BASENAME}-Deployment" 6 | export STORAGE_ACCOUNT=$(echo $BASENAME | tr -dc '[:alnum:]\n\r' | tr '[:upper:]' '[:lower:]') 7 | export STORAGE_NAME_VALID=$(az storage account check-name -n ${STORAGE_ACCOUNT} --query "nameAvailable" -o tsv) 8 | [[ $STORAGE_NAME_VALID == false ]] && echo "Storage name is not valid">&2 9 | export SP_NAME="${BASENAME}-sp" 10 | export SUBSCRIPTION_ID=$(az account show --query id -o tsv) 11 | export AKS_NAME="${BASENAME}-aks" 12 | export STATIC_IP_NAME="${BASENAME}-ip" 13 | export EXTENSION_NAME="${BASENAME}-appsvc-ext" 14 | export APP_SERVICE_NAMESPACE="appservice-ns" 15 | export KUBE_ENV_NAME="${BASENAME}-kube" 16 | export CUSTOM_LOCATION_NAME="${BASENAME}-location" 17 | export APP_SERVICE_PLAN="${BASENAME}-appservice-plan" 18 | export KUBE_ENVIRONMENT_NAME="${BASENAME}-kube-appservice" 19 | 20 | -------------------------------------------------------------------------------- /arc-enabled-logic-app-sample/env/ipAddress.bicep: -------------------------------------------------------------------------------- 1 | param staticIpName string 2 | 3 | resource ip 'Microsoft.Network/publicIPAddresses@2020-11-01' = { 4 | name: staticIpName 5 | location: resourceGroup().location 6 | 'sku': { 7 | 'name': 'Standard' 8 | } 9 | 'properties': { 10 | 'publicIPAllocationMethod': 'Static' 11 | } 12 | } 13 | 14 | output staticIp string = ip.properties.ipAddress 15 | -------------------------------------------------------------------------------- /arc-enabled-logic-app-sample/env/provisionKubernetesHostInfra.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -ux 3 | 4 | # create a compliant AKS cluster and a public static IP address 5 | 6 | # create a resource group 7 | az group create -n $RESOURCE_GROUP -l $LOCATION 8 | 9 | # create AKS cluster 10 | az deployment group create --name "${DEPLOYMENT_NAME}-aks" -g $RESOURCE_GROUP --template-file aks.bicep --parameters clusterName=$AKS_NAME 11 | 12 | NODE_RG=$(az deployment group show -g $RESOURCE_GROUP -n "${DEPLOYMENT_NAME}-aks" -o tsv --query properties.outputs.nodeResourceGroup.value) 13 | 14 | #create static IP 15 | az deployment group create -g $NODE_RG --name "${DEPLOYMENT_NAME}-IP" --template-file ipAddress.bicep --parameters staticIpName=$STATIC_IP_NAME 16 | 17 | export STATIC_IP=$(az deployment group show -g $NODE_RG -n "${DEPLOYMENT_NAME}-IP" -o tsv --query properties.outputs.staticIp.value) 18 | 19 | # get AKS credentials 20 | az aks get-credentials -g $RESOURCE_GROUP -n $AKS_NAME --admin 21 | 22 | # onboard the cluster to Arc 23 | az connectedk8s connect -g $RESOURCE_GROUP -n $AKS_NAME 24 | 25 | # get the Connected Cluster Id 26 | export CONNECTED_CLUSTER_ID=$(az connectedk8s show -n $AKS_NAME -g $RESOURCE_GROUP --query id -o tsv) 27 | 28 | # install the App Service extension on the Arc cluster 29 | az k8s-extension create \ 30 | -g $RESOURCE_GROUP \ 31 | --name $EXTENSION_NAME \ 32 | --cluster-type connectedClusters \ 33 | -c $AKS_NAME \ 34 | --extension-type 'Microsoft.Web.Appservice' \ 35 | --release-train stable \ 36 | --auto-upgrade-minor-version true \ 37 | --scope cluster \ 38 | --release-namespace $APP_SERVICE_NAMESPACE \ 39 | --configuration-settings "Microsoft.CustomLocation.ServiceAccount=default" \ 40 | --configuration-settings "appsNamespace=${APP_SERVICE_NAMESPACE}" \ 41 | --configuration-settings "clusterName=${KUBE_ENV_NAME}" \ 42 | --configuration-settings "loadBalancerIp=${STATIC_IP}" \ 43 | --configuration-settings "buildService.storageClassName=default" \ 44 | --configuration-settings "buildService.storageAccessMode=ReadWriteOnce" \ 45 | --configuration-settings "customConfigMap=${APP_SERVICE_NAMESPACE}/kube-environment-config" \ 46 | --configuration-settings "envoy.annotations.service.beta.kubernetes.io/azure-load-balancer-resource-group=${RESOURCE_GROUP}" \ 47 | --configuration-settings "keda.enabled=true" 48 | 49 | # extract an ID of the installed App Service extension 50 | EXTENSION_ID=$(az k8s-extension show --cluster-type connectedClusters -c $AKS_NAME -g $RESOURCE_GROUP --name $EXTENSION_NAME --query id -o tsv) 51 | # wait for the extension to fully install before proceeding. 52 | az resource wait --ids $EXTENSION_ID --custom "properties.installState!='Pending'" --api-version "2020-07-01-preview" 53 | 54 | # create a custom location in the region selected for the resource group that houses the resources 55 | az customlocation create -g $RESOURCE_GROUP -n $CUSTOM_LOCATION_NAME --host-resource-id $CONNECTED_CLUSTER_ID --namespace $APP_SERVICE_NAMESPACE -c $EXTENSION_ID 56 | 57 | # extract an ID of the created custom location 58 | export CUSTOM_LOCATION_ID=$(az customlocation show -g $RESOURCE_GROUP -n $CUSTOM_LOCATION_NAME --query id -o tsv) 59 | 60 | set +ux -------------------------------------------------------------------------------- /arc-enabled-logic-app-sample/src/.funcignore: -------------------------------------------------------------------------------- 1 | workflow-designtime/ -------------------------------------------------------------------------------- /arc-enabled-logic-app-sample/src/connections.json: -------------------------------------------------------------------------------- 1 | { 2 | "serviceProviderConnections": { 3 | "AzureBlob": { 4 | "parameterValues": { 5 | "connectionString": "@appsetting('AzureBlob_connectionString')" 6 | }, 7 | "serviceProvider": { 8 | "id": "/serviceProviders/AzureBlob" 9 | }, 10 | "displayName": "blobstorage" 11 | } 12 | }, 13 | "managedApiConnections": { 14 | "azuretables": { 15 | "api": { 16 | "id": "/subscriptions/@appsetting('azuretables_subscriptionId')/providers/Microsoft.Web/locations/eastus/managedApis/azuretables" 17 | }, 18 | "connection": { 19 | "id": "/subscriptions/@appsetting('azuretables_subscriptionId')/resourceGroups/@appsetting('azuretables_resourceGroup')/providers/Microsoft.Web/connections/azuretables" 20 | }, 21 | "connectionRuntimeUrl": "@appsetting('azuretables_runtimeUrl')", 22 | "authentication": { 23 | "type": "ActiveDirectoryOAuth", 24 | "audience": "https://management.core.windows.net/", 25 | "credentialType": "Secret", 26 | "clientId": "@appsetting('WORKFLOWAPP_AAD_CLIENTID')", 27 | "tenant": "@appsetting('WORKFLOWAPP_AAD_TENANTID')", 28 | "secret": "@appsetting('WORKFLOWAPP_AAD_CLIENTSECRET')" 29 | } 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /arc-enabled-logic-app-sample/src/host.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0", 3 | "extensionBundle": { 4 | "id": "Microsoft.Azure.Functions.ExtensionBundle.Workflows", 5 | "version": "[1.*, 2.0.0)" 6 | }, 7 | "logging": { 8 | "applicationInsights": { 9 | "samplingSettings": { 10 | "isEnabled": true, 11 | "excludedTypes": "Request" 12 | } 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /arc-enabled-logic-app-sample/src/workflow-designtime/host.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0", 3 | "extensionBundle": { 4 | "id": "Microsoft.Azure.Functions.ExtensionBundle.Workflows", 5 | "version": "[1.*, 2.0.0)" 6 | }, 7 | "extensions": { 8 | "workflow": { 9 | "settings": { 10 | "Runtime.WorkflowOperationDiscoveryHostMode": "true" 11 | } 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /articles/enterprise-integration-e2e-case-management-utilities-azure-logic-apps.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/logicapps/a3f00d170e23329c78a4e55bee11d93bab30d16a/articles/enterprise-integration-e2e-case-management-utilities-azure-logic-apps.pdf -------------------------------------------------------------------------------- /articles/ip_updates_061720.md: -------------------------------------------------------------------------------- 1 | # Update Firewall Configurations That Filter Azure Logic Apps IP Addresses 2 | 3 | ## Background 4 | On 6/17/2020, we emailed the subscription owners and administrators about upcoming IP address changes for Azure Logic Apps. 5 | 6 | The e-mail is titled **Action required: Update firewall configurations that filter Azure Logic Apps IP addresses**. 7 | 8 | You will also find the same notification by searching Service history on Azure Service Health in Azure portal. The tracking ID is **D_9M-1T8**. 9 | 10 | This article provides some more details on the changes. 11 | 12 | ## What's Changing 13 | 14 | 1. The updated IP lists have already been published here: https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-limits-and-config#firewall-configuration-ip-addresses-and-service-tags. The changes (aka added and removed IPs) will not take effect until 08/31/2020. 15 | 1. The updated IP lists have no change on inbound IP addresses. 16 | 1. The updated IP lists have no change on Logic Apps outbound IP addresses. 17 | 1. The updated IP lists have these changes on Managed Connectors outbound IP addresses. 18 | 19 | ### Added IPs for outbound managed connectors 20 | 21 | | Region | IP addresses | 22 | |----------|:-------------:| 23 | | Australia East | 13.70.78.224 - 13.70.78.255 | 24 | | Australia Southeast | 13.77.55.160 - 13.77.55.191 | 25 | | Brazil South | 191.233.207.160 - 191.233.207.191 | 26 | | Canada Central | 13.71.175.160 - 13.71.175.191, 13.71.170.224 - 13.71.170.239 | 27 | | Canada East | 40.69.111.0 - 40.69.111.31 | 28 | | Central India | 20.43.123.0 - 20.43.123.31 | 29 | | Central US | 40.77.68.110, 13.89.178.64 - 13.89.178.95 | 30 | | East Asia | 104.214.164.0 - 104.214.164.31 | 31 | | East US | 52.188.157.160, 40.71.15.160 - 40.71.15.191 | 32 | | East US 2 | 40.65.220.25, 40.70.151.96 - 40.70.151.127 | 33 | | France Central | 40.79.148.96 - 40.79.148.127 | 34 | | France South | 40.79.180.224 - 40.79.180.255 | 35 | | Japan East | 40.79.189.64 - 40.79.189.95 | 36 | | Japan West | 40.80.180.64 - 40.80.180.95 | 37 | | Korea Central | 20.44.29.64 - 20.44.29.95 | 38 | | Korea South | 52.231.148.224 - 52.231.148.255 | 39 | | North Central US | 52.162.111.192 - 52.162.111.223 | 40 | | North Europe | 40.115.108.29, 13.69.231.192 - 13.69.231.223 | 41 | | South Africa North | 40.127.2.94, 102.133.155.0 - 102.133.155.15, 102.133.253.0 - 102.133.253.31 | 42 | | South Africa West | 102.133.75.194, 102.133.27.0 - 102.133.27.15, 102.37.64.0 - 102.37.64.31 | 43 | | South Central US | 13.73.244.224 - 13.73.244.255 | 44 | | Southeast Asia | 13.67.15.32 - 13.67.15.63 | 45 | | UK South | 51.105.77.96 - 51.105.77.127 | 46 | | UK West | 51.140.212.224 - 51.140.212.255 | 47 | | US DoD Central | 52.127.61.192 - 52.127.61.223 | 48 | | US Gov Arizona | 52.127.5.224 - 52.127.5.255 | 49 | | US Gov Texas | 20.140.137.128 - 20.140.137.159 | 50 | | West Central US | 13.71.199.192 - 13.71.199.223 | 51 | | West Europe | 13.93.36.78, 13.69.71.192 - 13.69.71.223 | 52 | | West India | 20.38.128.224 - 20.38.128.255 | 53 | | West US | 13.86.223.32 - 13.86.223.63 | 54 | | West US 2 | 13.66.164.219, 13.66.145.96 - 13.66.145.127 | 55 | 56 | ### Removed IPs from outbound managed connectors 57 | 58 | | Region | IP addresses | 59 | |---------|------------------------| 60 | | South Africa North | 13.65.86.57, 104.214.70.191 | 61 | | South Africa West | 13.65.86.57, 104.214.70.191 | 62 | 63 | ## Action Required 64 | We suggest inventorying what connectors and connections you are using on what regions, then determine whether any of them are filtered by firewall configuration. 65 | 66 | For any connection going through a firewall, please ask your firewall/network administrator or your business partner to update the filtering list before 08/31/2020. 67 | 68 | If you are using Integration Service Enviornment, you will need to go through the same process because Logic Apps in ISE could be using the multi-tenant connectors. 69 | -------------------------------------------------------------------------------- /articles/logic-apps-public-preview-known-issues.md: -------------------------------------------------------------------------------- 1 | # Logic Apps Public Preview Known Issues 2 | 3 | This article documents the region availability and known issues for the new containerized and rehostable Logic Apps runtime, Visual Studio Code extension, and the improved designer. 4 | 5 | ## Available regions 6 | 7 | Logic Apps Public Preview is available in all Azure regions. 8 | 9 | ## Issues 10 | 11 | * **OS support**: Currently, the designer in Visual Studio Code doesn't work on Linux OS, but you can still deploy logic apps that use the Logic Apps Preview runtime to Linux-based virtual machines. For now, you can build your logic apps in Visual Studio Code on Windows or macOS and then deploy to a Linux-based virtual machine. 12 | 13 | * **Triggers and actions**: On-premises data gateway triggers, custom connectors, some built-in triggers, such as Sliding Window, and some built-in actions such as Flat File, are currently unavailable. For more information, see [Overview for Azure Logic Apps Preview](https://docs.microsoft.com/azure/logic-apps/logic-apps-overview-preview#limited-unavailable-unsupported). 14 | 15 | * The built-in action, **Azure Functions - Choose an Azure function** (renamed as **Azure Function Operations - Call an Azure Function**), currently works only for functions that are created from the HTTP Trigger template. For more information, see [Overview for Azure Logic Apps Preview](https://docs.microsoft.com/azure/logic-apps/logic-apps-overview-preview#limited-unavailable-unsupported). 16 | 17 | * Data persistence in the details pane for triggers and actions 18 | 19 | When you work with the Logic App Designer in Visual Studio Code, and you make changes to a trigger or action in the details pane on the **Settings**, **Run After**, or **Static Result** tab, make sure that you select **Done** and commit your changes before you switch tabs or change focus to the designer. Otherwise, your changes won't persist. 20 | 21 | * Newly added workflows don't immediately appear in Visual Studio Code or the Azure portal. 22 | 23 | In rare cases, changes that you make to your logic app, such as adding a new workflow, either in your local project in Visual Studio Code or in your deployed **Logic App (Preview) resource** in the Azure portal, might not immediately appear because your logic app needs to restart. If those changes don't appear after some time, try refreshing the project pane by pressing Shift + F5 or by clearing your browser's cache by pressing Ctrl + Shift + Delete. 24 | 25 | * **Breakpoint debugging in Visual Studio Code**: Although you can add and use breakpoints inside the workflow.json file for a workflow, breakpoints are currently supported only for actions, not triggers. For more information, see [Create stateful and stateless workflows in Visual Studio Code](https://docs.microsoft.com/azure/logic-apps/create-stateful-stateless-workflows-visual-studio-code). 26 | 27 | * **Zoom control**: This control is currently unavailable on the designer. 28 | 29 | * Delays in disabling your workflow in the Azure portal 30 | 31 | If you select **Disable** on a logic app's **Workflows** pane or on a workflow on their **Overview** pane, you might experience a delay, usually around 30 seconds, before the **Status** changes from **Enabled** to **Disabled**. This delay happens because the function host, which powers the workflow, has to restart. However, the **Status** column shows the correct state after the function host finishes restarting. 32 | 33 | ## Issues not listed here? 34 | 35 | Open them [in this GitHub repo's issues section](https://github.com/Azure/logicapps/issues). 36 | 37 | ## Provide feedback 38 | 39 | You can submit feedback and comments using [this form](https://aka.ms/lafeedback). 40 | -------------------------------------------------------------------------------- /articles/microsoft-integration-with-azure-logic-apps.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/logicapps/a3f00d170e23329c78a4e55bee11d93bab30d16a/articles/microsoft-integration-with-azure-logic-apps.pdf -------------------------------------------------------------------------------- /articles/worker-packages-dependencies-custom-code.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/logicapps/a3f00d170e23329c78a4e55bee11d93bab30d16a/articles/worker-packages-dependencies-custom-code.pdf -------------------------------------------------------------------------------- /azure-devops-sample/.dockerignore: -------------------------------------------------------------------------------- 1 | .debug 2 | .git* 3 | .vscode 4 | .pipelines 5 | deploy 6 | test 7 | logic/workflow-designtime 8 | local.settings.json -------------------------------------------------------------------------------- /azure-devops-sample/.funcignore: -------------------------------------------------------------------------------- 1 | .debug 2 | .git* 3 | .vscode 4 | local.settings.json 5 | test 6 | logic/workflow-designtime -------------------------------------------------------------------------------- /azure-devops-sample/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Azure Functions artifacts 3 | bin 4 | obj 5 | appsettings.json 6 | local.settings.json -------------------------------------------------------------------------------- /azure-devops-sample/.pipelines/classic/cd-pipeline.yml: -------------------------------------------------------------------------------- 1 | trigger: none 2 | 3 | pr: none 4 | 5 | variables: 6 | - name: devEnvironment 7 | value: dev 8 | 9 | resources: 10 | pipelines: 11 | - pipeline: cipipeline 12 | # TODO: Update with the name of your CI pipeline 13 | source: '' 14 | trigger: 15 | branches: 16 | - main 17 | 18 | stages: 19 | - stage: DEV 20 | displayName: 'DEV Deployment' 21 | variables: 22 | - template: variables/pipeline-vars.yml 23 | jobs: 24 | - deployment: deploy_logicapp_resources 25 | displayName: Deploy Logic App 26 | pool: 27 | vmImage: ubuntu-18.04 28 | environment: $(devEnvironment) 29 | variables: 30 | deploymentMode: 'Incremental' 31 | strategy: 32 | runOnce: 33 | deploy: 34 | steps: 35 | - task: AzureFunctionApp@1 36 | displayName: 'Deploy logic app workflows' 37 | inputs: 38 | # TODO: Fill in with the name of your Azure service connection 39 | azureSubscription: '' 40 | appType: 'functionApp' 41 | appName: '$(logicAppName)' 42 | package: '$(Pipeline.Workspace)/cipipeline/$(logicAppCIArtifactName)/$(resources.pipeline.cipipeline.runID).zip' 43 | deploymentMethod: 'zipDeploy' 44 | -------------------------------------------------------------------------------- /azure-devops-sample/.pipelines/classic/ci-pipeline.yml: -------------------------------------------------------------------------------- 1 | trigger: 2 | - main 3 | 4 | pr: none 5 | 6 | pool: 7 | vmImage: 'ubuntu-18.04' 8 | 9 | variables: 10 | - template: variables/pipeline-vars.yml 11 | 12 | jobs: 13 | - job: logic_app_build 14 | displayName: 'Build and publish logic app' 15 | steps: 16 | - task: CopyFiles@2 17 | displayName: 'Create project folder' 18 | inputs: 19 | SourceFolder: '$(System.DefaultWorkingDirectory)' 20 | Contents: | 21 | logic/** 22 | TargetFolder: 'project_output' 23 | 24 | - task: ArchiveFiles@2 25 | displayName: 'Create project zip' 26 | inputs: 27 | rootFolderOrFile: '$(System.DefaultWorkingDirectory)/project_output/logic' 28 | includeRootFolder: false 29 | archiveType: 'zip' 30 | archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip' 31 | replaceExistingArchive: true 32 | 33 | - task: PublishPipelineArtifact@1 34 | displayName: 'Publish project zip artifact' 35 | inputs: 36 | targetPath: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip' 37 | artifact: '$(logicAppCIArtifactName)' 38 | publishLocation: 'pipeline' 39 | -------------------------------------------------------------------------------- /azure-devops-sample/.pipelines/classic/iac-pipeline.yml: -------------------------------------------------------------------------------- 1 | trigger: none 2 | 3 | pr: none 4 | 5 | variables: 6 | - name: artifactName 7 | value: deploy_artifacts 8 | - name: devEnvironment 9 | value: dev 10 | 11 | stages: 12 | - stage: Builds 13 | displayName: 'Publish IaC Artifacts' 14 | jobs: 15 | - job: Build 16 | pool: 17 | vmImage: ubuntu-18.04 18 | steps: 19 | - task: CopyFiles@2 20 | displayName: 'Copy ARM templates' 21 | inputs: 22 | sourceFolder: 'deploy' 23 | targetFolder: '$(Build.ArtifactStagingDirectory)' 24 | - publish: '$(Build.ArtifactStagingDirectory)' 25 | artifact: $(artifactName) 26 | 27 | - stage: DEV 28 | displayName: 'DEV Deployment' 29 | variables: 30 | - template: variables/pipeline-vars.yml 31 | jobs: 32 | - template: templates/template-iac-logicapp.yml 33 | parameters: 34 | environment: $(devEnvironment) 35 | # TODO: Fill in with the name of your Azure service connection 36 | serviceConnection: '' 37 | -------------------------------------------------------------------------------- /azure-devops-sample/.pipelines/classic/templates/template-iac-logicapp.yml: -------------------------------------------------------------------------------- 1 | # IaC Logic App resources deployment template 2 | 3 | parameters: 4 | - name: environment 5 | type: string 6 | - name: serviceConnection 7 | type: string 8 | 9 | jobs: 10 | - deployment: deploy_logicapp_resources 11 | displayName: Deploy Logic App Resources 12 | pool: 13 | vmImage: ubuntu-18.04 14 | environment: ${{ parameters.environment }} 15 | variables: 16 | deploymentMode: 'Incremental' 17 | strategy: 18 | runOnce: 19 | deploy: 20 | steps: 21 | - download: current 22 | artifact: $(artifactName) 23 | 24 | - task: AzureResourceGroupDeployment@2 25 | displayName: 'Deploy Logic App' 26 | inputs: 27 | azureSubscription: ${{ parameters.serviceConnection }} 28 | resourceGroupName: $(resourceGroupName) 29 | location: $(resourceGroupLocation) 30 | csmFile: '$(Pipeline.Workspace)/$(artifactName)/classic/logicapp-template.json' 31 | overrideParameters: ' 32 | -location $(resourceGroupLocation) 33 | -environmentName ${{ parameters.environment }} 34 | -projectName $(projectName) 35 | -logicAppName $(logicAppName) 36 | -appServicePlanName $(appServicePlanName) 37 | -storageName $(storageName)' 38 | deploymentMode: $(deploymentMode) 39 | deploymentOutputs: 'LogicAppArmOutputs' 40 | 41 | - task: ARM Outputs@6 42 | displayName: 'ARM Outputs' 43 | inputs: 44 | ConnectedServiceNameSelector: 'ConnectedServiceNameARM' 45 | ConnectedServiceNameARM: ${{ parameters.serviceConnection }} 46 | resourceGroupName: $(resourceGroupName) 47 | whenLastDeploymentIsFailed: 'fail' 48 | 49 | - task: AzureResourceGroupDeployment@2 50 | displayName: 'Deploy Connectors' 51 | inputs: 52 | azureSubscription: ${{ parameters.serviceConnection }} 53 | resourceGroupName: $(resourceGroupName) 54 | location: $(resourceGroupLocation) 55 | csmFile: '$(Pipeline.Workspace)/$(artifactName)/connectors-template.json' 56 | overrideParameters: ' 57 | -location $(resourceGroupLocation) 58 | -connections_azureblob_name $(blobConnectionName) 59 | -logicAppSystemAssignedIdentityTenantId $(logicAppSystemAssignedIdentityTenantId) 60 | -logicAppSystemAssignedIdentityObjectId $(logicAppSystemAssignedIdentityObjectId)' 61 | deploymentMode: $(deploymentMode) 62 | 63 | - task: ARM Outputs@6 64 | displayName: 'ARM Outputs Connections' 65 | inputs: 66 | ConnectedServiceNameSelector: 'ConnectedServiceNameARM' 67 | ConnectedServiceNameARM: ${{ parameters.serviceConnection }} 68 | resourceGroupName: $(resourceGroupName) 69 | whenLastDeploymentIsFailed: 'fail' 70 | 71 | - task: AzureCLI@2 72 | inputs: 73 | # TODO: Fill in with the name of your Azure service connection 74 | azureSubscription: '' 75 | scriptType: 'bash' 76 | scriptLocation: 'inlineScript' 77 | inlineScript: | 78 | az functionapp config appsettings set --name $(LAname) --resource-group $(resourceGroupName) --settings "BLOB_CONNECTION_RUNTIMEURL=$(blobendpointurl)" 79 | az functionapp config appsettings set --name $(LAname) --resource-group $(resourceGroupName) --settings "WORKFLOWS_RESOURCE_GROUP_NAME=$(resourceGroupName)" 80 | addSpnToEnvironment: true 81 | useGlobalConfig: true -------------------------------------------------------------------------------- /azure-devops-sample/.pipelines/classic/variables/pipeline-vars.yml: -------------------------------------------------------------------------------- 1 | # IaC variables 2 | 3 | variables: 4 | 5 | projectName: 'logicappsample' 6 | suffix: 'dev' 7 | 8 | # Resource Group 9 | resourceGroupLocation: 'westus' 10 | resourceGroupName: 'rg-wus-$(projectName)-$(suffix)' 11 | 12 | # Storage - make sure this is unique and that the projectName you choose above is short enough, due to storage account name length restriction: https://learn.microsoft.com/en-us/azure/storage/common/storage-account-overview#storage-account-name 13 | storageName: 'sa$(projectName)$(suffix)' 14 | appServicePlanName: 'asp$(projectName)$(suffix)' 15 | 16 | # Logic App 17 | logicAppName: 'la-wus-$(projectName)-$(suffix)' 18 | 19 | # API Connections - if you change this name, you must change the reference in workflow.json 20 | blobConnectionName: 'azureblob' 21 | 22 | # Project artifacts 23 | logicAppCIArtifactName: 'logicapp_publish_artifact' 24 | -------------------------------------------------------------------------------- /azure-devops-sample/.pipelines/container/cd-pipeline.yml: -------------------------------------------------------------------------------- 1 | trigger: none 2 | 3 | pr: none 4 | 5 | variables: 6 | - name: devEnvironment 7 | value: dev 8 | # TODO: provide an email address for the ExampleWorkflow to an send mail to 9 | - name: toEmailAddress 10 | value: '' 11 | 12 | resources: 13 | pipelines: 14 | - pipeline: cipipeline 15 | # TODO: Update with the name of your CI pipeline 16 | source: '' 17 | trigger: 18 | branches: 19 | - main 20 | 21 | stages: 22 | - stage: DEV 23 | displayName: 'DEV Deployment' 24 | variables: 25 | - template: variables/pipeline-vars.yml 26 | jobs: 27 | - deployment: deploy_logicapp_resources 28 | displayName: Deploy Logic App 29 | pool: 30 | vmImage: ubuntu-18.04 31 | environment: $(devEnvironment) 32 | variables: 33 | deploymentMode: 'Incremental' 34 | strategy: 35 | runOnce: 36 | deploy: 37 | steps: 38 | - task: AzureFunctionAppContainer@1 39 | displayName: 'Update logic app container' 40 | inputs: 41 | azureSubscription: $(devServiceConnection) 42 | appName: '$(logicAppName)' 43 | imageName: '$(acrName).azurecr.io/$(logicAppContainerName):$(resources.pipeline.cipipeline.RunId)' 44 | appsettings: '-emailAddress $(toEmailAddress)' 45 | -------------------------------------------------------------------------------- /azure-devops-sample/.pipelines/container/ci-pipeline.yml: -------------------------------------------------------------------------------- 1 | trigger: 2 | - main 3 | 4 | pr: none 5 | 6 | pool: 7 | vmImage: 'ubuntu-18.04' 8 | 9 | variables: 10 | - template: variables/pipeline-vars.yml 11 | 12 | jobs: 13 | - job: logic_app_build 14 | displayName: 'Build and publish logic app' 15 | steps: 16 | - task: AzurePowerShell@4 17 | displayName: 'Generate connections.json file' 18 | inputs: 19 | azureSubscription: $(devServiceConnection) 20 | ScriptType: 'FilePath' 21 | ScriptPath: '$(System.DefaultWorkingDirectory)/.pipelines/scripts/Generate-Connections.ps1' 22 | FailOnStandardError: true 23 | azurePowerShellVersion: LatestVersion 24 | pwsh: true 25 | ScriptArguments: >- 26 | -resourceGroup $(resourceGroupName) 27 | 28 | - task: AzureCLI@2 29 | displayName: 'Build & Push Logic App Image' 30 | inputs: 31 | azureSubscription: $(devServiceConnection) 32 | scriptType: 'bash' 33 | scriptLocation: 'inlineScript' 34 | inlineScript: | 35 | az acr build \ 36 | -r $(acrName) \ 37 | -t $(logicAppContainerName):$(Build.BuildId) \ 38 | -t $(logicAppContainerName):latest \ 39 | . 40 | workingDirectory: $(System.DefaultWorkingDirectory) 41 | -------------------------------------------------------------------------------- /azure-devops-sample/.pipelines/container/iac-pipeline.yml: -------------------------------------------------------------------------------- 1 | trigger: none 2 | pr: none 3 | 4 | variables: 5 | - name: artifactName 6 | value: deploy_artifacts 7 | - name: devEnvironment 8 | value: dev 9 | 10 | stages: 11 | - stage: Builds 12 | displayName: 'Publish IaC Artifacts' 13 | jobs: 14 | - job: Build 15 | pool: 16 | vmImage: ubuntu-18.04 17 | steps: 18 | - task: CopyFiles@2 19 | displayName: 'Copy ARM templates' 20 | inputs: 21 | sourceFolder: 'deploy' 22 | targetFolder: '$(Build.ArtifactStagingDirectory)' 23 | - publish: '$(Build.ArtifactStagingDirectory)' 24 | artifact: $(artifactName) 25 | 26 | - stage: DEV 27 | displayName: 'DEV Deployment' 28 | variables: 29 | - template: variables/pipeline-vars.yml 30 | jobs: 31 | - template: templates/template-iac-logicapp.yml 32 | parameters: 33 | environment: $(devEnvironment) 34 | serviceConnection: $(devServiceConnection) 35 | -------------------------------------------------------------------------------- /azure-devops-sample/.pipelines/container/templates/template-iac-logicapp.yml: -------------------------------------------------------------------------------- 1 | # IaC Logic App resources deployment template 2 | 3 | parameters: 4 | - name: environment 5 | type: string 6 | - name: serviceConnection 7 | type: string 8 | 9 | jobs: 10 | - deployment: deploy_logicapp_resources 11 | displayName: Deploy Logic App Resources 12 | pool: 13 | vmImage: ubuntu-18.04 14 | environment: ${{ parameters.environment }} 15 | variables: 16 | deploymentMode: 'Incremental' 17 | strategy: 18 | runOnce: 19 | deploy: 20 | steps: 21 | - download: current 22 | artifact: $(artifactName) 23 | 24 | - task: AzureResourceGroupDeployment@2 25 | displayName: 'Deploy Container Registry' 26 | inputs: 27 | azureSubscription: ${{ parameters.serviceConnection }} 28 | resourceGroupName: $(resourceGroupName) 29 | location: $(resourceGroupLocation) 30 | csmFile: '$(Pipeline.Workspace)/$(artifactName)/container/acr-template.json' 31 | overrideParameters: '-containerRegistryName $(acrName) -location $(resourceGroupLocation) -skuName $(acrSkuName) 32 | -environmentName ${{ parameters.environment }} -projectName $(projectName)' 33 | deploymentMode: $(deploymentMode) 34 | 35 | - task: ARM Outputs@6 36 | displayName: 'ARM Outputs' 37 | inputs: 38 | ConnectedServiceNameSelector: 'ConnectedServiceNameARM' 39 | ConnectedServiceNameARM: ${{ parameters.serviceConnection }} 40 | resourceGroupName: $(resourceGroupName) 41 | whenLastDeploymentIsFailed: 'fail' 42 | 43 | - task: AzureResourceGroupDeployment@2 44 | displayName: 'Deploy Logic App' 45 | inputs: 46 | azureSubscription: ${{ parameters.serviceConnection }} 47 | resourceGroupName: $(resourceGroupName) 48 | location: $(resourceGroupLocation) 49 | csmFile: '$(Pipeline.Workspace)/$(artifactName)/container/logicapp-template.json' 50 | overrideParameters: ' 51 | -location $(resourceGroupLocation) 52 | -environmentName ${{ parameters.environment }} 53 | -projectName $(projectName) 54 | -logicAppName $(logicAppName) 55 | -appServicePlanName $(appServicePlanName) 56 | -storageName $(storageName) 57 | -acrName $(acrName) 58 | -acrUsername $(acrUsername) 59 | -acrPassword $(acrPassword)' 60 | deploymentMode: $(deploymentMode) 61 | deploymentOutputs: 'LogicAppArmOutputs' 62 | 63 | - task: ARM Outputs@6 64 | displayName: 'ARM Outputs' 65 | inputs: 66 | ConnectedServiceNameSelector: 'ConnectedServiceNameARM' 67 | ConnectedServiceNameARM: ${{ parameters.serviceConnection }} 68 | resourceGroupName: $(resourceGroupName) 69 | whenLastDeploymentIsFailed: 'fail' 70 | 71 | - task: AzureResourceGroupDeployment@2 72 | displayName: 'Deploy Connectors' 73 | inputs: 74 | azureSubscription: ${{ parameters.serviceConnection }} 75 | resourceGroupName: $(resourceGroupName) 76 | location: $(resourceGroupLocation) 77 | csmFile: '$(Pipeline.Workspace)/$(artifactName)/connectors-template.json' 78 | overrideParameters: ' 79 | -location $(resourceGroupLocation) 80 | -officeConnectionName $(officeConnectionName) 81 | -environmentName ${{ parameters.environment }} 82 | -projectName $(projectName) 83 | -logicAppSystemAssignedIdentityTenantId $(logicAppSystemAssignedIdentityTenantId) 84 | -logicAppSystemAssignedIdentityObjectId $(logicAppSystemAssignedIdentityObjectId)' 85 | deploymentMode: $(deploymentMode) 86 | 87 | - task: Bash@3 88 | displayName: 'USER ACTION: Authorize Office365 API Connection' 89 | inputs: 90 | targetType: 'inline' 91 | script: | 92 | echo 'Please manually authorize the Office 365 API Connection that was just created.' 93 | -------------------------------------------------------------------------------- /azure-devops-sample/.pipelines/container/variables/pipeline-vars.yml: -------------------------------------------------------------------------------- 1 | # IaC variables 2 | 3 | variables: 4 | 5 | projectName: 'logicappsample' 6 | suffix: 'devc' 7 | 8 | # TODO: Fill in with the name of your Azure service connection 9 | devServiceConnectionn: '' 10 | 11 | # Resource Group 12 | resourceGroupLocation: 'westus' 13 | resourceGroupName: 'rg-wus-$(projectName)-$(suffix)' 14 | 15 | # ACR 16 | acrName: 'acrwus$(projectName)$(suffix)' 17 | acrSkuName: 'Basic' 18 | 19 | # Storage - make sure this is unique and that the projectName you choose above is short enough, due to storage account name length restriction: https://learn.microsoft.com/en-us/azure/storage/common/storage-account-overview#storage-account-name 20 | storageName: 'sa$(projectName)$(suffix)' 21 | appServicePlanName: 'asp$(projectName)$(suffix)' 22 | 23 | # Logic App 24 | logicAppName: 'la-wus-$(projectName)-$(suffix)' 25 | logicAppContainerName: '$(projectName)' 26 | 27 | # API Connections 28 | officeConnectionName: 'la-wus-$(projectName)-connection-office365' 29 | 30 | # Project artifacts 31 | logicAppCIArtifactName: 'logicapp_publish_artifact' -------------------------------------------------------------------------------- /azure-devops-sample/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "ms-azuretools.vscode-azurefunctions" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /azure-devops-sample/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": "Attach to .NET Functions", 6 | "type": "coreclr", 7 | "request": "attach", 8 | "processId": "${command:azureLogicAppsStandard.pickProcess}" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /azure-devops-sample/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "azureLogicAppsStandard.deploySubpath": ".", 3 | "azureLogicAppsStandard.projectLanguage": "JavaScript", 4 | "azureLogicAppsStandard.projectRuntime": "~3", 5 | "debug.internalConsoleOptions": "neverOpen", 6 | "azureLogicAppsStandard.projectSubpath": "logic" 7 | } 8 | -------------------------------------------------------------------------------- /azure-devops-sample/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "label": "generateDebugSymbols", 6 | "command": "dotnet", 7 | "args": [ 8 | "${input:getDebugSymbolDll}" 9 | ], 10 | "type": "process", 11 | "problemMatcher": "$msCompile", 12 | "options": { 13 | "cwd": "${workspaceFolder}/logic" 14 | } 15 | }, 16 | { 17 | "type": "func", 18 | "command": "host start", 19 | "problemMatcher": "$func-watch", 20 | "isBackground": true, 21 | "dependsOn": "generateDebugSymbols", 22 | "options": { 23 | "cwd": "${workspaceFolder}/logic" 24 | } 25 | } 26 | ], 27 | "inputs": [ 28 | { 29 | "id": "getDebugSymbolDll", 30 | "type": "command", 31 | "command": "azureLogicAppsStandard.getDebugSymbolDll" 32 | } 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /azure-devops-sample/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/azure-functions/node:3.0 2 | 3 | ENV AzureWebJobsStorage 4 | ENV AzureWebJobsScriptRoot=/home/site/wwwroot \ 5 | AzureFunctionsJobHost__Logging__Console__IsEnabled=true \ 6 | FUNCTIONS_V2_COMPATIBILITY_MODE=true 7 | 8 | COPY . /home/site/wwwroot 9 | 10 | RUN cd /home/site/wwwroot -------------------------------------------------------------------------------- /azure-devops-sample/deploy/container/acr-template.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", 3 | "contentVersion": "1.0.0.0", 4 | "parameters": { 5 | "containerRegistryName": { 6 | "type": "string" 7 | }, 8 | "environmentName": { 9 | "type": "string" 10 | }, 11 | "location": { 12 | "type": "string" 13 | }, 14 | "projectName": { 15 | "type": "string" 16 | }, 17 | "skuName": { 18 | "type": "string", 19 | "defaultValue": "Basic" 20 | } 21 | }, 22 | "resources": [ 23 | { 24 | "type": "Microsoft.ContainerRegistry/registries", 25 | "sku": { 26 | "name": "[parameters('skuName')]" 27 | }, 28 | "name": "[parameters('containerRegistryName')]", 29 | "apiVersion": "2019-05-01", 30 | "location": "[parameters('location')]", 31 | "tags": { 32 | "Environment": "[parameters('environmentName')]", 33 | "Project": "[parameters('projectName')]" 34 | }, 35 | "properties": { 36 | "adminUserEnabled": true 37 | } 38 | } 39 | ], 40 | "outputs": { 41 | "acrUsername": { 42 | "type": "string", 43 | "value": "[listCredentials(resourceId('Microsoft.ContainerRegistry/registries', parameters('containerRegistryName')), '2017-10-01').username]" 44 | }, 45 | "acrPassword": { 46 | "type": "string", 47 | "value": "[listCredentials(resourceId('Microsoft.ContainerRegistry/registries', parameters('containerRegistryName')), '2017-10-01').passwords[0].value]" 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /azure-devops-sample/logic/.funcignore: -------------------------------------------------------------------------------- 1 | workflow-designtime/ -------------------------------------------------------------------------------- /azure-devops-sample/logic/EventProcessor/workflow.json: -------------------------------------------------------------------------------- 1 | { 2 | "definition": { 3 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", 4 | "actions": { 5 | "Response": { 6 | "type": "Response", 7 | "kind": "http", 8 | "inputs": { 9 | "statusCode": 200 10 | }, 11 | "runAfter": { 12 | "Create_blob_(V2)": [ 13 | "Succeeded" 14 | ] 15 | } 16 | }, 17 | "Create_blob_(V2)": { 18 | "type": "ApiConnection", 19 | "inputs": { 20 | "host": { 21 | "connection": { 22 | "referenceName": "azureblob" 23 | } 24 | }, 25 | "method": "post", 26 | "body": "@triggerBody()", 27 | "headers": { 28 | "ReadFileMetadataFromServer": true 29 | }, 30 | "path": "/v2/datasets/@{encodeURIComponent(parameters('storage_account_name'))}/files", 31 | "queries": { 32 | "folderPath": "/blobs", 33 | "name": "@{utcNow()}", 34 | "queryParametersSingleEncoded": true 35 | } 36 | }, 37 | "runAfter": {}, 38 | "runtimeConfiguration": { 39 | "contentTransfer": { 40 | "transferMode": "Chunked" 41 | } 42 | } 43 | } 44 | }, 45 | "triggers": { 46 | "manual": { 47 | "type": "Request", 48 | "kind": "Http", 49 | "inputs": {} 50 | } 51 | }, 52 | "contentVersion": "1.0.0.0", 53 | "outputs": {} 54 | }, 55 | "kind": "Stateful" 56 | } -------------------------------------------------------------------------------- /azure-devops-sample/logic/EventTrigger/workflow.json: -------------------------------------------------------------------------------- 1 | { 2 | "definition": { 3 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", 4 | "actions": { 5 | "Invoke_a_workflow_in_this_workflow_app": { 6 | "inputs": { 7 | "body": "demo content", 8 | "host": { 9 | "workflow": { 10 | "id": "eventprocessor" 11 | } 12 | } 13 | }, 14 | "runAfter": {}, 15 | "type": "Workflow" 16 | } 17 | }, 18 | "contentVersion": "1.0.0.0", 19 | "outputs": {}, 20 | "triggers": { 21 | "Recurrence": { 22 | "recurrence": { 23 | "frequency": "Day", 24 | "interval": 1 25 | }, 26 | "type": "Recurrence" 27 | } 28 | } 29 | }, 30 | "kind": "Stateful" 31 | } -------------------------------------------------------------------------------- /azure-devops-sample/logic/azure.parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "blob_auth": { 3 | "type":"object", 4 | "value": { 5 | "type": "ManagedServiceIdentity" 6 | } 7 | }, 8 | "storage_account_name": { 9 | "type": "String", 10 | "value": "@appsetting('storage-account-name')" 11 | } 12 | } -------------------------------------------------------------------------------- /azure-devops-sample/logic/connections.json: -------------------------------------------------------------------------------- 1 | { 2 | "managedApiConnections": { 3 | "azureblob": { 4 | "api": { 5 | "id": "/subscriptions/@appsetting('WORKFLOWS_SUBSCRIPTION_ID')/providers/Microsoft.Web/locations/@appsetting('WORKFLOWS_LOCATION_NAME')/managedApis/azureblob" 6 | }, 7 | "connection": { 8 | "id": "/subscriptions/@appsetting('WORKFLOWS_SUBSCRIPTION_ID')/resourceGroups/@appsetting('WORKFLOWS_RESOURCE_GROUP_NAME')/providers/Microsoft.Web/connections/azureblob" 9 | }, 10 | "connectionRuntimeUrl": "@appsetting('BLOB_CONNECTION_RUNTIMEURL')", 11 | "authentication": "@parameters('blob_auth')" 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /azure-devops-sample/logic/host.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0", 3 | "extensionBundle": { 4 | "id": "Microsoft.Azure.Functions.ExtensionBundle.Workflows", 5 | "version": "[1.*, 2.0.0)" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /azure-devops-sample/logic/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "blob_auth": { 3 | "type":"object", 4 | "value": { 5 | "type": "Raw", 6 | "scheme": "Key", 7 | "parameter": "@appsetting('azureblob-connectionKey')" 8 | } 9 | }, 10 | "storage_account_name": { 11 | "type": "String", 12 | "value": "@appsetting('storage-account-name')" 13 | } 14 | } -------------------------------------------------------------------------------- /codeful-workflows/samples/recommend-coffee/codeful-logicapp-recommendcoffee/.funcignore: -------------------------------------------------------------------------------- 1 | workflow-designtime/ -------------------------------------------------------------------------------- /codeful-workflows/samples/recommend-coffee/codeful-logicapp-recommendcoffee/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "ms-azuretools.vscode-azurelogicapps", 4 | "ms-dotnettools.csharp" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /codeful-workflows/samples/recommend-coffee/codeful-logicapp-recommendcoffee/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": "Run/Debug logic app codeful-logicapp", 6 | "type": "coreclr", 7 | "request": "attach", 8 | "processId": "${command:azureLogicAppsStandard.pickProcess}" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /codeful-workflows/samples/recommend-coffee/codeful-logicapp-recommendcoffee/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "azureLogicAppsStandard.deploySubpath": "bin/Release/net8.0/publish", 3 | "azureLogicAppsStandard.projectLanguage": "C#", 4 | "azureLogicAppsStandard.projectRuntime": "~4", 5 | "debug.internalConsoleOptions": "neverOpen", 6 | "azureFunctions.suppressProject": true, 7 | "azureLogicAppsStandard.preDeployTask": "publish" 8 | } 9 | -------------------------------------------------------------------------------- /codeful-workflows/samples/recommend-coffee/codeful-logicapp-recommendcoffee/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "label": "generateDebugSymbols", 6 | "command": "${config:azureLogicAppsStandard.dotnetBinaryPath}", 7 | "args": [ 8 | "${input:getDebugSymbolDll}" 9 | ], 10 | "type": "process", 11 | "problemMatcher": "$msCompile" 12 | }, 13 | { 14 | "label": "clean", 15 | "command": "${config:azureLogicAppsStandard.dotnetBinaryPath}", 16 | "args": [ 17 | "clean", 18 | "/property:GenerateFullPaths=true", 19 | "/consoleloggerparameters:NoSummary" 20 | ], 21 | "type": "process", 22 | "problemMatcher": "$msCompile" 23 | }, 24 | { 25 | "label": "build", 26 | "command": "${config:azureLogicAppsStandard.dotnetBinaryPath}", 27 | "args": [ 28 | "build", 29 | "/property:GenerateFullPaths=true", 30 | "/consoleloggerparameters:NoSummary" 31 | ], 32 | "type": "process", 33 | "dependsOn": "clean", 34 | "group": { 35 | "kind": "build", 36 | "isDefault": true 37 | }, 38 | "problemMatcher": "$msCompile" 39 | }, 40 | { 41 | "label": "clean release", 42 | "command": "${config:azureLogicAppsStandard.dotnetBinaryPath}", 43 | "args": [ 44 | "clean", 45 | "--configuration", 46 | "Release", 47 | "/property:GenerateFullPaths=true", 48 | "/consoleloggerparameters:NoSummary" 49 | ], 50 | "type": "process", 51 | "problemMatcher": "$msCompile" 52 | }, 53 | { 54 | "label": "publish", 55 | "command": "${config:azureLogicAppsStandard.dotnetBinaryPath}", 56 | "args": [ 57 | "publish", 58 | "--configuration", 59 | "Release", 60 | "/property:GenerateFullPaths=true", 61 | "/consoleloggerparameters:NoSummary" 62 | ], 63 | "type": "process", 64 | "dependsOn": "clean release", 65 | "problemMatcher": "$msCompile" 66 | }, 67 | { 68 | "label": "func: host start", 69 | "type": "shell", 70 | "dependsOn": "build", 71 | "options": { 72 | "cwd": "${workspaceFolder}/bin/Debug/net8.0", 73 | "env": { 74 | "PATH": "${config:azureLogicAppsStandard.autoRuntimeDependenciesPath}\\NodeJs;${config:azureLogicAppsStandard.autoRuntimeDependenciesPath}\\DotNetSDK;$env:PATH" 75 | } 76 | }, 77 | "command": "${config:azureLogicAppsStandard.funcCoreToolsBinaryPath}", 78 | "args": [ 79 | "host", 80 | "start" 81 | ], 82 | "isBackground": true, 83 | "problemMatcher": "$func-watch" 84 | } 85 | ], 86 | "inputs": [ 87 | { 88 | "id": "getDebugSymbolDll", 89 | "type": "command", 90 | "command": "azureLogicAppsStandard.getDebugSymbolDll" 91 | } 92 | ] 93 | } 94 | -------------------------------------------------------------------------------- /codeful-workflows/samples/recommend-coffee/codeful-logicapp-recommendcoffee/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "codeful_logicapp": { 4 | "commandName": "Project", 5 | "commandLineArgs": "--port 7246", 6 | "launchBrowser": false 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /codeful-workflows/samples/recommend-coffee/codeful-logicapp-recommendcoffee/codeful-logicapp.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net8.0 5 | v4 6 | LogicApps.Codeful.RecommendCoffee 7 | MSB3246;$(MSBuildWarningsAsMessages) 8 | 9 | 10 | 11 | 12 | 13 | 14 | PreserveNewest 15 | 16 | 17 | PreserveNewest 18 | 19 | 20 | PreserveNewest 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | PreserveNewest 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /codeful-workflows/samples/recommend-coffee/codeful-logicapp-recommendcoffee/codeful-logicapp.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 12.00 2 | # Visual Studio Version 17 3 | VisualStudioVersion = 17.5.2.0 4 | MinimumVisualStudioVersion = 10.0.40219.1 5 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "codeful-logicapp", "codeful-logicapp.csproj", "{0DE3EB64-DDF0-8E95-F117-1D8ACD31CCD6}" 6 | EndProject 7 | Global 8 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 9 | Debug|Any CPU = Debug|Any CPU 10 | Release|Any CPU = Release|Any CPU 11 | EndGlobalSection 12 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 13 | {0DE3EB64-DDF0-8E95-F117-1D8ACD31CCD6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 14 | {0DE3EB64-DDF0-8E95-F117-1D8ACD31CCD6}.Debug|Any CPU.Build.0 = Debug|Any CPU 15 | {0DE3EB64-DDF0-8E95-F117-1D8ACD31CCD6}.Release|Any CPU.ActiveCfg = Release|Any CPU 16 | {0DE3EB64-DDF0-8E95-F117-1D8ACD31CCD6}.Release|Any CPU.Build.0 = Release|Any CPU 17 | EndGlobalSection 18 | GlobalSection(SolutionProperties) = preSolution 19 | HideSolutionNode = FALSE 20 | EndGlobalSection 21 | GlobalSection(ExtensibilityGlobals) = postSolution 22 | SolutionGuid = {BB71A5BB-242D-467C-8956-A9F86078214C} 23 | EndGlobalSection 24 | EndGlobal 25 | -------------------------------------------------------------------------------- /codeful-workflows/samples/recommend-coffee/codeful-logicapp-recommendcoffee/connections.json: -------------------------------------------------------------------------------- 1 | { 2 | "agentConnections": {}, 3 | "managedApiConnections": { 4 | "office365": { 5 | "api": { 6 | "id": "" 7 | }, 8 | "connection": { 9 | "id": "" 10 | }, 11 | "connectionRuntimeUrl": "", 12 | "authentication": { 13 | "type": "Raw", 14 | "scheme": "Key", 15 | "parameter": "@appsetting('office365-connectionKey')" 16 | } 17 | } 18 | }, 19 | "serviceProviderConnections": { 20 | "azureaisearch": { 21 | "displayName": "aisearch-connection", 22 | "parameterSetName": "ConnectionString", 23 | "parameterValues": { 24 | "searchServiceAdminKey": "", 25 | "searchServiceEndpoint": "" 26 | }, 27 | "serviceProvider": { 28 | "id": "/serviceProviders/azureaisearch" 29 | } 30 | }, 31 | "openai": { 32 | "displayName": "aoai-connection", 33 | "parameterSetName": "KeyAndEndpointConnection", 34 | "parameterValues": { 35 | "openAIEndpoint": "@parameters('openAIEndpoint')", 36 | "openAIKey": "" 37 | }, 38 | "serviceProvider": { 39 | "id": "/serviceProviders/openai" 40 | } 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /codeful-workflows/samples/recommend-coffee/codeful-logicapp-recommendcoffee/global.json: -------------------------------------------------------------------------------- 1 | { 2 | "sdk": { 3 | "version": "8.0.408" 4 | } 5 | } -------------------------------------------------------------------------------- /codeful-workflows/samples/recommend-coffee/codeful-logicapp-recommendcoffee/host.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0", 3 | "logging": { 4 | "applicationInsights": { 5 | "samplingSettings": { 6 | "isEnabled": true, 7 | "excludedTypes": "Request" 8 | } 9 | } 10 | }, 11 | "extensions": { 12 | "workflow": { 13 | "Settings": { 14 | "Runtime.CodefulWorkflows.Enabled": "true" 15 | } 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /codeful-workflows/samples/recommend-coffee/codeful-logicapp-recommendcoffee/local.settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "IsEncrypted": false, 3 | "Values": { 4 | "AzureWebJobsStorage": "UseDevelopmentStorage=true", 5 | "FUNCTIONS_WORKER_RUNTIME": "dotnet", 6 | "FUNCTIONS_INPROC_NET8_ENABLED": "1", 7 | "office365-connectionKey": "" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /codeful-workflows/samples/recommend-coffee/codeful-logicapp-recommendcoffee/nuget.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /codeful-workflows/samples/recommend-coffee/codeful-logicapp-recommendcoffee/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "openAIEndpoint": { 3 | "type": "string", 4 | "value": "" 5 | } 6 | } -------------------------------------------------------------------------------- /codeful-workflows/samples/recommend-coffee/codeful-logicapp-recommendcoffee/test-recommendcoffee-sample-http/RecommendCoffee.http: -------------------------------------------------------------------------------- 1 | POST http://localhost:7071/api/RecommendCoffee HTTP/1.1 2 | content-type: application/json 3 | 4 | { 5 | "orderID": "10234", 6 | "customer": { 7 | "name": "Jane Doe", 8 | "address": "123 Main Street", 9 | "contact": "janedoe@contoso.com" 10 | }, 11 | "items": [ 12 | { 13 | "productName": "Light Roast", 14 | "qty": 1, 15 | "price": 16.99 16 | }, 17 | { 18 | "productName": "Medium Blend", 19 | "qty": 1, 20 | "price": 16.99 21 | }, 22 | { 23 | "productName": "Morning Blend", 24 | "qty": 1, 25 | "price": 14.99 26 | } 27 | ], 28 | "total": 46.52 29 | } -------------------------------------------------------------------------------- /connectors/AzureVM/README.md: -------------------------------------------------------------------------------- 1 | # Azure VM Connector 2 | 3 | This is a logic app custom connector for Azure Virtual Machines. It provides the following actions: 4 | 5 | |Action|Description| 6 | |--|--| 7 | |Restart|Restart a VM| 8 | |Start|Start a VM| 9 | |Deallocate|Deallocate and Stop a VM| 10 | |Power Off|Stop a VM (does not deallocate)| 11 | |Capture Image|Capture an image of a VM| 12 | 13 | ## Pre-Requisites 14 | 15 | This connector does require authentication to Azure Active Directory. As such, deployment will require the client ID and client Secret for an AAD Application. [These instructions](https://docs.microsoft.com/azure/azure-resource-manager/resource-manager-api-authentication) will walk through how to register an Azure Active Directory application with **User + app access** so the connector can act on-behalf-of the authenticated user. Be sure to set your application up to get delegate access to the Windows Azure application. 16 | 17 | After deploying, you will need to open the connector (named `azure-vm-connector` in whichever resource group and location selected) and copy the redirect URL from the security tab. Update your Azure AD Application reply URLs to support the logic app consent flow. 18 | 19 | ![AAD Reply UX Screenshot](images/aad-reply-ux.png) 20 | 21 | ## Deploying 22 | 23 | You can deploy with the [azuredeploy.json](azuredeploy.json) or by clicking the button below: 24 | 25 | 26 | 27 | 28 | 29 | After deployment you can view the connector `Azure VM` in any of the logic apps in the region you deployed the connector to. You can deploy this connector to as many regions as you require. -------------------------------------------------------------------------------- /connectors/AzureVM/images/aad-reply-ux.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/logicapps/a3f00d170e23329c78a4e55bee11d93bab30d16a/connectors/AzureVM/images/aad-reply-ux.png -------------------------------------------------------------------------------- /connectors/Microsoft Graph/README.md: -------------------------------------------------------------------------------- 1 | # Microsoft Graph Connector 2 | 3 | This is a logic app custom connector for a few operations on the Microsoft Graph. It provides the following actions: 4 | 5 | |Action|Description| 6 | |--|--| 7 | |AddUser|Add a user into the graph| 8 | |AssignManager|Assign a manager to a user| 9 | |AssignLicense|Assign a license to a user| 10 | |ListPlansGroup|List all plans in a group| 11 | 12 | ## Pre-Requisites 13 | 14 | This connector does require authentication to Azure Active Directory. As such, deployment will require the client ID and client Secret for an AAD Application. You'll need to a register an Azure Active Directory application with **User + app access** so the connector can act on-behalf-of the authenticated user. Be sure to give your application delegate permissions to the Microsoft Graph. 15 | 16 | After deploying, you will need to open the connector (named `microsoft-graph-connector` in whichever resource group and location selected) and copy the redirect URL from the security tab. Update your Azure AD Application reply URLs to support the logic app consent flow. 17 | 18 | ![AAD Reply UX Screenshot](images/aad-reply-ux.png) 19 | 20 | ## Deploying 21 | 22 | You can deploy with the [azuredeploy.json](azuredeploy.json) or by clicking the button below: 23 | 24 | 25 | 26 | 27 | 28 | After deployment you can view the connector `Microsoft Graph` in any of the logic apps in the region you deployed the connector to. You can deploy this connector to as many regions as you require. -------------------------------------------------------------------------------- /connectors/Microsoft Graph/images/aad-reply-ux.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/logicapps/a3f00d170e23329c78a4e55bee11d93bab30d16a/connectors/Microsoft Graph/images/aad-reply-ux.png -------------------------------------------------------------------------------- /github-sample/.funcignore: -------------------------------------------------------------------------------- 1 | .debug 2 | .git* 3 | .vscode 4 | local.settings.json 5 | test 6 | workflow-designtime/ -------------------------------------------------------------------------------- /github-sample/.github/workflows/logicapp_deploy.yml: -------------------------------------------------------------------------------- 1 | # Docs for the Azure Web Apps Deploy action: https://github.com/azure/functions-action 2 | # More GitHub Actions for Azure: https://github.com/Azure/actions 3 | 4 | name: (classic) Build and Deploy Logic App. 5 | 6 | env: 7 | LA_NAME: 'la-name-324234' 8 | 9 | on: 10 | workflow_dispatch: 11 | # Trigger the workflow every time the build workflow ran to completion 12 | workflow_run: 13 | workflows: 14 | - (classic) Logic App Infrastructure as Code Pipeline. 15 | types: 16 | - completed 17 | # Triggers when an environment file has been changed 18 | push: 19 | paths: 20 | - "logic/**" 21 | - ".github/workflows/logicapp_deploy.yml" 22 | 23 | jobs: 24 | logic_app_build: 25 | name: Build 26 | runs-on: ubuntu-latest 27 | steps: 28 | - name: Checkout 29 | uses: actions/checkout@v1 30 | - name: Package logic 31 | run: (cd logic; mkdir -p ../output; zip -r ../output/logic.zip .) 32 | - name: Upload app zip package 33 | uses: actions/upload-artifact@v2 34 | with: 35 | name: logic 36 | path: ./output/ 37 | retention-days: 1 38 | 39 | logic_app_deploy: 40 | name: Deploy 41 | runs-on: ubuntu-latest 42 | needs: [logic_app_build] 43 | environment: 44 | name: Dev 45 | steps: 46 | - name: Checkout 47 | uses: actions/checkout@v1 48 | - name: Login via Az module 49 | uses: azure/login@v1 50 | with: 51 | creds: ${{secrets.AZURE_CREDENTIALS}} 52 | enable-AzPSSession: true 53 | - uses: actions/download-artifact@master 54 | with: 55 | name: logic 56 | path: ./output/ 57 | 58 | - name: Get publish Profile 59 | id: publishprofile 60 | uses: azure/powershell@v1 61 | with: 62 | inlineScript: | 63 | $profile = Get-AzWebAppPublishingProfile ` 64 | -ResourceGroupName ${{ secrets.RG_LA }} ` 65 | -Name ${{ env.LA_NAME }} 66 | $profile = $profile.Replace("`r", "").Replace("`n", "") 67 | Write-Output "::set-output name=profile::$profile" 68 | azPSVersion: latest 69 | 70 | - name: Deploy to Azure Logic App 71 | uses: Azure/functions-action@v1.3.1 72 | id: la 73 | with: 74 | app-name: ${{secrets.RG_LA}} 75 | package: './output/logic.zip' 76 | publish-profile: ${{steps.publishprofile.outputs.profile}} 77 | 78 | - name: Swap parameter files 79 | id: params 80 | uses: azure/CLI@v1 81 | with: 82 | inlineScript: | 83 | az functionapp deploy --resource-group ${{ secrets.RG_LA }} --name ${{ env.LA_NAME }} --src-path logic/azure.parameters.json --type static --target-path parameters.json 84 | -------------------------------------------------------------------------------- /github-sample/.gitignore: -------------------------------------------------------------------------------- 1 | bin 2 | obj 3 | appsettings.json 4 | local.settings.json 5 | workflow-designtime/ 6 | -------------------------------------------------------------------------------- /github-sample/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "ms-azuretools.vscode-azurefunctions" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /github-sample/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": "Attach to .NET Functions", 6 | "type": "coreclr", 7 | "request": "attach", 8 | "processId": "${command:azureLogicAppsStandard.pickProcess}" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /github-sample/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "azureLogicAppsStandard.deploySubpath": ".", 3 | "azureLogicAppsStandard.projectLanguage": "JavaScript", 4 | "azureLogicAppsStandard.projectRuntime": "~3", 5 | "debug.internalConsoleOptions": "neverOpen", 6 | "azureLogicAppsStandard.projectSubpath": "logic" 7 | } 8 | -------------------------------------------------------------------------------- /github-sample/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "label": "generateDebugSymbols", 6 | "command": "dotnet", 7 | "args": [ 8 | "${input:getDebugSymbolDll}" 9 | ], 10 | "type": "process", 11 | "problemMatcher": "$msCompile", 12 | "options": { 13 | "cwd": "${workspaceFolder}/logic" 14 | } 15 | }, 16 | { 17 | "type": "func", 18 | "command": "host start", 19 | "problemMatcher": "$func-watch", 20 | "isBackground": true, 21 | "dependsOn": "generateDebugSymbols", 22 | "options": { 23 | "cwd": "${workspaceFolder}/logic" 24 | } 25 | } 26 | ], 27 | "inputs": [ 28 | { 29 | "id": "getDebugSymbolDll", 30 | "type": "command", 31 | "command": "azureLogicAppsStandard.getDebugSymbolDll" 32 | } 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /github-sample/ARM/connectors-parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", 3 | "contentVersion": "1.0.0.0", 4 | "parameters": { 5 | "location": { 6 | "value": "westus2" 7 | }, 8 | "logicAppSystemAssignedIdentityTenantId": { 9 | "value": "__1__" 10 | }, 11 | "logicAppSystemAssignedIdentityObjectId": { 12 | "value": "__2__" 13 | }, 14 | "sa_name": { 15 | "value": "your-sa-name" 16 | }, 17 | "connections_azureblob_name": { 18 | "value":"azureblob" 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /github-sample/ARM/connectors-template.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", 3 | "contentVersion": "1.0.0.0", 4 | "parameters": { 5 | "location": { 6 | "type": "string", 7 | "metadata": { 8 | "description": "The datacenter to use for the deployment." 9 | } 10 | }, 11 | "logicAppSystemAssignedIdentityTenantId": { 12 | "type": "string" 13 | }, 14 | "logicAppSystemAssignedIdentityObjectId": { 15 | "type": "string" 16 | }, 17 | "sa_name": { 18 | "defaultValue": "storage name", 19 | "type": "string" 20 | }, 21 | "connections_azureblob_name": { 22 | "defaultValue": "azureblob", 23 | "type": "string" 24 | } 25 | }, 26 | "variables": { 27 | "storage_account": "[concat(toLower(parameters('sa_name')), uniqueString(resourceGroup().id))]" 28 | }, 29 | "resources": [ 30 | { 31 | "type": "Microsoft.Storage/storageAccounts", 32 | "apiVersion": "2021-09-01", 33 | "name": "[variables('storage_account')]", 34 | "location": "[parameters('location')]", 35 | "sku": { 36 | "name": "Standard_LRS", 37 | "tier": "Standard" 38 | }, 39 | "kind": "Storage", 40 | "properties": { 41 | "networkAcls": { 42 | "bypass": "AzureServices", 43 | "virtualNetworkRules": [], 44 | "ipRules": [], 45 | "defaultAction": "Allow" 46 | }, 47 | "supportsHttpsTrafficOnly": true, 48 | "encryption": { 49 | "services": { 50 | "file": { 51 | "keyType": "Account", 52 | "enabled": true 53 | }, 54 | "blob": { 55 | "keyType": "Account", 56 | "enabled": true 57 | } 58 | }, 59 | "keySource": "Microsoft.Storage" 60 | } 61 | } 62 | }, 63 | { 64 | "type": "Microsoft.Storage/storageAccounts/blobServices/containers", 65 | "apiVersion": "2021-09-01", 66 | "name": "[format('{0}/default/blobs', variables('storage_account'))]", 67 | "dependsOn": [ 68 | "[resourceId('Microsoft.Storage/storageAccounts', variables('storage_account'))]" 69 | ], 70 | "properties": { 71 | "defaultEncryptionScope": "$account-encryption-key", 72 | "denyEncryptionScopeOverride": false, 73 | "publicAccess": "Container" 74 | } 75 | }, 76 | { 77 | "type": "Microsoft.Web/connections", 78 | "apiVersion": "2016-06-01", 79 | "name": "[parameters('connections_azureblob_name')]", 80 | "location": "[parameters('location')]", 81 | "kind": "V2", 82 | "dependsOn": [ 83 | "[resourceId('Microsoft.Storage/storageAccounts', variables('storage_account'))]" 84 | ], 85 | "properties": { 86 | "displayName": "privatestorage", 87 | "parameterValues": { 88 | "accountName": "[variables('storage_account')]", 89 | "accessKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts/', variables('storage_account')), '2019-06-01').keys[0].value]" 90 | }, 91 | "api": { 92 | "id": "[subscriptionResourceId('Microsoft.Web/locations/managedApis', parameters('location'), 'azureblob')]" 93 | } 94 | } 95 | }, 96 | { 97 | "type": "Microsoft.Web/connections/accessPolicies", 98 | "apiVersion": "2016-06-01", 99 | "name": "[format('{0}/{1}', parameters('connections_azureblob_name'), parameters('logicAppSystemAssignedIdentityObjectId'))]", 100 | "location": "[parameters('location')]", 101 | "dependsOn": [ 102 | "[resourceId('Microsoft.Web/connections', parameters('connections_azureblob_name'))]" 103 | ], 104 | "properties": { 105 | "principal": { 106 | "type": "ActiveDirectory", 107 | "identity": { 108 | "tenantId": "[parameters('logicAppSystemAssignedIdentityTenantId')]", 109 | "objectId": "[parameters('logicAppSystemAssignedIdentityObjectId')]" 110 | } 111 | } 112 | } 113 | } 114 | 115 | ], 116 | "outputs": { 117 | "blobendpointurl": { 118 | "type": "string", 119 | "value": "[reference(resourceId('Microsoft.Web/connections', parameters('connections_azureblob_name')), '2016-06-01', 'full').properties.connectionRuntimeUrl]" 120 | } 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /github-sample/ARM/la-parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", 3 | "contentVersion": "1.0.0.0", 4 | "parameters": { 5 | "location": { 6 | "value": "westus2" 7 | }, 8 | "environmentName": { 9 | "value": "env-name" 10 | }, 11 | "projectName": { 12 | "value": "project-name" 13 | }, 14 | "logicAppName": { 15 | "value": "la-name" 16 | }, 17 | "appServicePlanName": { 18 | "value": "asp-name" 19 | }, 20 | "storageName": { 21 | "value": "storage-name" 22 | }, 23 | "kind": { 24 | "value": "StorageV2" 25 | }, 26 | "skuName": { 27 | "value": "Standard_LRS" 28 | }, 29 | "skuTier": { 30 | "value": "Standard" 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /github-sample/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/azure-functions/node:3.0 2 | 3 | ENV AzureWebJobsScriptRoot=/home/site/wwwroot \ 4 | AzureFunctionsJobHost__Logging__Console__IsEnabled=true \ 5 | FUNCTIONS_V2_COMPATIBILITY_MODE=true 6 | 7 | COPY . /home/site/wwwroot 8 | 9 | RUN cd /home/site/wwwroot -------------------------------------------------------------------------------- /github-sample/logic/.funcignore: -------------------------------------------------------------------------------- 1 | workflow-designtime/ -------------------------------------------------------------------------------- /github-sample/logic/EventProcessor/workflow.json: -------------------------------------------------------------------------------- 1 | { 2 | "definition": { 3 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", 4 | "actions": { 5 | "Response": { 6 | "type": "Response", 7 | "kind": "http", 8 | "inputs": { 9 | "statusCode": 200 10 | }, 11 | "runAfter": { 12 | "Create_blob_(V2)": [ 13 | "Succeeded" 14 | ] 15 | } 16 | }, 17 | "Create_blob_(V2)": { 18 | "type": "ApiConnection", 19 | "inputs": { 20 | "host": { 21 | "connection": { 22 | "referenceName": "azureblob" 23 | } 24 | }, 25 | "method": "post", 26 | "body": "@triggerBody()", 27 | "headers": { 28 | "ReadFileMetadataFromServer": true 29 | }, 30 | "path": "/v2/datasets/@{encodeURIComponent(encodeURIComponent('sacb34ucffd7en6'))}/files", 31 | "queries": { 32 | "folderPath": "/blobs", 33 | "name": "@{utcNow()}", 34 | "queryParametersSingleEncoded": true 35 | } 36 | }, 37 | "runAfter": {}, 38 | "runtimeConfiguration": { 39 | "contentTransfer": { 40 | "transferMode": "Chunked" 41 | } 42 | } 43 | } 44 | }, 45 | "triggers": { 46 | "manual": { 47 | "type": "Request", 48 | "kind": "Http", 49 | "inputs": {} 50 | } 51 | }, 52 | "contentVersion": "1.0.0.0", 53 | "outputs": {} 54 | }, 55 | "kind": "Stateful" 56 | } -------------------------------------------------------------------------------- /github-sample/logic/EventTrigger/workflow.json: -------------------------------------------------------------------------------- 1 | { 2 | "definition": { 3 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", 4 | "actions": { 5 | "Invoke_a_workflow_in_this_workflow_app": { 6 | "inputs": { 7 | "body": "demo content", 8 | "host": { 9 | "workflow": { 10 | "id": "eventprocessor" 11 | } 12 | } 13 | }, 14 | "runAfter": {}, 15 | "type": "Workflow" 16 | } 17 | }, 18 | "contentVersion": "1.0.0.0", 19 | "outputs": {}, 20 | "triggers": { 21 | "Recurrence": { 22 | "recurrence": { 23 | "frequency": "Day", 24 | "interval": 1 25 | }, 26 | "type": "Recurrence" 27 | } 28 | } 29 | }, 30 | "kind": "Stateful" 31 | } -------------------------------------------------------------------------------- /github-sample/logic/azure.parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "blob_auth": { 3 | "type":"object", 4 | "value": { 5 | "type": "ManagedServiceIdentity" 6 | } 7 | } 8 | 9 | } -------------------------------------------------------------------------------- /github-sample/logic/connections.json: -------------------------------------------------------------------------------- 1 | { 2 | "managedApiConnections": { 3 | "azureblob": { 4 | "api": { 5 | "id": "/subscriptions/@appsetting('WORKFLOWS_SUBSCRIPTION_ID')/providers/Microsoft.Web/locations/@appsetting('WORKFLOWS_LOCATION_NAME')/managedApis/azureblob" 6 | }, 7 | "connection": { 8 | "id": "/subscriptions/@appsetting('WORKFLOWS_SUBSCRIPTION_ID')/resourceGroups/@appsetting('WORKFLOWS_RESOURCE_GROUP_NAME')/providers/Microsoft.Web/connections/azureblob" 9 | }, 10 | "connectionRuntimeUrl": "@appsetting('BLOB_CONNECTION_RUNTIMEURL')", 11 | "authentication": "@parameters('blob_auth')" 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /github-sample/logic/host.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0", 3 | "extensionBundle": { 4 | "id": "Microsoft.Azure.Functions.ExtensionBundle.Workflows", 5 | "version": "[1.*, 2.0.0)" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /github-sample/logic/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "blob_auth": { 3 | "type":"object", 4 | "value": { 5 | "type": "Raw", 6 | "scheme": "Key", 7 | "parameter": "@appsetting('azureblob-connectionKey')" 8 | } 9 | } 10 | 11 | } -------------------------------------------------------------------------------- /labs/twitter-to-powerbi/images/functionConfig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/logicapps/a3f00d170e23329c78a4e55bee11d93bab30d16a/labs/twitter-to-powerbi/images/functionConfig.png -------------------------------------------------------------------------------- /labs/twitter-to-powerbi/images/powerbiConfig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/logicapps/a3f00d170e23329c78a4e55bee11d93bab30d16a/labs/twitter-to-powerbi/images/powerbiConfig.png -------------------------------------------------------------------------------- /labs/twitter-to-powerbi/images/twitterConfig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/logicapps/a3f00d170e23329c78a4e55bee11d93bab30d16a/labs/twitter-to-powerbi/images/twitterConfig.png -------------------------------------------------------------------------------- /preview/Images/DisableUpdate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/logicapps/a3f00d170e23329c78a4e55bee11d93bab30d16a/preview/Images/DisableUpdate.png -------------------------------------------------------------------------------- /preview/Images/InstallVsix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/logicapps/a3f00d170e23329c78a4e55bee11d93bab30d16a/preview/Images/InstallVsix.png -------------------------------------------------------------------------------- /preview/Images/RuntimeVersion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/logicapps/a3f00d170e23329c78a4e55bee11d93bab30d16a/preview/Images/RuntimeVersion.png -------------------------------------------------------------------------------- /preview/Images/logicapp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/logicapps/a3f00d170e23329c78a4e55bee11d93bab30d16a/preview/Images/logicapp.png -------------------------------------------------------------------------------- /preview/LogicAppsV2Demo.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/logicapps/a3f00d170e23329c78a4e55bee11d93bab30d16a/preview/LogicAppsV2Demo.mp4 -------------------------------------------------------------------------------- /preview/readme.md: -------------------------------------------------------------------------------- 1 | # Logic Apps Preview 2 | 3 | This early release includes a number of exciting new features to test out including: 4 | 5 | Local development on your dev machine 6 | 7 | * Designer support in a new VS Code add-in 8 | * Docker container support 9 | * Choice of stateless or stateful operating mode 10 | * Additional ‘built-in’ connectors 11 | * Running on the Azure functions runtime, with support for deployment to App Service 12 | 13 | ## Get started 14 | 15 | Getting started guide is found in the wiki here: [getting started wiki](https://github.com/Azure/logicapps/wiki/1.-Preview-notes-for-participants). 16 | A video walking through the user experience of using VS Code can be found here: [Demo video](LogicAppsV2Demo.mp4). 17 | 18 | ## Region support 19 | 20 | Currently the following regions are supportd for Function App deployment: 21 | 22 | * West Central US (cloud connectors are only supported in this region) 23 | * West US 2 24 | * North Central US 25 | * West Europe 26 | 27 | More regions will open up very soon. 28 | 29 | ## Notes on changes/updates 30 | 31 | 5/28/2020: This is the base preview release, this is an early preview so expect to see regular updates as we identify and fix issues 32 | [VSIX package 0.22.1-alpha](https://workflowscdn.azureedge.net/2020-05-preview/VsExtension/LogicAppsVSCodeExtension-0.22.1-alpha.zip) 33 | 34 | ## Issues 35 | 36 | Please report issues on this repo's issue board. 37 | 38 | ## Contributing 39 | 40 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. 41 | -------------------------------------------------------------------------------- /scripts/README.md: -------------------------------------------------------------------------------- 1 | # Useful Scripts 2 | 3 | This folder contains useful Logic Apps scripts for your reference. Please note that while we try to genericize the scripts, you will most likely have to modify them to fit your specific needs. -------------------------------------------------------------------------------- /scripts/cancel-all-runs/cancel-runs.ps1: -------------------------------------------------------------------------------- 1 | # Max number of pages to follow when retriving runs 2 | # Each page contains up to 30 runs 3 | $maxPage = 10 4 | 5 | # Logic Apps to cancel 6 | $subscriptionName = 'Subscription Name' 7 | $resourceGroup = 'Resource Group Name' 8 | $logicAppsName = 'Logic Apps Name' 9 | 10 | 11 | ##### 12 | 13 | $subscription = Get-AzSubscription -SubscriptionName $subscriptionName 14 | 15 | $cotnext = $subscription | Set-AzContext 16 | 17 | # Get token from context for use when making REST call to run API 18 | $tokens = $cotnext.TokenCache.ReadItems() | where { $_.TenantId -eq $cotnext.Subscription.TenantId } | Sort-Object -Property ExpiresOn -Descending 19 | 20 | $token = $tokens[0].AccessToken 21 | 22 | $logicApps = Get-AzResource -ResourceType Microsoft.Logic/workflows -ResourceGroupName $resourceGroup -Name $logicAppsName 23 | 24 | Foreach ($la in $logicApps) { 25 | # Get-AzLogicAppRunHistory does not follow nextLink when retriving runs 26 | # https://github.com/Azure/azure-powershell/issues/9141 27 | # $runs = Get-AzLogicAppRunHistory -ResourceGroupName $la.ResourceGroupName -Name $la.name | where { $_.Status -eq 'Running' } 28 | 29 | $headers = @{ 30 | 'Authorization' = 'Bearer ' + $token 31 | } 32 | 33 | # GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs?api-version=2016-06-01&$top={$top}&$filter={$filter} 34 | $nextLink = 'https://management.azure.com/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.Logic/workflows/{2}/runs?api-version=2016-06-01&$filter=status eq ''Running''' -f $subscription.Id, $la.ResourceGroupName, $la.Name 35 | $runs = @() 36 | $page = 0 37 | 38 | Do { 39 | $data = Invoke-RestMethod -Method 'GET' -Uri $nextLink -Headers $headers 40 | 41 | $runs += $data.value 42 | $nextLink = if ($data.nextLink) { $data.nextLink } else { '' } 43 | 44 | $page++ 45 | } Until ($nextLink -eq "" -or $page -ge $maxPage) 46 | 47 | 48 | Foreach($run in $runs) { 49 | Stop-AzLogicAppRun -ResourceGroupName $la.ResourceGroupName -Name $la.name -RunName $run.name -Force 50 | } 51 | } -------------------------------------------------------------------------------- /scripts/recurrence-jobs/README.md: -------------------------------------------------------------------------------- 1 | # Recurrence jobs 2 | 3 | If you have a large number of recurrence jobs, instead of creating one Logic App per schedule, you can use this template to dramatically reduce the number of Logic Apps needed. 4 | 5 | `deploy.ps1` 6 | 7 | This script will find all the failed runs for Logic Apps under a subscription or resource group, and resubmit them. 8 | 9 | `schedulesWithConn.json` 10 | 11 | This ARM deployment template contains three Logic Apps, together they will be able to handle multiple schedules. 12 | 13 | This script also shows off a few other tricks: 14 | 15 | * Define multiple connections and randomly choose one at run time for higher throughput 16 | * Deploy Logic Apps with circular references by deploy blank Logic App first then redeploy with actual reference 17 | * Deploy multiple copies of the Logic Apps -------------------------------------------------------------------------------- /scripts/recurrence-jobs/deploy.ps1: -------------------------------------------------------------------------------- 1 | $copies = 1 2 | 3 | $deploymentName = "recurrentLogicAppDeployment" 4 | 5 | $resourceGroupName = "recurrentLogicAppsRGxyz16" 6 | 7 | $ServiceBusConnConnectionString = "Endpoint=sb://{service-bus-namespace}.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey={SAS-key}" 8 | 9 | $location = "eastus" 10 | 11 | # Create a single resource group for all sets 12 | New-AzResourceGroup -Name $resourceGroupName -Location $location 13 | 14 | For($i = 0; $i -lt $copies; $i++) { 15 | $createRecurrenceJobLogicAppName = "CreateRecurrenceJob" + "_set" + $i 16 | $executeRecurrenceJobLogicAppName = "ExecuteRecurrenceJob" + "_set" + $i 17 | $rescheduleRecurrenceJobLogicAppName = "RescheduleRecurrenceJob" + "_set" + $i 18 | $ServiceBusConnName = "ServiceBusConn" + "_set" + $i + "_" 19 | 20 | New-AzResourceGroupDeployment -Name $deploymentName -ResourceGroupName $resourceGroupName -TemplateFile "C:\Desktop\schedulesWithConn.json" -location $location -CreateRecurrenceJobLogicAppName $createRecurrenceJobLogicAppName -ExecuteRecurrenceJobLogicAppName $executeRecurrenceJobLogicAppName -RescheduleRecurrenceJobLogicAppName $rescheduleRecurrenceJobLogicAppName -ServiceBusConnName $ServiceBusConnName -ServiceBusConnConnectionString $ServiceBusConnConnectionString 21 | } 22 | # End of create a single resource group for all sets -------------------------------------------------------------------------------- /scripts/resubmit-all-failed-runs/README.md: -------------------------------------------------------------------------------- 1 | # Resubmit all failed runs 2 | 3 | `resubmit-all-failed-runs.ps1` 4 | 5 | This script will find all the failed runs for Logic Apps under a subscription or resource group, and resubmit them. -------------------------------------------------------------------------------- /scripts/resubmit-all-failed-runs/resubmit-all-failed-runs.ps1: -------------------------------------------------------------------------------- 1 | $startDateTime = Get-Date -Date '11/21/2018 5:00:00 PM' 2 | 3 | $endDateTime = Get-Date -Date '11/21/2018 6:00:00 PM' 4 | 5 | $subscription = Get-AzSubscription -SubscriptionName "Name of the subscription" 6 | 7 | $cotnext = $subscription | Set-AzContext 8 | 9 | $tokens = $cotnext.TokenCache.ReadItems() | where { $_.TenantId -eq $cotnext.Subscription.TenantId } | Sort-Object -Property ExpiresOn -Descending 10 | 11 | $token = $tokens[0].AccessToken 12 | 13 | $logicApps = Get-AzResource -ResourceType Microsoft.Logic/workflows <# | where { $_.ResourceGroupName -eq 'LoremIpsum'} #> 14 | 15 | Foreach ($la in $logicApps) { 16 | $runs = Get-AzLogicAppRunHistory -ResourceGroupName $la.ResourceGroupName -Name $la.name | where { $_.Status -eq 'Failed' } | where { $_.StartTime -gt $startDateTime -and $_.StartTime -lt $endDateTime } 17 | 18 | $headers = @{ 19 | 'Authorization' = 'Bearer ' + $token 20 | } 21 | 22 | Foreach($run in $runs) { 23 | $uri = 'https://management.azure.com/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.Logic/workflows/{2}/triggers/{3}/histories/{4}/resubmit?api-version=2016-06-01' -f $subscription.Id, $la.ResourceGroupName, $la.Name, $run.Trigger.Name, $run.Name 24 | 25 | Invoke-RestMethod -Method 'POST' -Uri $uri -Headers $headers 26 | } 27 | } -------------------------------------------------------------------------------- /scripts/scheduler-migration/README.md: -------------------------------------------------------------------------------- 1 | # Migrate Azure Scheduler jobs to Logic Apps 2 | 3 | `run-once-handler.json` 4 | 5 | A Logic App definition that will be responsible for all run-once schedules. 6 | 7 | `scheduler-migration.ps1` 8 | 9 | This script will find all the failed runs for Logic Apps under a subscription or resource group, and resubmit them. -------------------------------------------------------------------------------- /scripts/scheduler-migration/run-once-handler.json: -------------------------------------------------------------------------------- 1 | { 2 | "$connections": { 3 | "value": { 4 | "servicebus_1": { 5 | "connectionId": "/subscriptions/{subscription}/resourceGroups/{resourceGroup}/providers/Microsoft.Web/connections/servicebus-1", 6 | "connectionName": "servicebus-11", 7 | "id": "/subscriptions/{subscription}/providers/Microsoft.Web/locations/{location}/managedApis/servicebus" 8 | } 9 | } 10 | }, 11 | "definition": { 12 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", 13 | "actions": { 14 | "Delay_until": { 15 | "inputs": { 16 | "until": { 17 | "timestamp": "@{convertToUtc(triggerBody()?['timestamp'],triggerBody()?['sourceTimeZone'])}" 18 | } 19 | }, 20 | "runAfter": {}, 21 | "type": "Wait" 22 | }, 23 | "Send_message": { 24 | "inputs": { 25 | "body": { 26 | "ContentData": "@{base64(triggerBody()?['content'])}" 27 | }, 28 | "host": { 29 | "connection": { 30 | "name": "@parameters('$connections')['servicebus_1']['connectionId']" 31 | } 32 | }, 33 | "method": "post", 34 | "path": "/@{encodeURIComponent(triggerBody()?['queue'])}/messages", 35 | "queries": { 36 | "systemProperties": "None" 37 | } 38 | }, 39 | "runAfter": { 40 | "Delay_until": [ 41 | "Succeeded" 42 | ] 43 | }, 44 | "type": "ApiConnection" 45 | } 46 | }, 47 | "contentVersion": "1.0.0.0", 48 | "outputs": {}, 49 | "parameters": { 50 | "$connections": { 51 | "defaultValue": {}, 52 | "type": "Object" 53 | } 54 | }, 55 | "triggers": { 56 | "manual": { 57 | "inputs": { 58 | "schema": {} 59 | }, 60 | "kind": "Http", 61 | "type": "Request" 62 | } 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /scripts/scheduler-migration/scheduler-migration.ps1: -------------------------------------------------------------------------------- 1 | Login-AzureRmAccount 2 | Get-AzureRmSubscription 3 | Select-AzureRmSubscription -SubscriptionId {subscriptionId} 4 | 5 | $runOnceHandlerCallbackUrl = Get-AzureRmLogicAppTriggerCallbackUrl -Name 'RunOnceHandler' -ResourceGroupName 'DeliRG' -TriggerName 'manual' 6 | 7 | $nextDaylightSavingEnd = Get-Date -Date '2018-11-04' 8 | $nextDaylightSavingStart = Get-Date -Date '2019-03-10' 9 | 10 | <# 11 | Get all the Scheduler Job Collections, then all the jobs within each job collection. 12 | #> 13 | $jobCollections = Get-AzureRmSchedulerJobCollection 14 | 15 | $jobs = @() 16 | 17 | Foreach ($jobCollection in $jobCollections) { 18 | $jobs += Get-AzureRmSchedulerJob -ResourceGroupName $jobCollection.ResourceGroupName -JobCollectionName $jobCollection.JobCollectionName 19 | } 20 | 21 | <# 22 | Iterate over all run-once jobs and create corresponding Logic App runs 23 | Scheduler jobs stores time in UTC w/o timezone information, so sourceTimeZone will be hardcoded to UTC 24 | #> 25 | Foreach ($job in $jobs) { 26 | If ($job.EndSchedule -eq 'Run once') { 27 | $newTimestamp = $job.StartTime 28 | 29 | <# 30 | Assume all jobs are in DST zones, therefore shifting back one hour 31 | It also only checks for the next two DST switches 32 | #> 33 | If ($job.StartTime -gt $nextDaylightSavingEnd -and $job.StartTime -lt $nextDaylightSavingStart) { 34 | $newTimestamp = $job.StartTime.AddHours(-1) 35 | } 36 | 37 | $payload = @{ 38 | timestamp = $newTimestamp.ToString() 39 | sourceTimeZone = 'UTC' 40 | queue = $job.JobAction.ServiceBusQueueName 41 | content = $job.JobAction.ServiceBusMessage} | ConvertTo-Json 42 | 43 | Invoke-RestMethod -Method Post -Uri $runOnceHandlerCallbackUrl.Value -ContentType 'application/json' -Body $payload 44 | } Else { 45 | #ToDo 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /templates/_sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "/providers/Microsoft.Logic/galleries/public/templates/{Guid}", 3 | "type": "Microsoft.Logic/galleries/templates", 4 | "name": "{Guid}", 5 | "properties": { 6 | "author": { 7 | "displayName": "{Your name}" 8 | }, 9 | "categoryNames": [ 10 | "enterprise_integration", 11 | "schedule", 12 | "producitivity", 13 | "social", 14 | "sync", 15 | "general" 16 | ], 17 | "description": "{Description of the template}", 18 | "displayName": "{Name of the template}", 19 | "definition": { 20 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", 21 | "actions": { 22 | }, 23 | "contentVersion": "1.0.0.0", 24 | "outputs": {}, 25 | "parameters": { 26 | "$connections": { 27 | "defaultValue": {}, 28 | "type": "Object" 29 | } 30 | }, 31 | "triggers": { 32 | } 33 | }, 34 | "connectionReferences": { 35 | }, 36 | "apiSummaries": [ 37 | { 38 | "type": "{Type of the API}", 39 | "displayName": "{Name of the API}", 40 | "iconUri": "{Icon of the API}", 41 | "brandColor": "{Brand color of the API}" 42 | } 43 | ], 44 | "changedTime": "2000-01-01T00:00:00.000Z", 45 | "createdTime": "2000-01-01T00:00:00.000Z", 46 | "popularity": 99 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /templates/asc-regulatoryCompliance-send-notification-email.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "/providers/Microsoft.Logic/galleries/public/templates/b846cc4b-7393-4ac5-a470-994b8b530458", 3 | "type": "Microsoft.Logic/galleries/templates", 4 | "name": "b846cc4b-7393-4ac5-a470-994b8b530458", 5 | "properties": { 6 | "author": { 7 | "displayName": "Microsoft" 8 | }, 9 | "categoryNames": [ 10 | "general", 11 | "security" 12 | ], 13 | "description": "Send an email notification with the regulatory compliance assessment details. Note: automated running of this trigger requires enabling automation in Microsoft Defender for Cloud", 14 | "displayName": "Get a notification email when Microsoft Defender for Cloud creates a regulatory compliance assessment", 15 | "definition": { 16 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", 17 | "actions": { 18 | "Send_an_email_(V2)": { 19 | "type": "ApiConnection", 20 | "inputs": { 21 | "host": { 22 | "connection": { 23 | "name": "@parameters('$connections')['office365']['connectionId']" 24 | } 25 | }, 26 | "method": "post", 27 | "body": { 28 | "To": null, 29 | "Subject": "New Microsoft Defender for Cloud regulatory compliance assessment has been created for your environment", 30 | "Body": "

Microsoft Defender for Cloud regulatory compliance assessment has been created for your environment - assessment details below:
\n
\nAssessment Id: @{triggerBody()?['id']}
\n
\nAssessment name: @{triggerBody()?['name']}
\n
\nResource provider type: @{triggerBody()?['type']}
\n
\nAssessment description: @{triggerBody()?['properties']?['description']}
\n
\nAssessment type: @{triggerBody()?['properties']?['assessmentType']}
\n
\nAssessment state: @{triggerBody()?['properties']?['state']}
\n
\nAssessment's related resources count with passed state: @{triggerBody()?['properties']?['passedResources']}
\n
\nAssessment's related resources count with failed state:  @{triggerBody()?['properties']?['failedResources']}
\n
\nAssessment's related resources count with skipped state:  @{triggerBody()?['properties']?['skippedResources']}
\n
\nLink to more detailed assessment results data: @{triggerBody()?['properties']?['assessmentDetailsLink']}
\n
\nPowered by Microsoft Defender for Cloud Logic Apps regulatory compliance connector.

" 31 | }, 32 | "path": "/v2/Mail" 33 | }, 34 | "runAfter": {} 35 | } 36 | }, 37 | "parameters": { 38 | "$connections": { 39 | "defaultValue": {}, 40 | "type": "Object" 41 | } 42 | }, 43 | "triggers": { 44 | "When_a_Security_Center_Regulatory_Compliance_Assessment_is_created_or_triggered": { 45 | "type": "ApiConnectionWebhook", 46 | "inputs": { 47 | "body": { 48 | "callback_url": "@{listCallbackUrl()}" 49 | }, 50 | "host": { 51 | "connection": { 52 | "name": "@parameters('$connections')['ascregulatorycomplianceassessment']['connectionId']" 53 | } 54 | }, 55 | "path": "/Microsoft.Security/RegulatoryComplianceAssessment/subscribe" 56 | } 57 | } 58 | }, 59 | "contentVersion": "1.0.0.0", 60 | "outputs": {} 61 | }, 62 | "connectionReferences": { 63 | "office365": { 64 | "connection": { 65 | "id": "" 66 | }, 67 | "api": { 68 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/office365" 69 | } 70 | }, 71 | "ascregulatorycomplianceassessment": { 72 | "connection": { 73 | "id": "" 74 | }, 75 | "api": { 76 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/ascregulatorycomplianceassessment" 77 | } 78 | } 79 | }, 80 | "apiSummaries": [{ 81 | "type": "apiconnection", 82 | "displayName": "Microsoft Defender for Cloud Regulatory Compliance", 83 | "iconUri": "https://connectoricons-df.azureedge.net/ascassessment/icon_1.0.1221.1620.png", 84 | "brandColor": "#99c419" 85 | }, 86 | { 87 | "type": "apiconnection", 88 | "displayName": "${Resources.OUTLOOK}", 89 | "iconUri": "https://logicappsresources.blob.core.windows.net/icons/office365.png", 90 | "brandColor": "#0078D4" 91 | } 92 | ], 93 | "changedTime": "2020-12-15T00:00:00.000Z", 94 | "createdTime": "2019-12-15T00:00:00.000Z", 95 | "popularity": 99 96 | } 97 | } -------------------------------------------------------------------------------- /templates/benchmarks/burst/functionAppCode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Linq; 4 | using Microsoft.AspNetCore.Mvc; 5 | using System.Collections.Generic; 6 | using Microsoft.Extensions.Primitives; 7 | using Newtonsoft.Json; 8 | using System.Threading.Tasks; 9 | using Microsoft.Azure.WebJobs; 10 | using Microsoft.Azure.WebJobs.Extensions.Http; 11 | using Microsoft.AspNetCore.Http; 12 | using Microsoft.Extensions.Logging; 13 | 14 | namespace Company.Function 15 | { 16 | public static class retail_stubdp 17 | { 18 | [FunctionName("retail_stubdp")] 19 | public static async Task Run( 20 | [HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequest req, 21 | ILogger log) 22 | { 23 | string ean = req.Query["ean"]; 24 | 25 | return new OkObjectResult(new RetailStubResponse 26 | { 27 | Skus = new List{ $"sku-{ean}" } 28 | }); 29 | } 30 | } 31 | public class RetailStubResponse 32 | { 33 | public List Skus { get; set; } 34 | } 35 | 36 | } -------------------------------------------------------------------------------- /templates/benchmarks/burst/readme.md: -------------------------------------------------------------------------------- 1 | # Instructions on how to execute these benchmarks and gather results 2 | 3 | 1. Create three Logic Apps with the three SKUs (WS1, WS2, WS3). Make sure Application Insights is enabled. Note that Application Insights incurrs a small performance penalty but it is needed to log performance metrics. These results will be slightly worse than those obtained in the blog post, which used internal metrics instead of Application Insights to gather results. 4 | 2. Create a dotnet Function App with the provided source code. The Enricher workflow will make outbound calls to it. 5 | 3. In each Logic App, create the stateful Dispatcher workflow and the stateless Enricher workflow with the provided workflow definitions. 6 | 4. Add these app settings to each of the Logic Apps 7 | * Enricher.Cosmos.DefaultTtl: 86400 8 | * Enricher.MaxMappingValidUntil: 3 9 | * Enricher.RetailApiUrl: \&ean= 10 | 5. Modify host.json with these settings to enable verbose logging and disable Application Insights sampling (to improve metric accuracy). 11 | ``` 12 | { 13 | "version": "2.0", 14 | "extensionBundle": { 15 | "id": "Microsoft.Azure.Functions.ExtensionBundle.Workflows", 16 | "version": "[1.*, 2.0.0)" 17 | }, 18 | "logging": { 19 | "logLevel":{ 20 | "default": "Error" 21 | }, 22 | "applicationInsights": { 23 | "samplingSettings": { 24 | "isEnabled": false 25 | } 26 | } 27 | } 28 | } 29 | ``` 30 | 6. Using Postman (or your favorite HTTP tool), invoke the Dispatcher workflow of each Logic App with a POST request using the following JSON request body: 31 | ``` 32 | { 33 | "orders": [1, 2, 3] 34 | } 35 | ``` 36 | - Make the orders array as large as the desired batch size. For example, to send a burst load of 100k messages, the array should have 100k elements. 37 | 7. Wait until all the runs finish. Then the below Application Insights queries can be used to obtain the data described in the results section of the blog post. Be sure to set the time range for the queries to correspond to the duration of the test run. 38 | 39 | # Application Insight Queries 40 | 41 | ## Scaling 42 | ``` 43 | performanceCounters 44 | | summarize dcount(cloud_RoleInstance) by bin(timestamp, 1m) 45 | | render timechart 46 | ``` 47 | 48 | ## Actions per minute per instance 49 | ``` 50 | customMetrics 51 | |where name contains "Actions Completed" 52 | |summarize sum(value) by bin(timestamp, 1m) 53 | |render timechart 54 | ``` 55 | 56 | ## Runs per minute per instance 57 | ``` 58 | customMetrics 59 | |where name in ("Runs Completed") 60 | |summarize sum(value) by bin(timestamp, 1m) 61 | |render timechart 62 | ``` 63 | 64 | ## Average execution delay (in seconds) 65 | ``` 66 | customMetrics 67 | |where name == "Job Execution Delay" 68 | |summarize avg(valueSum/valueCount) by bin(timestamp, 1m) 69 | |render timechart 70 | ``` 71 | 72 | ## CPU 73 | ``` 74 | performanceCounters 75 | | where name == "% Processor Time" 76 | | summarize percentile(value, 90) by bin(timestamp, 1m), cloud_RoleInstance 77 | | render timechart 78 | ``` 79 | 80 | ## Memory 81 | ``` 82 | performanceCounters 83 | | summarize avgif(value, name=="Private Bytes") by bin(timestamp, 1m), cloud_RoleInstance 84 | | render timechart 85 | ``` 86 | 87 | ## Storage requests 88 | Requires trace level logging. Change the logLevel in host.json from "Error" to "Trace" to log this data. 89 | ```` 90 | traces 91 | | where message startswith "storage operation completed" 92 | | count 93 | ```` 94 | -------------------------------------------------------------------------------- /templates/blockchain-dataworkflow.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "/providers/Microsoft.Logic/galleries/public/templates/2EFD17EDCC1E4C1D91DFB0AAF06267A3", 3 | "type": "Microsoft.Logic/galleries/templates", 4 | "name": "2EFD17EDCC1E4C1D91DFB0AAF06267A3", 5 | "properties": { 6 | "author": { 7 | "displayName": "Microsoft" 8 | }, 9 | "categoryNames": [ 10 | "blockchain" 11 | ], 12 | "displayName": "Publish smart contract event data to SQL DB", 13 | "description": "When an event occurs on a smart contract, this Logic App will be triggered and post the message to SQL DB. Once the template is configured with the smart contract detail, this will insert a row in a database table that has column names that map to the properties of the event.", 14 | "galleryName": "public", 15 | "summary": "", 16 | "definition": { 17 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", 18 | "contentVersion": "1.0.0.0", 19 | "parameters": { 20 | "$connections": { 21 | "defaultValue": {}, 22 | "type": "Object" 23 | } 24 | }, 25 | "triggers": { 26 | "When_a_smart_contract_event_occurs": { 27 | "inputs": { 28 | "host": { 29 | "connection": { 30 | "name": "@parameters('$connections')['blockchainethereum']['connectionId']" 31 | } 32 | }, 33 | "method": "get", 34 | "path": "/contract/OnNewEvent", 35 | "queries": { 36 | "abi": "", 37 | "contractAddress": "", 38 | "eventName": "" 39 | } 40 | }, 41 | "recurrence": { 42 | "frequency": "Minute", 43 | "interval": 3 44 | }, 45 | "type": "ApiConnection" 46 | } 47 | }, 48 | "actions": { 49 | "Insert_row": { 50 | "inputs": { 51 | "body": { 52 | "message": "@triggerBody()?['message']" 53 | }, 54 | "host": { 55 | "connection": { 56 | "name": "@parameters('$connections')['sql']['connectionId']" 57 | } 58 | }, 59 | "method": "post", 60 | "path": "/datasets/default/tables/@{encodeURIComponent(encodeURIComponent(''))}/items" 61 | }, 62 | "runAfter": {}, 63 | "type": "ApiConnection" 64 | } 65 | } 66 | }, 67 | "connectionReferences": { 68 | "blockchainethereum": { 69 | "connection": { 70 | "id": "" 71 | }, 72 | "api": { 73 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/blockchainethereum" 74 | } 75 | }, 76 | "sql": { 77 | "connection": { 78 | "id": "" 79 | }, 80 | "api": { 81 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/sql" 82 | } 83 | } 84 | }, 85 | "apiSummaries": [ 86 | { 87 | "type": "apiconnection", 88 | "displayName": "Ethereum Connector", 89 | "iconUri": "https://connectoricons-prod.azureedge.net/blockchainethereum/icon_1.0.1118.1361.png", 90 | "brandColor": "#ffffff" 91 | }, 92 | { 93 | "type": "apiconnection", 94 | "displayName": "SQL Server", 95 | "iconUri": "https://connectoricons-prod.azureedge.net/sql/icon_1.0.1002.1175.png", 96 | "brandColor": "#ba141a" 97 | } 98 | ], 99 | "changedTime": "2019-05-01T23:33:32Z", 100 | "createdTime": "2019-05-01T23:33:32Z", 101 | "popularity": 10 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /templates/blockchain-messagingworkflow-servicebus.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "/providers/Microsoft.Logic/galleries/public/templates/633F7D174009451DBFD880DCD503602F", 3 | "type": "Microsoft.Logic/galleries/templates", 4 | "name": "633F7D174009451DBFD880DCD503602F", 5 | "properties": { 6 | "author": { 7 | "displayName": "Microsoft" 8 | }, 9 | "categoryNames": [ 10 | "blockchain" 11 | ], 12 | "displayName": "Publish smart contract event data to Service Bus", 13 | "description": "When an event occurs on a smart contract, this Logic App will be triggered and post the message to Service Bus. Once the template is configured with the smart contract detail, there is the option to publish all of the event detail or specific properties of the event.", 14 | "galleryName": "public", 15 | "summary": "", 16 | "definition": { 17 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", 18 | "contentVersion": "1.0.0.0", 19 | "parameters": { 20 | "$connections": { 21 | "defaultValue": {}, 22 | "type": "Object" 23 | } 24 | }, 25 | "triggers": { 26 | "When_a_smart_contract_event_occurs": { 27 | "inputs": { 28 | "host": { 29 | "connection": { 30 | "name": "@parameters('$connections')['blockchainethereum']['connectionId']" 31 | } 32 | }, 33 | "method": "get", 34 | "path": "/contract/OnNewEvent", 35 | "queries": { 36 | "abi": "", 37 | "contractAddress": "", 38 | "eventName": "" 39 | } 40 | }, 41 | "recurrence": { 42 | "frequency": "Minute", 43 | "interval": 3 44 | }, 45 | "type": "ApiConnection" 46 | } 47 | }, 48 | "actions": { 49 | "Send_message": { 50 | "inputs": { 51 | "body": { 52 | "ContentType": "application/json", 53 | "SessionId": "@{guid()}", 54 | "ContentData": "@triggerBody()" 55 | }, 56 | "host": { 57 | "connection": { 58 | "name": "@parameters('$connections')['servicebus']['connectionId']" 59 | } 60 | }, 61 | "method": "post", 62 | "path": "/@{encodeURIComponent(encodeURIComponent(''))}/messages", 63 | "queries": { 64 | "systemProperties": "None" 65 | } 66 | }, 67 | "runAfter": {}, 68 | "type": "ApiConnection" 69 | } 70 | } 71 | }, 72 | "connectionReferences": { 73 | "blockchainethereum": { 74 | "connection": { 75 | "id": "" 76 | }, 77 | "api": { 78 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/blockchainethereum" 79 | } 80 | }, 81 | "servicebus": { 82 | "connection": { 83 | "id": "" 84 | }, 85 | "api": { 86 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/servicebus" 87 | } 88 | } 89 | }, 90 | "apiSummaries": [ 91 | { 92 | "type": "apiconnection", 93 | "displayName": "Ethereum Connector", 94 | "iconUri": "https://connectoricons-prod.azureedge.net/blockchainethereum/icon_1.0.1118.1361.png", 95 | "brandColor": "#ffffff" 96 | }, 97 | { 98 | "type": "apiconnection", 99 | "displayName": "Service Bus", 100 | "iconUri": "https://connectoricons-prod.azureedge.net/servicebus/icon_1.0.1019.1195.png", 101 | "brandColor": "#59B4D9" 102 | } 103 | ], 104 | "changedTime": "2019-05-01T23:33:32Z", 105 | "createdTime": "2019-05-01T23:33:32Z", 106 | "popularity": 30 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /templates/blockchain-serviceworkflow-withgas.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "/providers/Microsoft.Logic/galleries/public/templates/588352CB63AF44099339D334C4CED773", 3 | "type": "Microsoft.Logic/galleries/templates", 4 | "name": "588352CB63AF44099339D334C4CED773", 5 | "properties": { 6 | "author": { 7 | "displayName": "Microsoft" 8 | }, 9 | "categoryNames": [ 10 | "blockchain" 11 | ], 12 | "displayName": "Expose a smart contract function that requires a signature as a microservice", 13 | "description": "When the Logic App is configured with details for the smart contract function, these values from the REST endpoint can be assigned to the parameters of the function. When the function is submitted, it will send the transaction hash to the caller of the service.", 14 | "galleryName": "public", 15 | "summary": "", 16 | "definition": { 17 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", 18 | "contentVersion": "1.0.0.0", 19 | "parameters": { 20 | "$connections": { 21 | "defaultValue": {}, 22 | "type": "Object" 23 | } 24 | }, 25 | "triggers": { 26 | "manual": { 27 | "type": "Request", 28 | "kind": "Http", 29 | "inputs": { 30 | "schema": {} 31 | } 32 | } 33 | }, 34 | "actions": { 35 | "Call_smart_contract_function": { 36 | "runAfter": {}, 37 | "type": "ApiConnection", 38 | "inputs": { 39 | "body": { 40 | "text": "" 41 | }, 42 | "host": { 43 | "connection": { 44 | "name": "@parameters('$connections')['blockchainethereum']['connectionId']" 45 | } 46 | }, 47 | "method": "post", 48 | "path": "/contract/functions/@{encodeURIComponent(encodeURIComponent(''))}/execute", 49 | "queries": { 50 | "abi": "", 51 | "contractAddress": "" 52 | } 53 | } 54 | }, 55 | "Response": { 56 | "runAfter": { 57 | "Call_smart_contract_function": [ 58 | "Succeeded" 59 | ] 60 | }, 61 | "type": "Response", 62 | "kind": "Http", 63 | "inputs": { 64 | "body": "@body('Call_smart_contract_function')", 65 | "statusCode": 200 66 | } 67 | } 68 | }, 69 | "outputs": {} 70 | }, 71 | "connectionReferences": { 72 | "blockchainethereum": { 73 | "connection": { 74 | "id": "" 75 | }, 76 | "api": { 77 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/blockchainethereum" 78 | } 79 | } 80 | }, 81 | "apiSummaries": [ 82 | { 83 | "type": "request", 84 | "displayName": "${Resources.REQUEST_TRIGGER_DISPLAYNAME}", 85 | "iconUri": "${Images.RequestIcon}", 86 | "brandColor": "#009DA5" 87 | }, 88 | { 89 | "type": "apiconnection", 90 | "displayName": "Ethereum Connector", 91 | "iconUri": "https://connectoricons-prod.azureedge.net/blockchainethereum/icon_1.0.1118.1361.png", 92 | "brandColor": "#ffffff" 93 | }, 94 | { 95 | "type": "response", 96 | "displayName": "${Resources.RESPONSE_DISPLAYNAME}", 97 | "iconUri": "${Images.ResponseIcon}", 98 | "brandColor": "#009DA5" 99 | } 100 | ], 101 | "changedTime": "2019-05-01T23:33:32Z", 102 | "createdTime": "2019-05-01T23:33:32Z", 103 | "popularity": 60 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /templates/dropbox-onedrive.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "/providers/Microsoft.Logic/galleries/public/templates/6472fdfd-2e21-4e08-b071-1a7c34e91ad3", 3 | "type": "Microsoft.Logic/galleries/templates", 4 | "name": "6472fdfd-2e21-4e08-b071-1a7c34e91ad3", 5 | "properties": { 6 | "author": { 7 | "displayName": "Microsoft" 8 | }, 9 | "categoryNames": [ 10 | "productivity" 11 | ], 12 | "description": "${Resources.TEMPLATE_DROPBOX_ONEDRIVE_DESCRIPTION}", 13 | "displayName": "${Resources.TEMPLATE_DROPBOX_ONEDRIVE_DISPLAYNAME}", 14 | "galleryName": "public", 15 | "summary": "", 16 | "definition": { 17 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", 18 | "actions": { 19 | "Create_file": { 20 | "inputs": { 21 | "body": "@triggerBody()", 22 | "host": { 23 | "connection": { 24 | "name": "@parameters('$connections')['onedrive']['connectionId']" 25 | } 26 | }, 27 | "method": "post", 28 | "path": "/datasets/default/files", 29 | "queries": { 30 | "folderPath": "/backup from Dropbox", 31 | "name": "@{triggerOutputs()['headers']?['x-ms-file-name-encoded']}" 32 | } 33 | }, 34 | "runAfter": {}, 35 | "type": "ApiConnection" 36 | } 37 | }, 38 | "contentVersion": "1.0.0.0", 39 | "outputs": {}, 40 | "parameters": { 41 | "$connections": { 42 | "defaultValue": {}, 43 | "type": "Object" 44 | } 45 | }, 46 | "triggers": { 47 | "When_a_file_is_created": { 48 | "inputs": { 49 | "host": { 50 | "connection": { 51 | "name": "@parameters('$connections')['dropbox']['connectionId']" 52 | } 53 | }, 54 | "method": "get", 55 | "path": "/datasets/default/triggers/onnewfile", 56 | "queries": { 57 | "folderId": "" 58 | } 59 | }, 60 | "recurrence": { 61 | "frequency": "Minute", 62 | "interval": 3 63 | }, 64 | "type": "ApiConnection" 65 | } 66 | } 67 | }, 68 | "connectionReferences": { 69 | "dropbox": { 70 | "connection": { 71 | "id": "" 72 | }, 73 | "api": { 74 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/dropbox" 75 | } 76 | }, 77 | "onedrive": { 78 | "connection": { 79 | "id": "" 80 | }, 81 | "api": { 82 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/onedrive" 83 | } 84 | } 85 | }, 86 | "apiSummaries": [ 87 | { 88 | "type": "apiconnection", 89 | "displayName": "${Resources.DROPBOX}", 90 | "iconUri": "https://logicappsresources.blob.core.windows.net/icons/dropbox.png", 91 | "brandColor": "#007ee5" 92 | }, 93 | { 94 | "type": "apiconnection", 95 | "displayName": "${Resources.ONEDRIVE}", 96 | "iconUri": "https://logicappsresources.blob.core.windows.net/icons/onedriveforbusiness.png", 97 | "brandColor": "#0078D4" 98 | } 99 | ], 100 | "changedTime": "2017-07-05T00:00:52.000Z", 101 | "createdTime": "2017-01-31T00:00:52.000Z", 102 | "popularity": 8 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /templates/dropbox-to-sharepoint.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "/providers/Microsoft.Logic/galleries/public/templates/4047185d35d041ca80c27e86f7bbbb34", 3 | "type": "Microsoft.Logic/galleries/templates", 4 | "name": "4047185d35d041ca80c27e86f7bbbb34", 5 | "properties": { 6 | "author": { 7 | "displayName": "Microsoft" 8 | }, 9 | "categoryNames": [ 10 | "productivity" 11 | ], 12 | "description": "${Resources.TEMPLATE_DROPBOX_TO_SHAREPOINT_DESCRIPTION}", 13 | "displayName": "${Resources.TEMPLATE_DROPBOX_TO_SHAREPOINT_DISPLAYNAME}", 14 | "galleryName": "public", 15 | "summary": "", 16 | "definition": { 17 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", 18 | "actions": { 19 | "Create_file": { 20 | "inputs": { 21 | "body": "@triggerBody()", 22 | "host": { 23 | "connection": { 24 | "name": "@parameters('$connections')['sharepointonline']['connectionId']" 25 | } 26 | }, 27 | "method": "post", 28 | "path": "/datasets//files", 29 | "queries": { 30 | "folderPath": "", 31 | "name": "@{triggerOutputs()['headers']?['x-ms-file-name-encoded']}" 32 | } 33 | }, 34 | "runAfter": {}, 35 | "type": "ApiConnection" 36 | } 37 | }, 38 | "contentVersion": "1.0.0.0", 39 | "outputs": {}, 40 | "parameters": { 41 | "$connections": { 42 | "defaultValue": {}, 43 | "type": "Object" 44 | } 45 | }, 46 | "triggers": { 47 | "When_a_file_is_created": { 48 | "inputs": { 49 | "host": { 50 | "connection": { 51 | "name": "@parameters('$connections')['dropbox']['connectionId']" 52 | } 53 | }, 54 | "method": "get", 55 | "path": "/datasets/default/triggers/onnewfile", 56 | "queries": { 57 | "folderId": "" 58 | } 59 | }, 60 | "recurrence": { 61 | "frequency": "Minute", 62 | "interval": 3 63 | }, 64 | "type": "ApiConnection" 65 | } 66 | } 67 | }, 68 | "connectionReferences": { 69 | "dropbox": { 70 | "connection": { 71 | "id": "" 72 | }, 73 | "api": { 74 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/dropbox" 75 | } 76 | }, 77 | "sharepointonline": { 78 | "connection": { 79 | "id": "" 80 | }, 81 | "api": { 82 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/sharepointonline" 83 | } 84 | } 85 | }, 86 | "apiSummaries": [ 87 | { 88 | "type": "apiconnection", 89 | "displayName": "${Resources.DROPBOX}", 90 | "iconUri": "https://logicappsresources.blob.core.windows.net/icons/dropbox.png", 91 | "brandColor": "#007ee5" 92 | }, 93 | { 94 | "type": "apiconnection", 95 | "displayName": "${Resources.SHAREPOINT}", 96 | "iconUri": "https://logicappsresources.blob.core.windows.net/icons/sharepoint.png", 97 | "brandColor": "#036C70" 98 | } 99 | ], 100 | "changedTime": "2017-07-05T00:00:39.000Z", 101 | "createdTime": "2017-01-31T00:00:39.000Z", 102 | "popularity": 22 103 | } 104 | } -------------------------------------------------------------------------------- /templates/images/azure-monitor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/logicapps/a3f00d170e23329c78a4e55bee11d93bab30d16a/templates/images/azure-monitor.png -------------------------------------------------------------------------------- /templates/manifest.json: -------------------------------------------------------------------------------- 1 | [ 2 | "as2-response.json", 3 | "asc-alert-send-notification-email.json", 4 | "asc-recommendation-send-notification-email.json", 5 | "asc-regulatoryCompliance-send-notification-email.json", 6 | "azure-monitor-metric-alert-handler.json", 7 | "Azure-Blob-Auto-Expiration.json", 8 | "Azure-Blob-Auto-Tier.json", 9 | "blob-storage-to-dynamics-365-import.json", 10 | "blockchain-dataworkflow.json", 11 | "blockchain-messagingworkflow-eventgrid.json", 12 | "blockchain-messagingworkflow-servicebus.json", 13 | "blockchain-reportingworkflow.json", 14 | "blockchain-serviceworkflow-nogas.json", 15 | "blockchain-serviceworkflow-withgas.json", 16 | "cancel-runs-by-tracking-id.json", 17 | "daily-reminders.json", 18 | "dropbox-onedrive.json", 19 | "dropbox-to-sharepoint.json", 20 | "instagram-to-twitter.json", 21 | "mailchimp-sharepoint.json", 22 | "office-to-wunderlist.json", 23 | "request-response.json", 24 | "rosettanet-decode-response.json", 25 | "rosettanet-encode-response.json", 26 | "sap-receive-batch.json", 27 | "scheduler-recurrence-storage-queue.json", 28 | "scheduler-run-once-http.json", 29 | "service-bus-peek-lock-complete.json", 30 | "service-bus-peek-lock-dead-letter.json", 31 | "service-bus-sessions.json", 32 | "sharepoint-attachments.json", 33 | "sharepoint-file-email.json", 34 | "sharepoint-list-email.json", 35 | "sharepoint-modified.json", 36 | "sharepoint-move.json", 37 | "slack-tweet.json", 38 | "twitter-facebook.json", 39 | "twitter-sharepoint.json", 40 | "twitter-to-office.json", 41 | "twitter-to-outlook.json", 42 | "twitter-to-smtp.json", 43 | "veter.json", 44 | "x12-to-as2.json" 45 | ] -------------------------------------------------------------------------------- /templates/office-to-wunderlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "/providers/Microsoft.Logic/galleries/public/templates/962f42368af84bd1ade21cbab02c1df5", 3 | "type": "Microsoft.Logic/galleries/templates", 4 | "name": "962f42368af84bd1ade21cbab02c1df5", 5 | "properties": { 6 | "author": { 7 | "displayName": "Microsoft" 8 | }, 9 | "categoryNames": [ 10 | "productivity" 11 | ], 12 | "description": "${Resources.TEMPLATE_OFFICE_TO_WUNDERLIST_DESCRIPTION}", 13 | "displayName": "${Resources.TEMPLATE_OFFICE_TO_WUNDERLIST_DISPLAYNAME}", 14 | "galleryName": "public", 15 | "summary": "", 16 | "definition": { 17 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", 18 | "actions": { 19 | "Create_a_task": { 20 | "inputs": { 21 | "body": { 22 | "list_id": null, 23 | "title": "@{triggerBody()['Subject']}" 24 | }, 25 | "host": { 26 | "connection": { 27 | "name": "@parameters('$connections')['wunderlist']['connectionId']" 28 | } 29 | }, 30 | "method": "post", 31 | "path": "/tasks" 32 | }, 33 | "runAfter": {}, 34 | "type": "ApiConnection" 35 | } 36 | }, 37 | "contentVersion": "1.0.0.0", 38 | "outputs": {}, 39 | "parameters": { 40 | "$connections": { 41 | "defaultValue": {}, 42 | "type": "Object" 43 | } 44 | }, 45 | "triggers": { 46 | "On_new_email": { 47 | "inputs": { 48 | "host": { 49 | "connection": { 50 | "name": "@parameters('$connections')['office365']['connectionId']" 51 | } 52 | }, 53 | "method": "get", 54 | "path": "/Mail/OnNewEmail", 55 | "queries": { 56 | "folderPath": "Inbox", 57 | "importance": "High" 58 | } 59 | }, 60 | "splitOn": "@triggerBody()?['value']", 61 | "recurrence": { 62 | "frequency": "Minute", 63 | "interval": 3 64 | }, 65 | "type": "ApiConnection" 66 | } 67 | } 68 | }, 69 | "connectionReferences": { 70 | "office365": { 71 | "connection": { 72 | "id": "" 73 | }, 74 | "api": { 75 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/office365" 76 | } 77 | }, 78 | "wunderlist": { 79 | "connection": { 80 | "id": "" 81 | }, 82 | "api": { 83 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/wunderlist" 84 | } 85 | } 86 | }, 87 | "apiSummaries": [ 88 | { 89 | "type": "apiconnection", 90 | "displayName": "${Resources.OFFICE}", 91 | "iconUri": "https://logicappsresources.blob.core.windows.net/icons/office365.png", 92 | "brandColor": "#0078D4" 93 | }, 94 | { 95 | "type": "apiconnection", 96 | "displayName": "${Resources.WUNDERLIST}", 97 | "iconUri": "https://logicappsresources.blob.core.windows.net/icons/wunderlist.png", 98 | "brandColor": "#de4c40" 99 | } 100 | ], 101 | "changedTime": "2017-07-05T00:00:37.000Z", 102 | "createdTime": "2017-01-31T00:00:37.000Z", 103 | "popularity": 23 104 | } 105 | } -------------------------------------------------------------------------------- /templates/request-response.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "/providers/Microsoft.Logic/galleries/public/templates/93807acf52bf403db4a31ca3f9031af7", 3 | "type": "Microsoft.Logic/galleries/templates", 4 | "name": "93807acf52bf403db4a31ca3f9031af7", 5 | "properties": { 6 | "author": { 7 | "displayName": "Microsoft" 8 | }, 9 | "categoryNames": [ 10 | "general" 11 | ], 12 | "description": "${Resources.TEMPLATE_REQUEST_RESPONSE_DESCRIPTION}", 13 | "displayName": "${Resources.TEMPLATE_REQUEST_RESPONSE_DISPLAYNAME}", 14 | "galleryName": "public", 15 | "summary": "", 16 | "definition": { 17 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", 18 | "actions": { 19 | "Response": { 20 | "inputs": { 21 | "statusCode": 200 22 | }, 23 | "runAfter": {}, 24 | "type": "Response" 25 | } 26 | }, 27 | "contentVersion": "1.0.0.0", 28 | "outputs": {}, 29 | "parameters": {}, 30 | "triggers": { 31 | "request": { 32 | "inputs": { 33 | "schema": {} 34 | }, 35 | "kind": "Http", 36 | "type": "Request" 37 | } 38 | } 39 | }, 40 | "connectionReferences": {}, 41 | "apiSummaries": [ 42 | { 43 | "type": "request", 44 | "displayName": "${Resources.REQUEST_TRIGGER_DISPLAYNAME}", 45 | "iconUri": "${Images.RequestIcon}", 46 | "brandColor": "#009DA5" 47 | }, 48 | { 49 | "type": "http", 50 | "displayName": "${Resources.RESPONSE_DISPLAYNAME}", 51 | "iconUri": "${Images.ResponseIcon}", 52 | "brandColor": "#009DA5" 53 | } 54 | ], 55 | "changedTime": "2017-01-31T00:00:38.000Z", 56 | "createdTime": "2017-01-31T00:00:38.000Z", 57 | "popularity": 1 58 | } 59 | } -------------------------------------------------------------------------------- /templates/service-bus-peek-lock-complete.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "/providers/Microsoft.Logic/galleries/public/templates/20f0612a-375c-4610-b432-772bb05950ae", 3 | "type": "Microsoft.Logic/galleries/templates", 4 | "name": "20f0612a-375c-4610-b432-772bb05950ae", 5 | "properties": { 6 | "author": { 7 | "displayName": "Microsoft" 8 | }, 9 | "categoryNames": [ 10 | "Enterprise Integration" 11 | ], 12 | "description": "${Resources.TEMPLATE_SERVICEBUS_PEEKLOCK_COMPLETE_DESCRIPTION}", 13 | "displayName": "${Resources.TEMPLATE_SERVICEBUS_PEEKLOCK_COMPLETE_DISPLAYNAME}", 14 | "galleryName": "public", 15 | "summary": "", 16 | "definition": { 17 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", 18 | "actions": { 19 | "Complete_the_message_in_a_queue": { 20 | "inputs": { 21 | "host": { 22 | "connection": { 23 | "name": "@parameters('$connections')['servicebus']['connectionId']" 24 | } 25 | }, 26 | "method": "delete", 27 | "path": "//messages/complete", 28 | "queries": { 29 | "lockToken": "@{triggerBody()?['LockToken']}", 30 | "queueType": "Main" 31 | } 32 | }, 33 | "runAfter": {}, 34 | "type": "ApiConnection" 35 | } 36 | }, 37 | "contentVersion": "1.0.0.0", 38 | "outputs": {}, 39 | "parameters": { 40 | "$connections": { 41 | "defaultValue": {}, 42 | "type": "Object" 43 | } 44 | }, 45 | "triggers": { 46 | "When_a_message_is_received_in_a_queue_(peek-lock)": { 47 | "inputs": { 48 | "host": { 49 | "connection": { 50 | "name": "@parameters('$connections')['servicebus']['connectionId']" 51 | } 52 | }, 53 | "method": "get", 54 | "path": "//messages/head/peek", 55 | "queries": { 56 | "queueType": "Main" 57 | } 58 | }, 59 | "recurrence": { 60 | "frequency": "Minute", 61 | "interval": 3 62 | }, 63 | "type": "ApiConnection" 64 | } 65 | } 66 | }, 67 | "connectionReferences": { 68 | "servicebus": { 69 | "connection": { 70 | "id": "" 71 | }, 72 | "api": { 73 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/servicebus" 74 | } 75 | } 76 | }, 77 | "apiSummaries": [ 78 | { 79 | "type": "apiconnection", 80 | "displayName": "${Resources.SERVICEBUS}", 81 | "iconUri": "https://connectoricons-prod.azureedge.net/servicebus/icon_1.0.1019.1195.png", 82 | "brandColor": "#59B4D9" 83 | }, 84 | { 85 | "type": "apiconnection", 86 | "displayName": "${Resources.SERVICEBUS}", 87 | "iconUri": "https://connectoricons-prod.azureedge.net/servicebus/icon_1.0.1019.1195.png", 88 | "brandColor": "#59B4D9" 89 | } 90 | ], 91 | "changedTime": "2017-07-05T00:00:59.000Z", 92 | "createdTime": "2017-01-31T00:00:59.000Z", 93 | "popularity": 2 94 | } 95 | } -------------------------------------------------------------------------------- /templates/sharepoint-modified.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "/providers/Microsoft.Logic/galleries/public/templates/cdad3da1-b3e1-4aaf-bf3c-05aa0d3082da", 3 | "type": "Microsoft.Logic/galleries/templates", 4 | "name": "cdad3da1-b3e1-4aaf-bf3c-05aa0d3082da", 5 | "properties": { 6 | "author": { 7 | "displayName": "Microsoft" 8 | }, 9 | "categoryNames": [ 10 | "productivity" 11 | ], 12 | "description": "${Resources.TEMPLATE_SHAREPOINT_MODIFIED_DESCRIPTION}", 13 | "displayName": "${Resources.TEMPLATE_SHAREPOINT_MODIFIED_DISPLAYNAME}", 14 | "galleryName": "public", 15 | "summary": "", 16 | "definition": { 17 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", 18 | "actions": { 19 | "Send_email": { 20 | "inputs": { 21 | "body": { 22 | "Body": "Item: @{triggerBody()?['Title']} was modified at @{triggerBody()?['Modified']} by @{triggerBody()?['Editor']?['DisplayName']}", 23 | "Subject": "Item: @{triggerBody()?['Title']} was modified by @{triggerBody()?['Editor']?['DisplayName']}", 24 | "To": null 25 | }, 26 | "host": { 27 | "connection": { 28 | "name": "@parameters('$connections')['office365']['connectionId']" 29 | } 30 | }, 31 | "method": "post", 32 | "path": "/Mail" 33 | }, 34 | "runAfter": {}, 35 | "type": "ApiConnection" 36 | } 37 | }, 38 | "contentVersion": "1.0.0.0", 39 | "outputs": {}, 40 | "parameters": { 41 | "$connections": { 42 | "defaultValue": {}, 43 | "type": "Object" 44 | } 45 | }, 46 | "triggers": { 47 | "When_an_existing_item_is_modified": { 48 | "inputs": { 49 | "host": { 50 | "connection": { 51 | "name": "@parameters('$connections')['sharepointonline']['connectionId']" 52 | } 53 | }, 54 | "method": "get", 55 | "path": "/datasets//tables//onupdateditems" 56 | }, 57 | "splitOn": "@triggerBody()?['value']", 58 | "recurrence": { 59 | "frequency": "Minute", 60 | "interval": 3 61 | }, 62 | "type": "ApiConnection" 63 | } 64 | } 65 | }, 66 | "connectionReferences": { 67 | "sharepointonline": { 68 | "connection": { 69 | "id": "" 70 | }, 71 | "api": { 72 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/sharepointonline" 73 | } 74 | }, 75 | "office365": { 76 | "connection": { 77 | "id": "" 78 | }, 79 | "api": { 80 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/office365" 81 | } 82 | } 83 | }, 84 | "apiSummaries": [ 85 | { 86 | "type": "apiconnection", 87 | "displayName": "${Resources.SHAREPOINT}", 88 | "iconUri": "https://logicappsresources.blob.core.windows.net/icons/sharepoint.png", 89 | "brandColor": "#036C70" 90 | }, 91 | { 92 | "type": "apiconnection", 93 | "displayName": "${Resources.OFFICE}", 94 | "iconUri": "https://logicappsresources.blob.core.windows.net/icons/office365.png", 95 | "brandColor": "#0078D4" 96 | } 97 | ], 98 | "changedTime": "2017-07-05T00:00:35.000Z", 99 | "createdTime": "2017-01-31T00:00:35.000Z", 100 | "popularity": 3 101 | } 102 | } -------------------------------------------------------------------------------- /templates/slack-tweet.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "/providers/Microsoft.Logic/galleries/public/templates/e78de444-f0f3-46ab-93bd-4911c4698d19", 3 | "type": "Microsoft.Logic/galleries/templates", 4 | "name": "e78de444-f0f3-46ab-93bd-4911c4698d19", 5 | "properties": { 6 | "author": { 7 | "displayName": "Microsoft" 8 | }, 9 | "categoryNames": [ 10 | "social" 11 | ], 12 | "description": "${Resources.TEMPLATE_SLACK_TWEET_DESCRIPTION}", 13 | "displayName": "${Resources.TEMPLATE_SLACK_TWEET_DISPLAYNAME}", 14 | "galleryName": "public", 15 | "summary": "", 16 | "definition": { 17 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", 18 | "actions": { 19 | "Post_Message": { 20 | "inputs": { 21 | "host": { 22 | "connection": { 23 | "name": "@parameters('$connections')['slack']['connectionId']" 24 | } 25 | }, 26 | "method": "post", 27 | "path": "/chat.postMessage", 28 | "queries": { 29 | "channel": "", 30 | "text": "@{triggerBody()['TweetText']}@{triggerBody()['TweetedBy']}" 31 | } 32 | }, 33 | "runAfter": {}, 34 | "type": "ApiConnection" 35 | } 36 | }, 37 | "contentVersion": "1.0.0.0", 38 | "outputs": {}, 39 | "parameters": { 40 | "$connections": { 41 | "defaultValue": {}, 42 | "type": "Object" 43 | } 44 | }, 45 | "triggers": { 46 | "When_a_new_tweet_appears": { 47 | "inputs": { 48 | "host": { 49 | "connection": { 50 | "name": "@parameters('$connections')['twitter']['connectionId']" 51 | } 52 | }, 53 | "method": "get", 54 | "path": "/onnewtweet", 55 | "queries": { 56 | "searchQuery": "" 57 | } 58 | }, 59 | "splitOn": "@triggerBody()?['value']", 60 | "recurrence": { 61 | "frequency": "Minute", 62 | "interval": 3 63 | }, 64 | "type": "ApiConnection" 65 | } 66 | } 67 | }, 68 | "connectionReferences": { 69 | "twitter": { 70 | "connection": { 71 | "id": "" 72 | }, 73 | "api": { 74 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/twitter" 75 | } 76 | }, 77 | "slack": { 78 | "connection": { 79 | "id": "" 80 | }, 81 | "api": { 82 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/slack" 83 | } 84 | } 85 | }, 86 | "apiSummaries": [ 87 | { 88 | "type": "apiconnection", 89 | "displayName": "${Resources.TWITTER}", 90 | "iconUri": "https://logicappsresources.blob.core.windows.net/icons/twitter.png", 91 | "brandColor": "#5fa9dd" 92 | }, 93 | { 94 | "type": "apiconnection", 95 | "displayName": "${Resources.SLACK}", 96 | "iconUri": "https://logicappsresources.blob.core.windows.net/icons/slack.png", 97 | "brandColor": "#78d4b6" 98 | } 99 | ], 100 | "changedTime": "2017-09-18T00:00:00.000Z", 101 | "createdTime": "2017-01-31T00:00:47.000Z", 102 | "popularity": 13 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /templates/twitter-facebook.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "/providers/Microsoft.Logic/galleries/public/templates/31a7826b6f404812b4e0b6e54964a72f", 3 | "type": "Microsoft.Logic/galleries/templates", 4 | "name": "31a7826b6f404812b4e0b6e54964a72f", 5 | "properties": { 6 | "author": { 7 | "displayName": "Microsoft" 8 | }, 9 | "categoryNames": [ 10 | "social" 11 | ], 12 | "description": "${Resources.TEMPLATE_TWITTER_FACEBOOK_DESCRIPTION}", 13 | "displayName": "${Resources.TEMPLATE_TWITTER_FACEBOOK_DISPLAYNAME}", 14 | "galleryName": "public", 15 | "summary": "", 16 | "definition": { 17 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", 18 | "actions": { 19 | "Post_to_my_timeline": { 20 | "inputs": { 21 | "body": { 22 | "caption": "@{triggerBody()['TweetedBy']}", 23 | "message": "@{triggerBody()['TweetText']}", 24 | "name": "@{triggerBody()['TweetText']}", 25 | "privacy": { 26 | "value": "EVERYONE" 27 | } 28 | }, 29 | "host": { 30 | "connection": { 31 | "name": "@parameters('$connections')['facebook']['connectionId']" 32 | } 33 | }, 34 | "method": "post", 35 | "path": "/me/feed" 36 | }, 37 | "runAfter": {}, 38 | "type": "ApiConnection" 39 | } 40 | }, 41 | "contentVersion": "1.0.0.0", 42 | "outputs": {}, 43 | "parameters": { 44 | "$connections": { 45 | "defaultValue": {}, 46 | "type": "Object" 47 | } 48 | }, 49 | "triggers": { 50 | "When_a_new_tweet_appears": { 51 | "inputs": { 52 | "host": { 53 | "connection": { 54 | "name": "@parameters('$connections')['twitter']['connectionId']" 55 | } 56 | }, 57 | "method": "get", 58 | "path": "/onnewtweet", 59 | "queries": { 60 | "searchQuery": "" 61 | } 62 | }, 63 | "splitOn": "@triggerBody()?['value']", 64 | "recurrence": { 65 | "frequency": "Minute", 66 | "interval": 3 67 | }, 68 | "type": "ApiConnection" 69 | } 70 | } 71 | }, 72 | "connectionReferences": { 73 | "twitter": { 74 | "connection": { 75 | "id": "" 76 | }, 77 | "api": { 78 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/twitter" 79 | } 80 | }, 81 | "facebook": { 82 | "connection": { 83 | "id": "" 84 | }, 85 | "api": { 86 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/facebook" 87 | } 88 | } 89 | }, 90 | "apiSummaries": [ 91 | { 92 | "type": "apiconnection", 93 | "displayName": "${Resources.TWITTER}", 94 | "iconUri": "https://logicappsresources.blob.core.windows.net/icons/twitter.png", 95 | "brandColor": "#5fa9dd" 96 | }, 97 | { 98 | "type": "apiconnection", 99 | "displayName": "${Resources.FACEBOOK}", 100 | "iconUri": "https://logicappsresources.blob.core.windows.net/icons/facebook.png", 101 | "brandColor": "#3b5998" 102 | } 103 | ], 104 | "changedTime": "2017-07-05T00:00:46.000Z", 105 | "createdTime": "2017-01-31T00:00:46.000Z", 106 | "popularity": 16 107 | } 108 | } -------------------------------------------------------------------------------- /templates/twitter-sharepoint.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "/providers/Microsoft.Logic/galleries/public/templates/e78571e5c70e4806a18eeacba5a897c8", 3 | "type": "Microsoft.Logic/galleries/templates", 4 | "name": "e78571e5c70e4806a18eeacba5a897c8", 5 | "properties": { 6 | "author": { 7 | "displayName": "Microsoft" 8 | }, 9 | "categoryNames": [ 10 | "social" 11 | ], 12 | "description": "${Resources.TEMPLATE_TWITTER_SHAREPOINT_DESCRIPTION}", 13 | "displayName": "${Resources.TEMPLATE_TWITTER_SHAREPOINT_DISPLAYNAME}", 14 | "galleryName": "public", 15 | "summary": "", 16 | "definition": { 17 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", 18 | "actions": { 19 | "Create_item": { 20 | "inputs": { 21 | "body": {}, 22 | "host": { 23 | "connection": { 24 | "name": "@parameters('$connections')['sharepointonline']['connectionId']" 25 | } 26 | }, 27 | "method": "post", 28 | "path": "/datasets//tables//items" 29 | }, 30 | "runAfter": {}, 31 | "type": "ApiConnection" 32 | } 33 | }, 34 | "contentVersion": "1.0.0.0", 35 | "outputs": {}, 36 | "parameters": { 37 | "$connections": { 38 | "defaultValue": {}, 39 | "type": "Object" 40 | } 41 | }, 42 | "triggers": { 43 | "When_a_new_tweet_appears": { 44 | "inputs": { 45 | "host": { 46 | "connection": { 47 | "name": "@parameters('$connections')['twitter']['connectionId']" 48 | } 49 | }, 50 | "method": "get", 51 | "path": "/onnewtweet", 52 | "queries": { 53 | "searchQuery": "" 54 | } 55 | }, 56 | "splitOn": "@triggerBody()?['value']", 57 | "recurrence": { 58 | "frequency": "Minute", 59 | "interval": 3 60 | }, 61 | "type": "ApiConnection" 62 | } 63 | } 64 | }, 65 | "connectionReferences": { 66 | "twitter": { 67 | "connection": { 68 | "id": "" 69 | }, 70 | "api": { 71 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/twitter" 72 | } 73 | }, 74 | "sharepointonline": { 75 | "connection": { 76 | "id": "" 77 | }, 78 | "api": { 79 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/sharepointonline" 80 | } 81 | } 82 | }, 83 | "apiSummaries": [ 84 | { 85 | "type": "apiconnection", 86 | "displayName": "${Resources.TWITTER}", 87 | "iconUri": "https://logicappsresources.blob.core.windows.net/icons/twitter.png", 88 | "brandColor": "#5fa9dd" 89 | }, 90 | { 91 | "type": "apiconnection", 92 | "displayName": "${Resources.SHAREPOINT}", 93 | "iconUri": "https://logicappsresources.blob.core.windows.net/icons/sharepoint.png", 94 | "brandColor": "#036C70" 95 | } 96 | ], 97 | "changedTime": "2017-07-05T00:00:45.000Z", 98 | "createdTime": "2017-01-31T00:00:45.000Z", 99 | "popularity": 18 100 | } 101 | } -------------------------------------------------------------------------------- /templates/twitter-to-smtp.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "/providers/Microsoft.Logic/galleries/public/templates/8fb6dccf96fc4039b8d26068dbd214af", 3 | "type": "Microsoft.Logic/galleries/templates", 4 | "name": "8fb6dccf96fc4039b8d26068dbd214af", 5 | "properties": { 6 | "author": { 7 | "displayName": "Microsoft" 8 | }, 9 | "categoryNames": [ 10 | "social" 11 | ], 12 | "description": "${Resources.TEMPLATE_TWITTER_TO_SMTP_DESCRIPTION}", 13 | "displayName": "${Resources.TEMPLATE_TWITTER_TO_SMTP_DISPLAYNAME}", 14 | "galleryName": "public", 15 | "summary": "", 16 | "definition": { 17 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", 18 | "actions": { 19 | "Send_Email": { 20 | "inputs": { 21 | "body": { 22 | "Body": "@{triggerBody()['RetweetCount']}\n@{triggerBody()['TweetText']}\n@{triggerBody()['TweetedBy']}\n@{triggerBody()?['CreatedAt']}", 23 | "Subject": "Twitter: @{triggerBody()['TweetText']}" 24 | }, 25 | "host": { 26 | "connection": { 27 | "name": "@parameters('$connections')['smtp']['connectionId']" 28 | } 29 | }, 30 | "method": "post", 31 | "path": "/SendEmail" 32 | }, 33 | "runAfter": {}, 34 | "type": "ApiConnection" 35 | } 36 | }, 37 | "contentVersion": "1.0.0.0", 38 | "outputs": {}, 39 | "parameters": { 40 | "$connections": { 41 | "defaultValue": {}, 42 | "type": "Object" 43 | } 44 | }, 45 | "triggers": { 46 | "When_a_new_tweet_appears": { 47 | "inputs": { 48 | "host": { 49 | "connection": { 50 | "name": "@parameters('$connections')['twitter']['connectionId']" 51 | } 52 | }, 53 | "method": "get", 54 | "path": "/onnewtweet", 55 | "queries": { 56 | "searchQuery": "" 57 | } 58 | }, 59 | "splitOn": "@triggerBody()?['value']", 60 | "recurrence": { 61 | "frequency": "Minute", 62 | "interval": 3 63 | }, 64 | "type": "ApiConnection" 65 | } 66 | } 67 | }, 68 | "connectionReferences": { 69 | "twitter": { 70 | "connection": { 71 | "id": "" 72 | }, 73 | "api": { 74 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/twitter" 75 | } 76 | }, 77 | "smtp": { 78 | "connection": { 79 | "id": "" 80 | }, 81 | "api": { 82 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/smtp" 83 | } 84 | } 85 | }, 86 | "apiSummaries": [ 87 | { 88 | "type": "apiconnection", 89 | "displayName": "${Resources.TWITTER}", 90 | "iconUri": "https://logicappsresources.blob.core.windows.net/icons/twitter.png", 91 | "brandColor": "#5fa9dd" 92 | }, 93 | { 94 | "type": "apiconnection", 95 | "displayName": "${Resources.SMTP}", 96 | "iconUri": "https://logicappsresources.blob.core.windows.net/icons/smtp.png", 97 | "brandColor": "#e75300" 98 | } 99 | ], 100 | "changedTime": "2017-07-05T00:00:42.000Z", 101 | "createdTime": "2017-01-31T00:00:42.000Z", 102 | "popularity": 15 103 | } 104 | } -------------------------------------------------------------------------------- /tools/powerapps-swagger-generator/generateSwagger.ps1: -------------------------------------------------------------------------------- 1 | Param( 2 | [string]$subscriptionId = "<>", 3 | [string]$resourceGroup = "<>", 4 | [string]$logicAppName = "<>", 5 | [string]$triggerName = "<>" 6 | ) 7 | 8 | Function Get-Folder() 9 | { 10 | 11 | 12 | [System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms") 13 | 14 | $foldername = New-Object System.Windows.Forms.FolderBrowserDialog 15 | $foldername.rootfolder = "MyComputer" 16 | 17 | if($foldername.ShowDialog() -eq "OK") 18 | { 19 | $folder += $foldername.SelectedPath 20 | } 21 | return $folder 22 | } 23 | 24 | Login-AzureRmAccount -SubscriptionId $subscriptionId 25 | $folder = Get-Folder 26 | $filePath = $folder.GetValue(1) + "\" + $logicAppName + ".swagger.json" 27 | Invoke-AzureRmResourceAction -ResourceType "Microsoft.Logic/workflows" -ResourceGroupName $resourceGroup -ResourceName $logicAppName -Action listSwagger -ApiVersion "2016-06-01" -Force | ConvertTo-Json -Depth 99 | Out-File $filePath 28 | $triggerResourceName = $logicAppName + "/$triggerName" 29 | $callbackUrl = Invoke-AzureRmResourceAction -ResourceType "Microsoft.Logic/workflows/triggers" -ResourceGroupName $resourceGroup -ResourceName $triggerResourceName -Action listCallbackURL -ApiVersion "2016-06-01" -Force 30 | Write-Output "`n`n`nWrote file to $filePath`n`n" 31 | $URL = [System.Web.HttpUtility]::ParseQueryString($callbackUrl.value) 32 | Write-Output $callbackUrl.method $callbackUrl.value 33 | $sp = $URL.GetValues('sp') 34 | $sv = $URL.GetValues('sv') 35 | $sig = $URL.GetValues('sig') 36 | Write-Output "`n`n sp = $sp `n`n sv = $sv `n`n sig = $sig `n`n api-version = 2016-06-01" 37 | --------------------------------------------------------------------------------