{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/pt/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"n8n"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"n8n","__idx":0},"children":["n8n"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Etapa 1 (Obter Token):"]}," Envie o ID e o Segredo do Aplicativo para ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/oauth2/token"]}," para obter um ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["access_token"]}," temporário."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Etapa 2 (Executar Tarefa):"]}," Insira o Token no cabeçalho e construa parâmetros contendo ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["JSON em formato de string"]}," para acionar a tarefa do telefone na nuvem."]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"pré-requisitos","__idx":1},"children":["Pré-requisitos"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Antes de começar, certifique-se de ter as seguintes informações em mãos:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Credenciais da API"]}," (Obtenha no ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://id.morelogin.com/"},"children":["Painel de Controle do MoreLogin"]}," -> Gerenciamento de API):"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ID do Aplicativo"]}," (ex.: client_id)"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Chave Secreta"]}," (ex.: client_secret)"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://guide.morelogin.com/api-reference/open-api/open-api/authorization/paths/~1oauth2~1token/post"},"children":["Como obter autorização?"]}," ","2. ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["IDs de Recursos"]}," (Obtenha na lista de telefones na nuvem e no marketplace de modelos):"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ID do Telefone na Nuvem"]}," (somente numérico)"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ID do Modelo"]}," (somente numérico)"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["[Como ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://guide.morelogin.com/api-reference/open-api/open-api/cloud-phoneschedules-management/paths/~1cloudphone~1rpa~1oncetask~1save/post"},"children":["Obter?"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"importação-de-fluxo-de-trabalho-com-um-clique","__idx":2},"children":["Importação de Fluxo de Trabalho com Um Clique"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Para simplificar a configuração, incluímos um fluxo de trabalho completo de dois nós n8n. Você não precisa lidar manualmente com a passagem de tokens e o escape JSON complexo."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Basta copiar o código JSON abaixo e colá-lo (Ctrl+V) na tela do n8n:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n\"nodes\": [\n\n{\n\"parameters\": {\n\n\"method\": \"POST\",\n\n\"url\": \"https://api.morelogin.com/oauth2/token\",\n\n\"sendBody\": true,\n\n\"contentType\": \"json\",\n\n\"bodyParameters\": {\n\n\"parameters\": [\n\n{\n\"name\": \"client_id\",\n\n\"value\": \"YOUR_APP_ID_HERE\"\n\n},\n\n{\n\"name\": \"client_secret\",\n\n\"value\": \"YOUR_SECRET_KEY_HERE\"\n\n},\n\n{\n\"name\": \"grant_type\",\n\n\"value\": \"client_credentials\"\n\n}\n]\n\n},\n\n\"options\": {}\n\n},\n\n\"id\": \"step_1_auth\",\n\n\"name\": \"Etapa 1: Obter Token\",\n\n\"type\": \"n8n-nodes-base.httpRequest\",\n\n\"typeVersion\": 4.1,\n\n\"position\": [\n\n460,\n\n300\n\n]\n\n},\n\n{\n\"parameters\": {\n\"method\": \"POST\",\n\n\"url\": \"https://api.morelogin.com/cloudphone/rpa/onceTask/save\",\n\n\"sendHeaders\": true,\n\n\"headerParameters\": {\n\n\"parameters\": [\n\n{\n\n\"name\": \"Authorization\",\n\n\"value\": \"={{ 'Bearer ' + $json.data.access_token }}\"\n\n}\n\n]\n\n},\n\n\"sendBody\": true,\n\n\"contentType\": \"json\",\n\n\"bodyParameters\": {\n\n\"parameters\": [\n\n{\n\"name\": \"cloudPhoneId\",\n\n\"value\": 1234567890\n\n},\n\n\"name\": \"templateId\",\n\n\"value\": 1678347487160256\n\n},\n\n\"name\": \"scheduleName\",\n\n\"value\": \"n8n-Auto-Task\"\n\n},\n\n\"name\": \"description\",\n\n\"value\": \"Acionado via n8n\"\n\n},\n\n\"name\": \"templateParameter\",\n\n\"value\": \"={{ JSON.stringify({\\n \\\"Legenda do Vídeo\\\": \\\"Meu Vídeo de Automação\\\",\\n \\\"IA Label: true,\\n \"Product Id: 1001,\\n \"Get Leads: false,\\n \"Comment: \"Great content!\\n}) }}\"\n\n}\n\n]\n\n},\n\n\"options\": {}\n\n},\n\n\"id\": \"step_2_run_task\",\n\n\"name\": \"Step 2: Run Task\",\n\n\"type\": \"n8n-nodes-base.httpRequest\",\n\n\"typeVersion\": 4.1,\n\n\"position\": [\n680,\n\n300\n\n],\n\n\"dependencies\": {\n\n\"nodes\": [\n\n{\n\"node\": \"Step 1: Get Token\",\n\n\"type\": \"main\",\n\n\"index\": 0\n\n}\n\n]\n\n}\n\n}\n\n\"connections\": {\n\n\"Step 1: Get Token\": {\n\"main\": [\n[\n{\n\"node\": \"Etapa 2: Executar Tarefa\",\n\n\"type\": \"main\",\n\n\"index\": 0\n\n}\n\n]\n\n]\n\n}\n}\n}```\n","lang":"json"},"children":[]}]},"headings":[{"value":"n8n","id":"n8n","depth":1},{"value":"Pré-requisitos","id":"pré-requisitos","depth":2},{"value":"Importação de Fluxo de Trabalho com Um Clique","id":"importação-de-fluxo-de-trabalho-com-um-clique","depth":2}],"frontmatter":{"seo":{"title":"n8n"}},"lastModified":"2026-06-10T11:47:34.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/pt/rparobotic-process-automation/04-integration/n8n","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}