- Recipes
- Send SMS using Vonage API with SAP HANA Cloud information
Connect SAP HANA Cloud and Send SMS using Vonage API in our serverless environment
Use this template to Read rows from SAP HANA Cloud using them to send SMS using Vonage API.
Share
Read rows from SAP HANA Cloud
Used integrations:
JavaScript
Python
class SapHanaSourceSelect {
async init() {
// TODO: Create your SAP HANA credential:
// More info at https://yepcode.io/docs/integrations/sap-hana#credential-configuration
this.conn = yepcode.integration.sapHana('your-sap-hana-credential-name')
}
async fetch(publish, done) {
// TODO: Customize your sql query
// https://help.sap.com/docs/SAP_HANA_CLIENT/f1b440ded6144a54ada97ff95dac7adf/a5c332936d9f47d8b820a4ecc427352c.html?locale=en-US
const sql = 'SELECT * FROM your_table';
const rows = this.conn.exec(sql);
for (const row of rows) {
await publish(row);
}
done();
}
async close() {
this.conn.disconnect();
}
}
class SapHanaSourceSelect:
def setup(self):
# TODO: Create your SAP HANA credential:
# More info at https://yepcode.io/docs/integrations/sap-hana#credential-configuration
self.conn = yepcode.integration.sap_hana('your-sap-hana-credential-name')
def generator(self):
# TODO: Customize your sql query
# https://help.sap.com/docs/SAP_HANA_CLIENT/f1b440ded6144a54ada97ff95dac7adf/3b89755ceec042e5919313b40acf8794.html?locale=en-US
cursor = self.conn.cursor()
cursor.execute("SELECT * FROM your_table WHERE ID BETWEEN ? AND ?", (2, 3))
for row in cursor:
yield row
cursor.close()
def close(self):
self.conn.close()
Do you need help solving this integration with YepCode?
Let's talkSend SMS using Vonage API
Used integrations:
JavaScript
Python
class HttpTargetVonageSendSms {
async init() {}
async consume(item) {
// TODO: Customize your request checking the API documentation:
// https://developer.vonage.com/api/sms?theme=dark
await axios.post("https://rest.nexmo.com/sms/json", {
from: "yepcode.io",
to: item.to,
text: item.text,
// TODO Create the env variables here to store securely your keys: https://yepcode.io/docs/processes/team-variables
api_key: yepcode.env.VONAGE_API_KEY,
api_secret: yepcode.env.VONAGE_API_SECRET,
});
}
async close() {}
}
import requests
class HttpTargetVonageSendSms:
def setup(self):
pass
def consume(self, generator, done):
for item in generator:
self.process(item)
done()
def process(self, item):
# TODO: Customize your request checking the API documentation:
# https://developer.vonage.com/api/sms?theme=dark
requests.post(
"https://rest.nexmo.com/sms/json",
data={
"from": "yepcode.io",
"to": item["to"],
"text": item["text"],
# TODO Create the env variables here to store securely your keys: https://yepcode.io/docs/processes/team-variables
"api_key": yepcode.env.VONAGE_API_KEY,
"api_secret": yepcode.env.VONAGE_API_SECRET,
},
)
def close(self):
pass
FAQs
YepCode is a SaaS platform that allows to create, execute and monitor integrations and automations using source code in a serverless environment.
We like to call it the Zapier for developers, since we bring all the agility and benefits of NoCode tools (avoid server provisioning, environment configuration, deployments,...), but with all the power of being able to use a programming language like JavaScript or Python.
These recipes are a good starting point for you to build your own YepCode processes and solve your integration and automation problems.
You only have to fill the sign up form and your account will be created with our FREE plan (no credit card required).
YepCode has been created with a clear enterprise approach (multi-tenant environment, team management, high security and auditing standards, IdP integrations, on-premise options,...) so we can be the Swiss army knife of any team of engineering, especially those that need to extract or send information to external systems, and where a certain dynamism or adaptation to change is necessary in that process.
Sure! You just need to do some configuration to allow YepCode servers to connect to that service. Check our docs page to get more information.