Wie schreibt man eine fehlerfreie Eingabeaufforderung?

Mit Co-Pilot für Entwickler können Sie verschiedene Varianten einer Eingabeaufforderung ausprobieren, um herauszufinden, welche davon Ihre Zwecke am besten erfüllt. Wenn die ersten Ergebnisse nicht Ihren Anforderungen entsprechen, können Sie die Automatisierung rückgängig machen oder löschen, die Eingabeaufforderung neu codieren und erneut ausführen.

Befolgen Sie diese Grundsätze, um bessere und relevantere Ergebnisse von Automation Co-Pilot zu erhalten.

Eindeutige Anweisungen schreiben

Automation Co-Pilot ist darauf ausgerichtet, Ihre Absicht anhand der von Ihnen gesendeten Anweisung (oder Eingabeaufforderung) zu erkennen. Klare und spezifische Anweisungen verringern Rätselraten und führen zu besseren Ergebnissen.

Auf die Anweisung Send Email (E-Mail senden) im Bot Editor verwendet Automation Co-Pilot das E-Mail-Befehlspaket, um diese Eingabeaufforderung auszuführen. Wenn Sie beabsichtigen, eine E-Mail mit Microsoft 365 Outlook zu senden, dann ist die korrekte Eingabeaufforderung die Aktion Send Outlook email (E-Mail per Outlook senden).

Direkt formulieren

Geben Sie direkte Anweisungen und verzichten Sie auf Bitten oder „lautes Denken“.

Anstatt beispielsweise zu sagen, „can you please help me to create an automation to send email“ (Kannst du mir bitte helfen, eine Automatisierung zum Senden einer E-Mail zu erstellen?), formulieren Sie Ihre Aufforderung so: create an automation to send email to demo@demo.com with subject 'this is a demo' (Erstelle eine Automatisierung, um eine E-Mail an demo@demo.com mit dem Betreff „dies ist eine Demo“ zu senden).

Komplexe Aktionen aufschlüsseln

Wenn das Automatisierungsszenario mehrere Schritte umfasst, unterteilen Sie es in kleinere, besser zu bewältigende Aufgaben.

Anstatt beispielsweise zu sagen, „Insert salesforce records into database and check record for email info to send email“ (Füge Salesforce Datensätze in die Datenbank ein und prüfe den Datensatz auf E-Mail-Adressen, um eine E-Mail zu senden), formulieren Sie Ihre Aufforderung so: Get records from Salesforce. For each record, insert it into the database. If the record contains an email address, send an email to demo@demo.com. If not, add a comment. If an error occurs when the bot performs these operations then show a message box. (Rufe Datensätze aus Salesforce ab. Füge jeden Datensatz in die Datenbank ein. Wenn der Datensatz eine E-Mail-Adresse enthält, sende eine E-Mail an demo@demo.com. Wenn der Datensatz keine E-Mail-Adresse enthält, füge einen Kommentar hinzu. Wenn ein Fehler auftritt, während der Bot diese Operationen ausführt, dann zeige ein Nachrichtenfeld an).

Wenn möglich, zusätzlichen Kontext hinzufügen

Indem Sie in Ihrer Eingabeaufforderung den Aufgabentyp oder die Aktion angeben, wird der Automatisierungsschritt genau identifiziert.

Die Verwendung der Eingabeaufforderung Open excel C:/temp/MyFile.xlsx stellt zum Beispiel sicher, dass Automation Co-Pilot die Excel-Aktion verwendet, um die angegebene Datei zu öffnen.

Beispiele für Eingabeaufforderungen

Es handelt sich um Beispiele für übliche Muster in von Entwicklern erstellten Automatisierungen. Auch wenn diese Eingabeaufforderungsmuster optimale Ergebnisse liefern, empfehlen wir, sie je nach Bedarf für die von Ihnen erstellte Automatisierung zu optimieren.

Bot Editor Beispiele:
  • Open a folder. Loop through each file. Copy the file names and add it in a excel file
  • connect to database using myname/mytoken account
  • open browser google.com
  • create a bot that sends email to $EmailTo$, CC $EmailCC$, from $EmailFrom$, subject 'Bot Started', message 'The bot has now started'
  • run excel macro "TestMacro" on C:\Temp\MacroFile.xls. Then switch to excel Main worksheet and get all cells
  • Prompt for the user to select the folderpath. Loop through the selected folder including subfolders. If any excel file is found, then check for the worksheet ‘Main’. if available save it as a PDF in the same folder
  • get records from salesforce. for each salesforce record, insert a record into the database. if the record contains an email, send an email. if not, add a comment. if an error occurs when the bot performs these operations show a message box
  • Sharepoint-Operationen:
    • authenticate sharepoint with Client ID as $ClientID$, Client Secret as $ClientSecret$, Tenant ID as $TenantID$
    • create sharepoint folder COPILOT at /SiteName/Folders/FA
    • upload file to sharepoint
  • * If / ElseIf / Else:
    • If response is A, connect to database and read data. Else, send email to $EmailTo$
    • If response is A, connect to database and read data. Else if response is B, open www.google.com. Else, send email to $EmailTo$
  • Fehlerhandler:
    • open excel C:\temp.xlsx. When error occurs, send an email to me@myorg.com
    • open excel C:\temp.xlsx and get all rows. If error occurs when performing these operations, send an email
    • add try-catch
    • add error handler
  • Use Excel Advanced package to load the data from 'SalesData.xlsx' located in the 'C:\Reports' folder. Write this data into XYZ oracle database.
  • Prompt user for two folders. Loop first folder to find excel files and copy them to second folder.
  • Create a bot to copy data from a table in database to excel.

Process Composer Beispiele:
  • Create a new customer profile in the CRM system. The name, email address, and phone number will be provided by a user via a form.
  • Read the list of automotive parts from a pdf using a document automation task, use a bot to search these parts in a website, and email the collected information
  • Start with a form to enter patient information. Then filter out patients that are 75 years old and older. Finally, add a bot to save the information in an excel spreadsheet.
  • Get data from an invoice. If the name starts with "new", check the price. If the price is above 1000, send an email and If the price is below 500, then go to the first task. Otherwise, save the data to Excel file. If the invoice doesn't start with new, validate the document.
  • Add a form task for EntryForm.
  • Add a bot task for botInput.