cancel
Showing results for 
Search instead for 
Did you mean: 

Building an AI Agent with SnapLogic AgentCreator using OpenAI and Microsoft Teams - Part 2

j_angelevski
Contributor III

Integrating the AI Agent with Microsoft Teams via Azure Bot Service

The first part covered the creation of our agent's architecture using SnapLogic pipelines and AgentCreator. Now, we focus on connecting that pipeline to Microsoft Teams so end users can chat with it. This involves creating and configuring the Azure Bot Service as a bridge between Teams and our SnapLogic pipelines. We will walk through the prerequisites and setup.

Prerequisites for the Azure Bot Integration

To integrate the SnapLogic agent with Teams, ensure you have the following prerequisites in place:

  • SnapLogic AgentCreator and pipelines: A SnapLogic environment where AgentCreator is enabled. The Weather Agent pipelines can be used as a working example. You’ll also need to create the AgentDriver pipeline as a Triggered Task ( to obtain an endpoint URL accessible by the bot ).
  • SnapLogic OAuth2 Account: An OAuth2 Account which will be used in an HTTP Client to send the assistant response back to the user. Also used for simulating "typing" indicator in Teams chat between tool usage.
  • Microsoft 365 Tenant with Teams: Access to a Microsoft tenant where you have permission to register applications and upload custom Teams apps. You’ll need a Teams environment to test the bot ( this could be a corporate tenant or a developer tenant ).
  • Azure Subscription: An Azure account with an active subscription to create resources ( specifically, an Azure Bot Service ). Also, ensure you have the Azure Bot Channels Registration or Azure Bot resource creation rights.
  • Azure AD App Registration: Credentials for the bot. We will register an application in Azure Active Directory to represent our bot ( this provides a Client ID and Client Secret that will be used by the Bot Service to authenticate ).
  • Azure Bot Service resource: We will create an Azure Bot which will tie together the app registration and our messaging endpoint, and allow adding Teams as a channel.

Register an App in Azure AD for the Bot

The first step is to register an Azure AD application that will identify our bot and provide authentication to Azure Bot Service and Teams.

  1. Create App registration: In the Azure Portal, navigate to Azure Active Directory > App Registrations and click "New registration". Give the app a name. For supported account types, you can choose "Accounts in this organizational directory only" ( Single tenant ) for simplicity, since this bot is intended for your organization’s Teams. You do not need to specify a Redirect URI for this scenario.
    j_angelevski_8-1748987254050.png
    j_angelevski_9-1748987339742.png
  2. Finalize registration: Click Register to create the app. Once created, you’ll see the Application ( Client ) ID – copy this ID, as we’ll need it later as the Bot ID and in the OAuth2 account.
  3. Create a client secret: In your new app’s overview, go to Certificates & secrets. Click "New client secret" to generate a secret key. Give it a description and a suitable expiration period. After saving, copy the Value of the client secret ( it will be a long string ). Save this secret somewhere secure now – you won’t be able to retrieve it again after you leave the page. We’ll provide this secret to the Bot Service so it can authenticate as this app and we will also use it in the OAuth2 account in SnapLogic.
    j_angelevski_10-1748987442822.png
  4. Gather Tenant ID: Since we chose a single-tenant app, we’ll also need the Azure AD tenant ID. You can find this in Overview of the app. Copy the tenant ID as well for later use.

At this point, you should have:

  • Client ID ( application ID ) for the bot and the OAuth2 account
  • Client secret for the bot ( stored securely ) and the OAuth2 account
  • Tenant ID of our Azure AD

These will be used when setting up the Azure Bot Service so that it knows about this app registration.

Create an OAuth2 account

