I doubt it, you don’t know what Zapier is, but for a short recap: it’s the SaaS application that “automates apps in millions of ways”. You can choose ready to implement receipts that connect and automate the most popular applications into one workflow. Set it once - and forget.
From my life example, I have a “Zap” which connects the Stripe with Slack. Each time someone buys my book (successful payment in the Stripe), I am receiving a notification on my Slack channel.
It’s not required to have any programming skills to build an integration like that. What You need to do is:
Examples can be found on the main site, https://zapier.com/.
When I started thinking about that, I saw that the same way of automation is possible using SAP Data Intelligence! SAP DI is a perfect tool for designing and implementing the automation of processes.
In this post, I want to show the steps required to implement a similar scenario using SAP Data Intelligence.
The SAP DI offers plenty of ready to use standard operators.
We can use them in the integration scenarios like:
But we will not find ready to use operators like in the Zapier. Luckily, we could build and reuse our operators using programming languages like:
My final goal is to implement integration and prepare two custom operators: first for fetching data from the Stripe, second for pushing a message to a Slack channel.
There could be multiple approaches there (no surprise). I don’t recommend that, but it will be possible to combine existing components to achieve the goal. It will work, but it wouldn’t be reusable in the other pipelines.
I propose to build a pipeline which will:
Documentations:
Stripe API Documentation: https://stripe.com/docs/api/charges/list?lang=curl
HTTP Client operator documentation: https://help.sap.com/doc/de49c012b53d476eae7af14497eac256/2.4.latest/en-US/f6619b1123794a4fb47fe9048...
It is possible to access data from the Stripe calling HTTP request with the appropriate authorization header. Let’s use the HTTP Client operator to fetch charges from the Stripe.
To correctly authorize with Stripe we have to fill the “Authorization” header parameter in an HTTP request. Unfortunately, the current version of the HTTP Client operator doesn’t allow us to do it directly in the configuration. It’s possible to pass the details to the input port named “inRequest”. I used Node Base Operator for that.
Code is straightforward, I am passing the configuration of the request as a message to the HTTP Client operator (inRequest port). I simplify that and I am getting all charges from the current date.
The Next step is to pass the message to the Slack channel. To be able to push messages, we have to create and configure the application.
Using the generated Webhook URL, we could pass the message directly to the channel. Now it’s possible to process a response from Stripe - and pass it to the next HTTP Client operator. Continue.
We could do global configuration in “Connection Management” application (HTTP Connection), which I would recomend.
Finally, we could, save and run the pipeline. After a few seconds, the message should be published on the dedicated channel.In a pipeline like that, we could schedule and run it every day, to receive a quick summary directly to team chat.
This solution will be described in the next post 🙂
Please let me know if you have any questions related to implementing custom operators or SAP DI.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
11 | |
10 | |
8 | |
7 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |