Artificial Intelligence Blogs Posts
cancel
Showing results for 
Search instead for 
Did you mean: 

This is part of the August Developer Challenge on Joule Studio.

SAP has already announced that n8n will be embedded into the managed Joule Studio environment to integrate agents with end-to-end business processes, as described in Announcing New Joule Studio for Enterprise Scale Agentic DevelopmentWe wanted you to get familiar with the tool.

 

What is n8n?

n8n is a workflow automation platform that orchestrates AI agents and business process integrations across the whole enterprise stack, as described by n8n CEO Jan Oberhauser at SAP Sapphire in May. He says the product brings 3 key things together:

  • Ability to take a customer’s SAP context to build AI agents faster
  • Ability to build simple automations or complex multi-agent workflows
  • Ability to connect SAP systems with any external system with 100s of n8n connectors

At Sapphire, SAP CEO Christian Klein announced plans to embed n8n “deeply” inside Joule Studio 2.0. See the 3-minute discussion between Klein and Oberhauser:

 

 

How n8n workflows are built

As in all workflow tools, n8n lets you define the following for a workflow:

  1. Triggers: This is what starts the flow. In n8n you can define a form, a webhook (API endpoint), a scheduler, or another workflow. You can also have your workflow triggered by a 3rd-party app.
    • n8n contains triggers based on 100s of 3rd-party apps, such as Slack, WhatsApp, CircleCI and many more.
  2. Nodes: Once your workflow is triggered, your workflow proceeds like in a flowchart through nodes you add to the canvas, much like an Integration Suite iFlow or SAP Build Process Automation process. Types of nodes:
    • Call an API: Use either the generic HTTP Request node to call an API, or one of the hundreds of specialized app nodes to call such 3rd-party apps like Google Calendar, AirTable, or Jira.
    • Flow Controls: Branch based on the data inside your workflow.
    • Data Transformation: Modify the data inside your workflow.
    • Human Review: Request approval or information from workflow stakeholders, by sending forms via such apps as Gmail, Microsoft Outlook, or WhatsApp.

 

Secret Sauce

What’s special about n8n in Joule Studio will be the available integration nodes, some coming from the basic n8n and some from SAP.

  • Connector or App Nodes: These nodes make it easy to perform activities in 100s of 3rd-party applications, such as WhatsApp, Google products like Gmail, or AirTable.

Dan_Wroblewski_0-1784724576071.png

  • SAP Nodes: The n8n inside Joule Studio is expected to have connectors to SAP tools/products to make it simple to connect to them, such as to trigger SAP Integration Suite iFlows or send messages to the SAP Task Center.

Dan_Wroblewski_0-1784726216596.png

  • Agentic Nodes: n8n has the following nodes:
    • SAP Agent: You can invoke an agent already deployed in your SAP landscape, even if it is code-based or created in some other tool.
    • AI Agent: If you need to create your own agent, you can specify instructions, tools, memory and an LLM (from SAP AI Core).

 

Example n8n Projects

Here’s 2 quick examples:

  • HR Hiring: Here’s a workflow that helps in hiring by doing a first pass on resumes. The workflow searches for resumes on a Google Drive folder, asks an AI agent to decide if the resume meets the job criteria, sends an approval email to the hiring manager, and if approved creates a Google calendar appointment with the candidate (using AI to find the next free time slot and sending an email to the candidate). The entire calendar process is hidden in a sub-workflow at bottom right.
    Dan_Wroblewski_1-1784726560438.png
  • Source-to-Pay Exception Handling: Every Monday, go through blocked invoices in SAP S/4HANA, send the invoice to an agent that tries to match the invoice, purchase order and good receipt and find the solution for blocking. Or if the problem is more complicated, use a more complex “supervisor” agent to check the contract and some more advanced parameters to solve the problem. Either way, auto-post back to SAP S/4HANA or request an approval via SAP Task Center.Dan_Wroblewski_2-1784726579106.png

Although within Joule Studio you can simply provide the your intent for the workflow and Joule Studio will create it for you, it is best to understand how n8n works and what is possible.  

What We Want You to Do

For this challenge, we just want you to get familiar with n8n and have some fun. Since the new SAP Developer Center just went live last week, we wanted to expose you to 2 small parts of it. First the Developer Advocates page:

Dan_Wroblewski_0-1786530142596.png

Second, the API page that exposes many of the underlying APIs used to build the center, including the Developer Advocates page, available at https://developers.sap.com/api-docs/.

 Dan_Wroblewski_0-1786528649550.png

You will create a workflow that:

  • Gets from you your community ID.
  • Gets the list of current Developer Advocates, using the Developer Advocates API.
  • Displays the list of advocates in a nicely formatted table.
  • Calls our special challenge CAP service so you are registered as completing the challenge. You must call that service from your n8n workflow. 

 

👉🏻Start n8n Free Trial