Now that we have the client id, client secret and tenant id all gathered from the app registration, we can create the OAuth2 account which will be used in an HTTP Client snap that will send the "typing" indicator as well as the response from the agent.

  1. Navigate to the "Manager" tab and locate your project folder where the agent pipelines are stored
  2. On the right side, click on the "+" icon to create a new account
  3. Choose "API Suite > OAuth2 Account"
    j_angelevski_6-1748986336548.png
  4. Populate the client id and client secret values from your app registration process
  5. Check the 'Send client data as Basic Auth header' and 'Header authenticated' settings
  6. Populate the authorization and token endpoints
    1. OAuth2 authorization endpoint: https://login.microsoftonline.com/<TENANT_ID>/oauth2/v2.0/authorize
    2. Oauth2 token endpoint: https://login.microsoftonline.com/<TENANT_ID>/oauth2/v2.0/token
  7. Change the "Grant type" to "client_credentials
  8. Add scope to both "Token endpoint config" and "Authorization endpoint config", the scope in our case is the following: https://api.botframework.com/.default
  9. Check "Auto-refresh token"
  10. Click "Authorize", if everything was set correctly on the previous step you should get redirected back to SnapLogic with a valid access token


Example of an already configured OAuth2 account
j_angelevski_7-1748986785478.png

 

 

Create the Azure Bot Service and Connect to SnapLogic

With the Azure AD app ready, we can create the actual bot resource that will connect to Teams and our SnapLogic endpoint:

  1. Add Azure Bot resource: In the Azure Portal, search for "Azure Bot" Service and select Azure Bot. Choose Create to make a new Bot resource.

    j_angelevski_11-1748987531725.png
  2. Configure Bot Settings: On the creation form, fill in:

    • Bot handle: A unique name for your bot.

    • Subscription and Resource Group: Select your Azure subscription and a resource group to contain the bot resource.

    • Location: Pick a region.

    • Pricing tier: Choose the Free tier if ( F0 ) – it’s more than sufficient for development and basic usage.

    • Microsoft App ID: Here, reuse the existing App Registration we created. There should be an option to choose an existing app – provide the Client ID of the app registration. This links the bot resource to our AD app.

    • App type: Select Single Tenant since our app registration is single-tenant.

    • You might also need to provide the App secret ( Client Secret ) for the bot here during creation.

  3. Create the Bot: Click Review + create and then Create to provision the bot service. Azure will deploy the bot resource. Once completed, go to the resource’s page.

    j_angelevski_12-1748987563071.png
  4. Configure messaging endpoint: This is a crucial step – we must point the bot to our SnapLogic pipeline. In the Azure Bot resource settings, find the Settings menu and navigate to Configuration. Populate the field for Messaging endpoint ( the URL that the bot will call when a message is received ). Here, paste the Trigger URL of your WeatherAgent_AgentDriver pipeline.

    • To get this URL: In SnapLogic, you would have already created the AgentDriver pipeline as a Triggered Task. That generates an endpoint URL:

https://elastic.snaplogic.com/api/1/rest/slschedule/<org>/<proj>/WeatherAgent_AgentDriver
  • Example endpoint with an appended authorization query param as bearer_token:

https://elastic.snaplogic.com/api/1/rest/slschedule/myOrg/WeatherProject/WeatherAgent_AgentDriver?bearer_token=<bearer token>
  • Enter the URL exactly as given by SnapLogic + Bearer token value

  • Save the configuration. Now, when the Teams user messages the bot, Azure will send an HTTPS POST to this SnapLogic URL.

    j_angelevski_13-1748987832369.png
  • Add Microsoft Teams channel: Still in the Azure Bot resource, go to Channels. Add a new channel and select Microsoft Teams. This step registers the bot with Teams so that Teams clients can use it.

    j_angelevski_14-1748987845524.png

Now our bot service is set up with the SnapLogic pipeline as its backend. The AgentDriver pipeline is effectively the bot’s webhook. The Azure Bot resource handles authentication with Teams and will forward user messages to SnapLogic and relay SnapLogic’s responses back to Teams.

Packaging the bot for Teams ( App manifest )

