wayne
wayne
Explore posts from servers
TTwenty
Created by wayne on 5/21/2024 in #❓︱help
Create Field
export async function main(twenty_api_key: string, campaign_name: string) {
const url = 'https://api.twenty.com/rest/metadata/fields';
const options = {
method: 'POST',
headers: {
'Accept': 'application/json',
'Authorization': `Bearer ${twenty_api_key}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"type": "TEXT",
"name": "campaign_name",
})
};
const response = await fetch(url, options);
return await response.text()
}
export async function main(twenty_api_key: string, campaign_name: string) {
const url = 'https://api.twenty.com/rest/metadata/fields';
const options = {
method: 'POST',
headers: {
'Accept': 'application/json',
'Authorization': `Bearer ${twenty_api_key}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"type": "TEXT",
"name": "campaign_name",
})
};
const response = await fetch(url, options);
return await response.text()
}
response {"statusCode":400,"message":"Unknown type "CreateOneFieldInput". Did you mean "CreateFieldInput", "DeleteOneFieldInput", "CreateOneObjectInput", "CreateObjectInput", or "UpdateFieldInput"?","error":"Bad Request"}
3 replies
TTwenty
Created by wayne on 5/21/2024 in #❓︱help
Create a field using the REST API?
It looks like it's not possible, or am I missing something?
3 replies
TTwenty
Created by wayne on 5/21/2024 in #❓︱help
Very slow response when payload incorrect
export async function main(twenty_api_key: string, data: Array) {
const url = 'https://api.twenty.com/rest/batch/people';
const options = {
method: 'POST',
headers: {
'Accept': 'application/json',
'Authorization': `Bearer ${twenty_api_key}`,
'Content-Type': 'application/json'
},
body: JSON.stringify(data[0])
};
const response = await fetch(url, options);
return await response.text()
}
export async function main(twenty_api_key: string, data: Array) {
const url = 'https://api.twenty.com/rest/batch/people';
const options = {
method: 'POST',
headers: {
'Accept': 'application/json',
'Authorization': `Bearer ${twenty_api_key}`,
'Content-Type': 'application/json'
},
body: JSON.stringify(data[0])
};
const response = await fetch(url, options);
return await response.text()
}
data =
[
{
"email": "[email protected]",
"jobTitle": "Angel Investor",
"lastName": "Koz",
"firstName": "Muenif",
"linkedinLink": {
"url": "http://www.linkedin.com/in/munifkoz",
"label": "LinkedIn"
}
}
]
data =
[
{
"email": "[email protected]",
"jobTitle": "Angel Investor",
"lastName": "Koz",
"firstName": "Muenif",
"linkedinLink": {
"url": "http://www.linkedin.com/in/munifkoz",
"label": "LinkedIn"
}
}
]
As you can see, firstname and lastname are put incorrectly. I get a 520 but it takes minutes to get back an answer
6 replies
WWindmill
Created by wayne on 5/20/2024 in #help
Call non public apps as iframes?
I naively tried that: https://www.loom.com/share/a46821e384d54a1b8b49c860b558c277 It probably doesn't work because the origin url is bluewind.ai But I am wondering if this can work. Because that would make a lot of things easy, in particular no need to have a public app
1 replies
WWindmill
Created by wayne on 5/20/2024 in #help
SSO without restricted domain?
Is there a way to do SSO but without restricted domain? This would effectively allow anyone to sign up to my windmill workspace as long as they have a google account.
9 replies
WWindmill
Created by wayne on 5/18/2024 in #help
CLI error: this.settings.reader.isTerminal is not a function
wmill workspace add bluewind bluewind https://bluewind.windmill.dev/ error: Uncaught (in promise) TypeError: this.settings.reader.isTerminal is not a function const isTty = this.settings.reader.isTerminal();
3 replies
WWindmill
Created by wayne on 4/23/2024 in #help
Can't add a variable if the input form is linked to a runnable
2 replies
WWindmill
Created by wayne on 4/22/2024 in #help
What's the cold start of python scripts in EE
Because in non EE it can be very slow. Asking because litellm is a fantastic python package and I think I will need to go enterprise for that
5 replies
WWindmill
Created by wayne on 4/19/2024 in #help
Listen to slack events using windmill
damn apparently not possible for me to setup slack to add an auth header: https://stackoverflow.com/questions/41492508/add-auth-headers-in-slacks-outgoing-webhooks How do people create flows that listen to things on slack, using windmill
8 replies