Да пожалуйста) Копируй и вставляй. В Credentials меняешь мыло, пароль и название компании. Запускаешь.
Нода GetId получает id компании
Нода Get API получает апи ключ для дальнейшей работы.
Дальше всё просто: рядом с нужными функциями копируешь curl и в http ноде вверху нажимаешь import curl и вставляешь их туда.
{
"nodes": [
{
"parameters": {},
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
-480,
0
],
"id": "5b9aa650-ec10-4d57-92f8-5bbbe54d2091",
"name": "When clicking ‘Execute workflow’"
},
{
"parameters": {
"method": "POST",
"url": "https://ru.yougile.com/api-v2/auth/companies",
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "login",
"value": "={{ $json.email }}"
},
{
"name": "password",
"value": "={{ $json.password }}"
},
{
"name": "name",
"value": "={{ $json.company_name }}"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.3,
"position": [
-48,
0
],
"id": "c874655d-c797-4923-ac5c-a25eb0aafd6b",
"name": "GetId"
},
{
"parameters": {
"method": "POST",
"url": "https://ru.yougile.com/api-v2/auth/keys",
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "login",
"value": "={{ $('Credentials').item.json.email }}"
},
{
"name": "password",
"value": "={{ $('Credentials').item.json.password }}"
},
{
"name": "companyId",
"value": "={{ $json.content[0].id }}"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.3,
"position": [
208,
0
],
"id": "63d920b3-79b5-4101-afbd-d780a76bb02f",
"name": "Get API"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "7b338396-cbc1-4eda-8e8c-64c295a87e51",
"name": "email",
"value": "Мыло",
"type": "string"
},
{
"id": "e27ce06c-7e78-4b31-b3ec-dea97f8ccde0",
"name": "password",
"value": "Пароль",
"type": "string"
},
{
"id": "9f9c199b-2c2c-4b4b-8095-c17b5004c103",
"name": "company_name",
"value": "Название компании (в ЛК нажимаешь кнопочку \"редактировать\" и копируешь название полностью",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
-272,
0
],
"id": "c4e8fcd3-8bf7-418e-a5ab-e73af615b57a",
"name": "Credentials"
}
],
"connections": {
"When clicking ‘Execute workflow’": {
"main": [
[
{
"node": "Credentials",
"type": "main",
"index": 0
}
]
]
},
"GetId": {
"main": [
[
{
"node": "Get API",
"type": "main",
"index": 0
}
]
]
},
"Credentials": {
"main": [
[
{
"node": "GetId",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {},
"meta": {
"instanceId": "d51f1a0dce196a02ccdfb5ad0d19e1722c18d6bd6ba5761944d30e1d30eaec21"
}
}