- Visão geral
- Adobe Sign
- Alteryx
- Amazon Comprehend
- Amazon Connect
- Amazon Rekognition
- Amazon Textract
- Box
- Notas de versão
- Sobre o pacote de atividades Box
- Corrigir XAML após atualização do pacote
- Compatibilidade do projeto
- Configuração
- Referências técnicas
- Box Scope
- Commit Session
- Create File Version Session
- Create Upload Session
- Upload Part
- Delete Old Version
- Get Versions
- Promote Version
- Upload File Version
- Copy File
- Delete File
- Download File
- Get File Comments
- Get File Info
- Get File Info Details
- Get File Lock Info
- Lock File
- Move File
- Unlock File
- Fazer upload do arquivo
- Copy Folder
- Create Folder
- Delete Folder
- Get Folder Info
- Get Folder Items
- Rename Folder
- Search For Content
- Executar Método
- Cognitivo
- DocuSign
- Notas de versão
- Sobre o pacote de atividades DocuSign
- Compatibilidade do projeto
- Configuração
- DocuSign Scope
- Invoke DocuSign Operation
- Create Envelope
- Create Envelope And Send
- Create Envelope From Template
- Create Envelope Recipients
- Get Document
- Get Documents
- Get Envelope
- Get Form Data
- Send Envelope
- Update Envelope
- List Attachments
- List Custom Fields
- List Documents
- List Envelope Status Changes
- List Recipients
- Create Bulk Send List
- Create Bulk Send Request
- Get Bulk Send List
- Get Bulk Send Lists
- Create Template Custom Fields
- Create Template Recipients
- Get Template
- List Templates
- Google Vision
- Jira
- Notas de versão
- Sobre o pacote de atividades Jira
- Compatibilidade do projeto
- Configuração
- Jira Scope
- Executar Método
- Add Attachment
- Delete Attachment
- Download Attachment
- Get Attachments
- Add Comment
- Delete Comment
- Get Comments
- Create Component
- Delete Component
- Get Components
- Search Dashboards
- Create Filter
- Get Filters
- Create Issue Link
- Delete Issue Link
- Get Issue Link Types
- Get Issue Links
- Add Watcher
- Assign Issue
- Clone Issue
- Create Issue
- Delete Issue
- Get Issue
- Get Watchers
- Remove Watcher
- Search Issues Using JQL
- Transition Issue
- Update Issue
- Create Project
- Delete Project
- Get Project Types
- Get Projects
- Update Project
- Get Transitions
- Create User
- Delete User
- Find Users
- Marketo
- Microsoft Dynamics
- Microsoft Dynamics Finance and Operations
- Microsoft Teams
- Notas de versão
- Compatibilidade do projeto
- Configuração
- Escopo do Microsoft Teams
- Criar Equipe
- Create Team from Group
- Obter equipe
- Obter equipes
- Criar canal
- Excluir canal
- Obter canal
- Obter canais
- Canal de Atualização
- Obter chat
- Obter chats
- Obter membros do chat
- Get message
- Get Messages
- Obter respostas de mensagem
- Reply To Message
- Enviar mensagem
- Create Event
- Delete Event
- Obter evento
- Obter eventos
- Obter presença do usuário
- Microsoft Translator
- Microsoft Vision
- Oracle Integration Cloud
- Sobre o pacote de atividades Oracle Integration Cloud
- Compatibilidade do projeto
- Configuração
- Referências técnicas
- Escopo do Processo Oracle
- Obter instâncias do processo
- Obter Instância do Processo
- Iniciar Processo
- Atualizar estado da instância do processo
- Adicionar Comentário da Instância do Processo
- Obter anexos de instância do processo
- Download Attachment
- Obter Tarefas
- Get Task
- Tarefa de Ação
- Reatribuir Tarefa
- Add Task Comment
- Obter anexos de tarefas
- Obter responsáveis pela tarefa
- Oracle NetSuite
- Salesforce
- Notas de versão
- Sobre o pacote de atividades Salesforce
- Compatibilidade do projeto
- Configuração
- Início rápido
- Escopo do Aplicativo Salesforce
- Create Bulk API Job
- Get Bulk API Job
- Get Bulk API Job Results
- Start or Abort Bulk API Job
- Assign File
- Download File
- Fazer upload do arquivo
- Composite Request
- Excluir Registro
- Obter Registros da Exibição de Lista
- Get Record
- Insert Record
- Update Record
- Upsert Record
- Execute Report
- Execute SOQL
- Format Column Names
- Formatar Rótulos e Valores
- Lightning REST API Request
- Pesquisar
- SAP BAPI
- ServiceNow
- Slack
- Smartsheet
- Notas de versão
- Sobre o pacote de atividades Smartsheet
- Compatibilidade do projeto
- Configuração
- Referências técnicas
- Início rápido: trabalhando com linhas
- Smartsheet Application Scope
- Anexar arquivo
- Attach URL
- Delete Attachment
- Get Attachment
- List Attachments
- Add Comment
- Delete Comment
- Get Comment
- List Discussions
- Copy Folder
- Create Folder
- Delete Folder
- Get Folder
- List Folders
- Add Group Members
- Get Group
- List Groups
- Remove Group Member
- Get Report
- List Reports
- Adicionar linhas
- Copy Rows
- Create Discussion on Row
- Delete Rows
- Get Row
- List Rows
- Move Rows
- Update Rows
- Copiar Planilha
- Create Sheet
- Create Sheet From Template
- Download Sheet
- Get Sheet
- List Sheets
- Update Sheet
- Adicionar Usuário
- Get User
- List Users
- Remover Usuário
- Copy Workspace
- Create Workspace
- List Workspaces
- Import Sheet from CSV / XLSX
- Invoke Smartsheet Operation
- Search Activity
- Send via Email
- Share Object
- SuccessFactors
- Tableau
- Twilio
- Workato
- Workday
Atividades de integrações clássicas
Visão geral
O objetivo deste guia é ajudar você a criar uma amostra de trabalho que usa as seguintes atividades do ServiceNow:
- Inserir Registro do ServiceNow
- Add Attachment
- Download Attachment
- Delete Attachment
- Get ServiceNow Record
- Delete ServiceNow Record
Este exemplo de trabalho permite que você verifique rapidamente a conexão com sua instância do ServiceNow e se familiarize com os tipos de dados de entrada/saída da atividade.
Depois de concluir as etapas deste guia, você terá uma sequência de automação que faz o seguinte:
-
Estabelece uma conexão com sua instância do ServiceNow (Escopo do ServiceNow).
-
Cria um novo incidente do ServiceNow (Inserir Registro do ServiceNow).
-
Carrega um arquivo para o novo incidente (Adicionar anexo).
-
Baixa o arquivo carregado para uma pasta local (Baixar anexo).
-
Exclui o arquivo carregado (Delete Attachment).
-
Verifica se o arquivo foi excluído ao tentar recuperar o registro do anexo e gerar a mensagem de erro esperada (Get ServiceNow Record, If).
-
Exclui o incidente criado (Delete ServiceNow Record).
Pré-requisitos
Antes de você começar:
- Conclua as etapas de Configuração do ServiceNow.
- Um arquivo local para anexar a um registro do ServiceNow.
Etapas
Crie seu projeto
-
Adicione uma atividade.
-
Enter the AssetName for the credential asset you created (during the Setup) for your ServiceNow instance username and password (e.g., "ServiceNowSignin").
-
Create and enter a
SecureStringvariable for your Password value (e.g., password). -
Create and enter a
Stringvariable for your Username value (.e.g, username). -
Add a second Get Credential activity.
-
Enter the AssetName for the credential asset you created (during the Setup) for your ServiceNow instance Client Id and Client Secret (e.g., "ServiceNowClients").
-
Create and enter a
SecureStringvariable for your Password value (e.g., clientSecret). -
Create and enter a
Stringvariable for your Username value (.e.g, clientId). -
Adicione a atividade ServiceNow Scope após as duas atividades Get Credential .
-
In the Client Secret property, enter the
SecureStringvariable you created for your Client Secret in the steps above (e.g., clientSecret). -
In the Client Id property, enter the
Stringvariable you created for your Client Id (e.g., clientId). -
In the Password property, enter the
SecureStringvariable you created for your password in the steps above (e.g., password). -
In the Username property, enter the
Stringvariable you created for your username (e.g., clientId). -
Create and enter a
Stringvariable for your EndpointURL (e.g., endpointURL) -
Adicione a atividade Insert ServiceNow Record dentro da atividade ServiceNow Scope .
-
Clique no botão Configurar dentro da atividade Insert ServiceNow Record (isso abre o Assistente de Objetos.
-
In Select Object drop-down list, select Incident.
-
Create and enter a
Stringvariable for the sys_id Value (e.g., sysID) -
Using the Add Single Field textbox, enter short_description.
- Enter a short_description Value (e.g., "UiPath-Attachment").
-
Click Done.
-
Create and enter a
ResponseStatusvariable for the ServiceNowStatus value (e.g., insertRecordResponse). -
Adicione uma atividade após a atividade Insert ServiceNow Record .
-
Enter the following Text: "Record created: "+insertRecordResponse.Success.ToString+" | sys_id: "+sysID (where sysID is the variable created for the sys_id Value field above).
-
Adicione a atividade Add Attachment após a atividade Write Line .
-
Click the Configure button inside the Add Attachment activity.
-
In the Select Object drop-down list, select Incident.
-
In the FileName property, enter the full path to your local file (e.g., "C:\UiPath_Projects\DemoFile.docx") or click the Choose File button in the activity.
-
In the ObjectSysId property, enter the sys_id variable you created for the Insert Record activity (e.g., sysID)
-
Create and enter a
Stringvariable for the AttachmentId property (e.g., attachmentId). -
Create and enter a
ResponseStatusvariable for the ServiceNowStatus value (e.g., addAttachmentResponse). -
Adicione uma atividade após a atividade Insert ServiceNow Record .
-
Enter the following Text: "Attachment added: "+addAttachmentResponse.Success.ToString+ " | sys_id: "+attachmentId (where attachmentId is the variable created for the AttachmentId property above).
-
Adicione a atividade Download Attachment após a atividade Write Line .
-
Enter the FilePath where you want to download the file (e.g., "C:\UiPath_Projects\Downloads").
-
In the SysId property, enter the AttachmentId variable you created for the Add Attachment activity (e.g., attachmentId).
-
Adicione a atividade Delete Attachment após a atividade Download Attachment .
-
In the ObjectSysId property, enter the AttachmentId variable you created for the Add Attachment activity (e.g., attachmentId).
Teste seu projeto
-
Adicione a atividade Get ServiceNow Record após a atividade Delete Attachment .
-
Click the Configure button inside the Insert ServiceNow Record activity.
-
In the Select Object drop-down list, select Attachment.
-
In the sys_id Value field, enter the AttachmentId variable you created for the Add Attachment activity (e.g., attachmentId)
-
Click Done.
-
Create and enter a
ResponseStatusvariable for the ServiceNowStatus value (e.g., getRecordResponse). -
Adicione uma atividade após a atividade Get ServiceNow Record .
-
In the Condition property, enter getRecordResponse.Success=False And getRecordResponse.Message.Contains("No Record") to determine if the attachment record was successfully deleted by checking the error message (where getRecordResponse is the variable your created for the ServiceNowStatus property above).
-
In the Then statement box, add a Write Line activity.
- In the Text property, enter "Test passed: "+getRecordResponse.Message.
- Adicione a atividade Delete ServiceNow Record após a atividade Write Line .
- Click the Configure button inside the Add Attachment activity.
- In the Select Object drop-down list, select Incident.
- In the Id property, enter the sys_id variable you created for the Insert Record activity (e.g., sysID).
- Create and enter a
ResponseStatusvariable for the ServiceNowStatus value (e.g., deleteRecordResponse).
-
Add a Write Line activity after the Delete ServiceNow Record activity.
- Na propriedade Text , insira "Record excluído: "+deleteRecordResponse.Success.ToString.
-
In the Else statement box, add a Write Line activity.
- In the Text property, enter "Test failed: "+getRecordResponse.Message.
-
Click Run and verify the Output window includes the expected write line values.
Está feito!
Para saber mais sobre as atividades do ServiceNow (incluindo exemplos de entradas/saídas de propriedades), consulte a página Atividades para uma lista completa de atividades e links para as páginas de detalhes das atividades.