Last updated
Last updated
Defining input sources is a crucial step in configuring your custom agent, as these sources provide the data or tasks that the agent will process. Properly configuring input sources ensures the agent seamlessly retrieves and processes the necessary information, ensuring efficient task execution. Below are the steps for defining and configuring input sources for your agent, including connecting external systems and setting up task queues.
Start by accessing the Create Queue page, where you specify the input sources that the agent will monitor. These input sources act as triggers, determining when the agent will begin processing by setting the conditions or events that activate its actions.
Queues function as task pipelines, ensuring the agent picks up and processes data or documents in the correct sequence for optimal execution. Each task within the queue represents an action, defining the specific operations the agent will perform after the trigger occurs. This structured approach ensures the agent efficiently carries out the necessary steps and delivers the desired outcomes.
Click the ‘+’ icon to add input sources.
Use the search bar to locate the specific input sources required for the agent's operation.
You can add multiple input sources as needed to meet the agent’s requirements.
For each input source, if a connection already exists, select it. If not, create a new one by clicking ‘+ New Connection.’
Below is a comprehensive guide on how to connect the input sources.
Amazon S3
Select Amazon S3
Click on Amazon S3 in the interface and select a connection.
Create or Select a Connection
If you already have a connection, select it from the list. If no connection exists, click ‘+ New Connection’ to create one.
Enter Connection Details
Connection Name: Provide a name for your connection.
Access Key ID: Enter the Access Key ID to authenticate the connection.
Secret Access Key: Enter the Secret Access Key to securely connect to your S3 bucket.
Specify the S3 Bucket:
Enter the name of the S3 Bucket that you want to monitor for file uploads.
Enter the Endpoint:
The endpoint is the URL that specifies the network location of your S3 service.
This endpoint allows you to access and manage your data.
You can find the endpoint for your S3 bucket in the AWS Management Console or through AWS CLI.
In the AWS Management Console, navigate to S3 and find the endpoint URL listed for each bucket.
Alternatively, use the AWS CLI with the command aws s3 ls to list your buckets and their corresponding endpoints.
Select the Region:
Choose the Region where your S3 bucket is located.
A region refers to the geographical area in which your data is stored and managed within AWS. Each region consists of multiple Availability Zones that provide redundancy and fault tolerance for your data.
Enter Folder Path
Folder Name: Specify the folder path within the S3 bucket where your files are stored (e.g., /root/subfolder/).
Discord
Select Discord
Click on Discord in the interface.
Create or Select a Connection
If you already have a connection, select it from the list.
If no connection exists, click ‘+ New Connection’ to create one.
Enter Connection Details
Connection Name: Provide a name for your Discord connection.
Bot Token: Enter the Discord Bot Token. A Discord Bot Token is a unique identifier that authenticates and controls your bot on Discord. It allows your bot to interact with the Discord API, send messages, manage roles, and more.
To Get Your Discord Bot Token:
Go to the Discord Developer Portal: Visit the Discord Developer Portal.
Create a New Application: Click on ‘New Application’ and provide a name for your bot.
Add a Bot: In the left-hand menu, navigate to the ‘Bot’ section and click ‘Add Bot’.
Retrieve Your Token: Once the bot is created, you can find your Bot Token under the ‘Token’ section.
Enter Channel ID
Channel ID: Enter the Discord channel ID where the bot will operate. The Channel ID can be found in the channel's URL, located between /channels/
and the following forward slash.
Gmail
Select Gmail
Click on Gmail to initiate the connection process.
Create or Select a Connection
If you already have an existing connection, select it from the list.
If no connection exists, click '+ New Connection' to create one.
Enter Connection Details
Connection Name: Provide a name for your Gmail connection.
Connect Gmail Inbox
Click the 'Add' button to connect to the designated Gmail inbox.
Google Drive File
Click on the Google Drive File:
Click on Google Drive to access its connection settings.
Select a Connection:
If a connection already exists, select it from the list. If no connection exists, click '+ New Connection' to create one.
Enter Connection Details
Connection Name: Provide a name for your Google Drive File connection.
Click the 'Add' button to connect to the Google Drive File.
Toggle the Switch for Team Drives:
If you want the agent to monitor Team Drives in addition to individual Google Drives, toggle the switch to include Team Drives in the monitoring process.
Enter the Folder ID:
Find the folder you want the agent to monitor for new uploads.
The Folder ID is a unique identifier for the folder. You can find it in the URL after "folders/." For example, in the URL https://drive.google.com/drive/folders/abc123xyz
, the Folder ID would be abc123xyz
.
Google Sheet
Select Google Sheets
Click on Google Sheets to begin the connection process.
Create or Select a Connection
If you already have an existing connection, select it from the list.
If no connection exists, click '+ New Connection' to create one.
Enter Spreadsheet ID
Spreadsheet ID: Enter the unique identifier for your Google Sheet. You can find this ID in the URL of the sheet, located after /d/ and before /edit.
Enter Sheet ID
Sheet ID: Enter the specific ID of the sheet (tab) within the spreadsheet.
To find the Sheet ID:
Open the desired Google Sheet.
Go to the specific tab (sheet) you want to connect.
Check the URL in your browser; the Sheet ID will be the value after gid= in the URL.
Google Drive Folder
Select Google Drive Folder
Click on Google Drive Folder to connect.
Choose or Create a Connection
If you have an existing connection, select it from the list.
If no connection is available, click 'New Connection' to create a new one.
Name the Connection
Connection Name: Enter a name to identify your Google Drive folder connection.
Establish the Connection
Click the 'Add' button to connect your Google Drive folder.
Include Team Drives
If you want to include folders from Team Drives in the results, toggle the switch under Include Team Drives.
Enter Folder ID
Folder ID: Input the unique identifier for the folder you wish to monitor for new uploads.
How to Find the Folder ID:
Open the desired folder in Google Drive.
In the URL, locate the string after /folders/. This is the Folder ID.
For example, in the URL https://drive.google.com/drive/folders/1aBcDeFgHiJkLmNoPQrStUvWxZy, the Folder ID is 1aBcDeFgHiJkLmNoPQrStUvWxZy.
Google Forms
Select Google Forms
Click on Google Forms to start the connection process.
Choose or Create a Connection
If you have an existing connection, select it from the list.
If no connection is available, click '+ New Connection' to create a new one.
Name the Connection
Connection Name: Enter a name for your Google Forms connection.
Enter Form ID
Form ID: Enter the unique identifier of the form you want to monitor for responses.
How to Find the Form ID:
Open your desired Google Form in your browser.
Look at the URL in the address bar, which will look something like this:
https://docs.google.com/forms/d/1A2B3C4D5E6F7G8H9I0J1K2L3M4N5O6P7Q8R9S0T1U2V/edit
The Form ID is the long string of characters between /d/
and /edit
. In the example above, the Form ID is 1A2B3C4D5E6F7G8H9I0J1K2L3M4N5O6P7Q8R9S0T1U2V
.
Include Team Drive Forms
Toggle the switch under Include Team Drive Forms to determine if forms from Team Drives should be included in the results.
JIRA Cloud
Select JIRA Cloud
Click on JIRA Cloud to start the connection process.
Choose or Create a Connection
If you already have an existing connection, select it from the list.
If no connection exists, click '+ New Connection' to create one.
Name the Connection
Connection Name: Enter a name to identify your JIRA Cloud connection.
Enter the Instance URL
Instance URL: Provide the link to your Jira instance.
Steps to Find Your Jira Instance URL:
From the Browser’s Address Bar:
Open your JIRA dashboard in a web browser.
The URL in the address bar is your instance URL.
For example:
Cloud instance: https://<your-instance-name>.atlassian.net
Self-hosted/server instance: http(s)://<your-server-domain>/jira
From JIRA Settings:
Log in to your JIRA account.
Click on the gear icon (Settings) in the top-right corner.
Navigate to System or Site Administration, depending on your Jira version.
Look for the Base URL field, which displays your instance URL.
Using JIRA API:
If accessing Jira programmatically, the instance URL is often the base URL for API calls.
Example API URL: https://<your-instance-name>.atlassian.net/rest/api/3
Enter Your Email ID
Email ID: Enter the email ID you use to log in to JIRA.
Enter Your JIRA API Token
API Token: Enter your JIRA API token.
Steps to Generate a Jira API Token:
Log in to Your Atlassian Account: Go to the Account Security page.
Navigate to API Token Section: Under the Security section, find and click on API token.
Generate a New API Token:
Click the Create API token button.
Enter a label for the token (e.g., "Integration with XYZ") to identify its purpose.
Click Create.
Copy the Token: A new token will be displayed. Copy it immediately, as it cannot be viewed again later. If you lose it, you will need to generate a new token.
After entering the necessary details, click the 'Add' button.
Enter JQL to Filter Issues Watched
JQL: Enter the JQL query to filter issues watched.
Steps to Enter the JQL:
Open JIRA and go to the Issues section.
If you are in the basic view (with dropdown filters), click on Switch to JQL (usually on the top-right of the search box) to enable advanced searching.
Enter the following query: watcher = currentUser() and press Enter.
This query will return all issues that you are currently watching.
The watcher field specifies the user who is watching the issue, and currentUser() represents the user who is currently logged in.
Sanitize JQL
Toggle the switch under Sanitize JQL to clean or secure JQL queries and prevent unauthorized access or potential security risks.
Notion
Select Notion
Click on Notion to start the connection process.
Choose or Create a Connection
If you have an existing connection, select it from the list.
If no connection exists, click '+ New Connection' to create one.
Name the Connection
Connection Name: Enter a name for your Notion connection.
Enter the Database ID
Database ID: Provide the unique identifier for the Notion database you wish to connect.
How to Find the Database ID in Notion:
Open the desired Notion database.
Click on the "Share" button or simply copy the URL from your browser's address bar.
The Database ID is located between the last slash (/
) and the question mark (?
) in the URL.
For example, in the URL:
https://www.notion.so/YourWorkspace/ba028b01a95548f48500c26971ff0884?v=7752d01c4f30441eb10da5a95394c042
, the Database ID is ba028b01a95548f48500c26971ff0884
.
Salesforce
Select Salesforce
Click on Salesforce to connect it.
Choose or Create a Connection
If you have an existing connection, select it from the list.
If no connection exists, click '+ New Connection' to create one.
Name the Connection
Connection Name: Provide a name for your Salesforce connection.
Select the Salesforce Object
Object: Salesforce stores data in objects, such as Account, Contact, Lead, etc. To select the right object, follow these steps:
In the Object dropdown, search for and select the relevant Salesforce object you wish to connect to (e.g., Account or Contact).
Salesforce objects represent different types of records or entities in the system, so choose the one that aligns with your data management needs.
For example, if you're working with customer details, you would choose the Account object, or for individual contacts, choose the Contact object.
Set Up Conditions
Conditions (Advanced): You can filter data by specifying conditions using a Salesforce Object Query Language (SOQL) query.
How to Enter a SOQL Query:
SOQL (Salesforce Object Query Language) is a powerful query language used to retrieve data from Salesforce objects. It works similarly to SQL but is specifically designed for Salesforce data.
Example of a basic SOQL query:
Steps to enter a SOQL query:
Identify the Object: Choose the object you want to query (e.g., Contact).
Define the Fields: Choose the fields you need (e.g., Name, Email).
Set Conditions: Use WHERE clauses to filter the data based on specific criteria (e.g., Status = 'Active').
Enter the Query: Type your query in the provided field.
Example Use Case:
If you want to retrieve a list of contacts with the status 'Active,' your SOQL query will be:
ServiceNow
Click on ServiceNow to Connect: Begin by selecting ServiceNow to establish a connection. If you already have an existing connection, select it. Otherwise, click the '+New Connection' option to create a fresh connection.
Enter the Table Name: Enter the Table Name for the ServiceNow record you want to interact with. This is the name of the table containing the records, such as "incident," "task," or "change_request."
How to Find the Table Name in ServiceNow:
Using Table Label Search:
Log in to your ServiceNow instance.
Type the table label (e.g., "Incidents") in the Navigation Filter.
Open the desired list view (e.g., "Incidents").
Right-click on the list header and select Configure > Table to see the technical name of the table.
Using the System Dictionary:
Go to System Definition > Tables in the Navigation Filter.
Search for your table by its label or technical name.
Open the table to view its schema and details.
Examining the URL:
Open a record or list in the table you're interested in.
The sysparm_table parameter in the URL indicates the table name (e.g., incident).
Using the Schema Map:
Navigate to System Definition > Tables, search for the desired table, and use the Schema Map to view relationships and details.
Enter Filter - Encoded Query:
Encoded Queries allow you to filter records in ServiceNow in a compact, machine-readable format. This query is used in various contexts, such as REST API calls, reports, or URLs.
Steps to Generate or Find Encoded Queries:
Using List View Filters:
Go to a list view (e.g., Incident > All).
Apply the desired filter (e.g., Priority = 1).
The encoded query appears in the URL after applying the filter (e.g., sysparm_query=priority=1).
Using the Filter Button:
Open the list of records (e.g., Incident).
Apply the filter criteria and click Filter.
Right-click the Filter Criteria bar and select Copy Filter to get the encoded query.
Using GlideRecord Script:
For advanced users, you can use a GlideRecord script to query a table and print the corresponding encoded query.
Encoded Query Example:
Simple filter: priority=1
Multiple filters: priority=1^active=true
Using OR condition: priority=1^ORpriority=2
Date Field for Filtering New Records:
ServiceNow typically uses the sys_created_on or sys_updated_on fields to filter new records. These date fields can be used for querying records created or updated within a specified timeframe.
How to Find Date Fields:
Using Table Schema: Navigate to System Definition > Tables, search for your table, and look for date fields like sys_created_on and sys_updated_on.
Using List View Columns: In the list view, check for date-related fields (e.g., Created On, Updated On) and add them to the list layout for better visibility.
Using Filters:
Apply a filter using date fields like sys_created_on>=START_DATE.
Common Date Fields in ServiceNow:
Zendesk
Select Zendesk to Connect:
Click on Zendesk to initiate the connection process. If you already have an existing connection, select it. Otherwise, click '+ New Connection' to create a new connection.
Enter Connection Details:
Connection Name: Provide a name for your Zendesk connection to easily identify it.
Agent Email: Enter the agent's email address used to log into Zendesk.
API Token: To generate your API token:
Log in to your Zendesk account.
Navigate to Admin Center > Apps and Integrations > APIs > Zendesk API.
Click Add API Token to generate a new token and copy it. Remember, the token will not be shown again once you leave the page, so be sure to save it securely.
Subdomain: Enter the subdomain for your Zendesk instance. You can find it in a few places:
Admin Center home page
Support Settings tab
In the URL: The subdomain appears before .zendesk.com in your Zendesk account URL. For example, in https://yoursubdomain.zendesk.com, the subdomain is yoursubdomain.
Enter View: Navigate to your Zendesk Support interface, click on Views in the sidebar on the left to see your available views. Select the view that you want to see tickets from.
Webhook (Pull Data From Your System)
Enter the API Endpoint URL: Provide the API endpoint URL from which data will be retrieved. This is the URL that connects to your system.
Request Type:
HTTP Method: Choose the method to interact with the API. You can select between:
GET: For retrieving data.
POST: For submitting data.
Headers and Query Parameters:
You can add headers and query parameters to customize the request.
Use the '+' button to add multiple key-value pairs to the headers and query parameters.
Key: The name of the header or query parameter.
Value: The corresponding value for the key.
Items Mapping:
This mapping should specify the path for the list of items returned from the API response.
It should start with data
. (e.g., data.items
) to indicate the location of the items in the API response.
ID Mapping:
This mapping indicates where the unique ID of each item is located in the API response.
It should start with data.
(e.g., data.id
), specifying the path for the item ID.
File URL Mapping:
This mapping indicates where the file URL associated with the item is located.
It should start with data.
(e.g., data.fileURL
), pointing to the file's URL in the response.
Zoho CRM
Click on Zoho CRM:
Select Zoho CRM from the available options to begin the connection process.
Choose an Existing Connection or Create a New One:
If you already have a Zoho CRM connection, select it from the list of existing connections.
If you do not have a connection, click on '+ New Connection' to set up a new one.
Provide a Name for the Zoho CRM Connection:
Enter a name that will help you identify this specific connection.
Zoho Invoice
Click on Zoho Invoice:
Select Zoho Invoice to start the connection process.
Choose an Existing Connection or Create a New One:
If you already have a Zoho Invoice connection, select it from the list of existing connections.
If you don't have a connection yet, click '+ New Connection' to create a new one.
Provide a Name for the Zoho Invoice Connection:
Enter a descriptive name for this connection to easily identify it later.
Webhook (Send Data to ZBrain)
Click on Webhook:
A cURL command will appear on your screen.
Copy the cURL Command:
Copy the entire cURL command that is provided.
Paste the cURL Command:
Open your terminal, IDE, or an API testing tool like Postman.
Replace the API Key:
In the command, locate the placeholder api_key and replace it with your actual API key. You can find your API key under Settings > My Account.
Replace the WorkerID:
In the cURL command, find the placeholder for WorkerID and replace it with the correct WorkerID. The WorkerID can be found at the end of the URL in your system.
These instructions illustrate how to define input sources for your agents. Follow similar steps to connect other sources and use the on-screen prompts to guide you through each configuration.
Once all the input sources have been added and configured, click ‘Next’ to proceed to the flow creation step, where you will design the sequence of actions your agent will follow.
By correctly defining your input sources, you ensure the agent retrieves and processes data effectively, creating a seamless workflow for automated task execution.