Functions:Helper Functions - bettyblocks/cli GitHub Wiki
Helper Functions
Functions are run within an (Isolated-vm) instance and will therefore have limited access to features you'd normally expect from within NodeJS (e.g.: http and filesystem access).
To still enable some of these functionalities, the runtime ships with a few global functions that we call 'Helper Functions'.
Connecting to the DataAPI
- gql Send queries and mutations to the DataAPI
Generate Docx files
- generateDocx Generate Docx files based on a template
HTTP(S) Requests
- fetch Used to make HTTP(S) requests. Wrapper around node-fetch
Logging
- console.log Print statements to the Application Logs. (Currently only available to internal developers)
Running actions
- runAction Running (sub) actions
Sending emails
- smtp Sending emails
SQL
- SQL Send raw SQL queries to external databases
Storing files
- storeFile Store files in the asset store
Parse data
- parseData Parse different data formats