Get all values from a sheet.
auths
objectreturn
or this.key = 'value'
, pass input data to your code viaparams
, and maintain state across executions with$checkpoint.async
(event, steps) => {
}
this.msg = [{
"author": {
"name": steps.get_values.$return_value[1][1]+" wurde grad hinzugefügt!",
"url": steps.get_values.$return_value[1][0],
//"icon_url": "https://i.imgur.com/R66g1Pe.jpg"
},
"title": "Battle-Tag: "+steps.get_values.$return_value[1][8],
//"url": "https://google.com/",
//"description": "Text message. You can use Markdown here. *Italic* **bold** __underline__ ~~strikeout~~ [hyperlink](https://google.com) `code`",
"color": 0x0F9D58,
"fields": [
{
"name": "Klasse",
"value": steps.get_values.$return_value[1][3],
"inline": true
},
{
"name": "Rolle",
"value": steps.get_values.$return_value[1][4],
"inline": true
},
{
"name": "Notiz",
"value": steps.get_values.$return_value[1][13]
}
//,
//{
// "name": "Thanks!",
// "value": "You're welcome :wink:"
//}
],
//"thumbnail": {
// "url": "https://upload.wikimedia.org/wikipedia/commons/3/38/4-Nature-Wallpapers-2014-1_ukaavUI.jpg"
//},
//"image": {
// "url": "https://upload.wikimedia.org/wikipedia/commons/5/5a/A_picture_from_China_every_day_108.jpg"
//},
"footer": {
"text": "Hinzugefügt am: "+steps.get_values.$return_value[1][9],
//"icon_url": "https://i.imgur.com/fKL31aD.jpg"
}
}]
An array of embed objects. See https://birdie0.github.io/discord-webhooks-guide/discord_webhook.html
async
(params, auths) => {
}
const url = auths.discord_webhook.oauth_uid
let content = params.message
const { embeds, username, avatar_url } = params
if (!content && !embeds) {
throw new Error("This action expects a message OR an embeds param. Please enter one or the other from the params menu above")
}
return await require("@pipedreamhq/platform").axios(this, {
method: "POST",
url,
headers: {
"Content-Type": "application/json"
},
data: {
content,
embeds,
username,
avatar_url,
}
})