At this stage, the bot exists in Azure, but to use it in Teams we need to package it as a Teams app, especially if we want to share it within the organization. This involves creating a Teams app manifest and icons, then uploading it to Teams.

  1. Prepare the Teams app manifest: The manifest is a JSON file describing your Teams app ( the bot ). Microsoft provides a schema for this but you can download the manifest file from this example, make sure you replace the <APP ID> placeholders within it. The manifest file consists of:
    • App ID: Use the Bot’s App ID ( Client ID of the registered app )
    • App name, description: The name of Teams app, example "SnapLogic Agent".
    • Icons: Prepare two icon images for the bot – typically a color icon ( 192x192 PNG ) and an outline icon ( 32x32 PNG ). These will be used as the agent's avatar and in the Teams app catalog.
    • The manifest may also include information like developer info, version number, etc.
    • If using the Teams Developer Portal, it can guide you through filling these fields and will handle the JSON for you. Just ensure the Bot ID and scopes are correctly set.
  2. Combine manifest and icons: Once your manifest file and icons are ready, put all three into a .zip file. For example, a zip containing:
    • manifest.json
    • icon-color.png ( 192x192 )
    • icon-outline.png ( 32x32 )
    • Make sure the JSON inside the zip references the icon file names exactly as they are.
  3. Upload the app to Teams: In Microsoft Teams, go to Apps > Manage your apps > Upload a custom app. Upload the zip file. Teams should recognize it as a new app. When added, it essentially registers the bot ID with the Teams client.
    j_angelevski_15-1748988355156.png
    j_angelevski_16-1748988369587.png
  4. Test in Teams: Open a chat with your Weather Agent in Teams ( it should appear with the name and icon you provided ). Type a message, like "Hi" or a weather question: "What's the weather in New York?" The message will go out to Azure, which will call SnapLogic’s endpoint. The SnapLogic pipelines will run through the logic ( as described in in the first part ) and Azure will return the bot’s reply to Teams. You should see the bot’s answer appear in the chat. If you see the bot typing indicator first and then the answer, everything is working as expected!

Initial message and a response from the agent
j_angelevski_17-1748988382929.png
Typing indicator as showcased during agent execution
j_angelevski_18-1748988430317.png

Agent response after using the available tools
j_angelevski_19-1748988520594.png

Now the Weather Agent is fully functional within Teams. It’s essentially an AI-powered chat interface to a live weather API, all orchestrated by SnapLogic in the background.

Benefits of SnapLogic and Teams for Conversational Agentic Interfaces

Integrating SnapLogic AgentCreator with Microsoft Teams via Azure Bot Service has several benefits:

  • Fast prototyping: You can go from idea to a working bot in a very short time. There’s no need to write custom bot code or host a web service – SnapLogic pipelines become your bot logic. In our example, building a weather query bot is as simple as wiring up a few Snaps and APIs. This accelerates development and allows quick iteration. Business users or integration developers can prototype new AI agents rapidly, responding to evolving needs without a heavy software development cycle.
  • No-code integration and simplicity: SnapLogic provides out-of-the-box connectors to hundreds of systems and services. By using SnapLogic as the engine, your bot can tap into any of these with minimal effort. Want a bot that not only gives weather but also looks up flight data or CRM info? It’s just another pipeline. The AgentCreator framework handles the AI part, while the SnapLogic platform handles the integration part ( connecting to external APIs and data sources ). This synergy makes it simple to create powerful bots that perform real actions – far beyond what an LLM alone could do. And it’s all done with low/no-code configuration.
  • Enhanced user experience: Delivering automation through a conversational interface in Teams meets users where they already collaborate. There’s no new app to learn – users simply chat with a bot as if they’re chatting with a colleague.
  • Reusability: The modular design of the pipelines in the weather agent can be a template for other agents by swapping out the tools and prompts. The integration pattern remains the same. This showcases the reusability of the AgentCreator approach across various use cases.

Conclusion

By combining SnapLogic’s generative AI integration capabilities with Microsoft’s bot framework and Teams, we created a powerful AI Agent without writing any code at all. We used SnapLogic AgentCreator snaps to handle the AI reasoning and tool calling, and used Azure Bot Service to connect that logic to a Microsoft Teams.

The real win is how quickly and easily this was achieved. In a matter of days or even hours, an enterprise can prototype a conversational AI agent that ties into live data and services. The speed of development, combined with the secure and integration into everyday platforms like Teams, delivers real business value.

In summary, SnapLogic and Teams enables a new class of enterprise applications: ones that talk to you, using AI to bridge human requests to automated actions. The Weather Agent is a simple example, but it highlights how fast prototyping, integration simplicity, and enhanced user experience come together. I encourage you to try building your own SnapLogic Agent – whether it’s for weather, workflows, or anything else – and unleash the power of conversational AI in your organization. Happy integrating, and don’t forget your umbrella if the Weather Agent says rain is on the way!

AgentCreator

0 REPLIES 0