If you don’t have an n8n installation, you can create one here: https://app.n8n.cloud/register. No credit card is needed. The trial is available for 14 days.

Dan_Wroblewski_0-1784727004972.png

You should then open your dashboard, where you can create workflows.

 

👉🏻Build Workflow

The workflow will be simple one: to access the Developer Advocates data and display it, as well as to call our challenge CAP service so we know you have completed the challenge.

You can build the workflow in one of the following ways:

  • Completely on your own
  • Import a workflow with all but the API call to our challenge CAP service
  • Import the entire project, and you just have to run it and enter your community ID.   

NOTE: Your community ID is shown on your profile (follow the screenshot below).

Dan_Wroblewski_1-1786540700143.png

 

Build it manually

If you are adventurous, we'll let you build the workflow on your own.

We ask that you build a form-triggered workflow that requests the community ID of the user.

Dan_Wroblewski_1-1786529216496.png

Then call the Developer Advocates endpoint, https://developers.sap.com/api/advocates.

Then call the challenge CAP API, https://community-challenge.cfapps.us10.hana.ondemand.com/odata/v4/submitAnswer. You must call it as a POST, and you must pass the following JSON, with the community ID entered in the form. You must call this API from within n8n.

{
    "data": {
      "communityId": "{{ $('Form Submission').item.json['Your Community ID'] }}",
      "answer": "{{ $workflow.name }}",
      "week": "week3"
    }
}

This API will return an inspirational message.

Then create a form that displays at the top a header and the message you will receive from the challenge CAP service, then display a table with all the advocates, with their name, picture, and home town, and a button that opens in a new window the profile page of each advocate. Something like this:

Dan_Wroblewski_2-1786529827631.png

When clicking the profile, you'll get that Developer Advocates profile page.

Dan_Wroblewski_0-1786535904859.png

We will let you figure out the format of the URL for the image and profile for each Developer Advocate.

 

Import starter workflow

If you want, simply import our workflow with the entire "code" except for the HTTP Request node for calling our challenge CAP service.

Get the workflow as JSON and save as a file: Starter Workflow

To  import, first create an empty project (your UI may be slightly different).

Dan_Wroblewski_0-1786533325633.pngChange the name of the workflow, at the top of the window.

Dan_Wroblewski_1-1786533529551.png

Click the 3 dots on the right, and select Import from File, select your file, and click Save.  

Dan_Wroblewski_2-1786533887930.png

You will get the following workflow.

Dan_Wroblewski_3-1786534149709.png

The workflow will be renamed to "n8n challenge - without API". Change the name to your name, your community ID, or something else you like.

You can already run it and get the Developer Advocates info. But you still need to add an HTTP Request node to call our challenge CAP service so you can get credit for the completing this week's part of the challenge.

The details for calling the challenge API is in the previous section.

 

Import the completed workflow

If you want, here is the complete workflow. You still have to import and run, and provide your community ID.

The workflow is available here: Complete Project

Follow the instructions above to import. The workflow will be renamed to "n8n challenge". Change the name to your name, your community ID, or something else you like.

 

Want to do more?

Feel free to embellish your workflow. For example, I added a Send Email node to send an approval email, which pauses the workflow and lets the recipient click a button in the email to approve the workflow. I added an If node to check the approval, and if approved I then execute the HTTP Request. To do that, all you need is SMTP credentials to your own mail server.

Dan_Wroblewski_5-1784727514072.png

 

👉🏻Explore the Nodes

However you created the workflow, please take a few minutes to explore the built-in n8n nodes, by clicking on the plus sign inside your n8n project.

Dan_Wroblewski_0-1786853681846.png

Then browse through the nodes and get an understanding of the type of nodes there are. 

Dan_Wroblewski_1-1786853729095.png

Most interesting at the moment:

  • AI: You can essentially create an agent within your workflow.
  • Action in an app: Contains 100s of connectors to third-party apps, like Microsoft OneDrive, WhatsApp, GitHub and more. What's more, those connectors can be used as standalone nodes to retrieve or create data, or as tools within an AI agent you build inside n8n.

Later this year, hopefully you will get access to the full capabilities of Joule Studio, where you will have SAP nodes that connect your workflow to SAP apps, SAP Task Center, and all your AI agents you created and deployed elsewhere within your SAP landscape.

 

👉🏻Post Back in This Thread

Once you have created a workflow and called our challenge CAP service, please do the following:

  • A screenshot of your workflow, including all the improvements you might have made. But make sure to show the workflow name.Dan_Wroblewski_2-1786854259140.png
  • A screenshot of the list of Developer Advocates, with your community ID and unique inspirational message.
     
    Dan_Wroblewski_0-1786540463550.png
  • Finally, tell us whether you have worked with n8n, and for what types of projects. Add your impression of n8n, and how you think it will enhance Joule Studio.

We will also check that you have called our challenge CAP service from n8n with your community ID.

Good luck 😺

 

5 Comments
Labels in this area