Chapter 10. Connecting to IRC
Internet Relay Chat (IRC) is a protocol that lets anyone with an IRC client send and receive text messages in real time. In an integration, a connection to IRC can do one of the following:
- Trigger execution of a simple integration when an IRC nickname that you specify receives a private message. The integration passes the message to the next step in the flow. For example, you can designate an IRC nickname for receiving names of possible customers. Upon receiving a message, the integration could connect to Salesforce to create a lead.
- Deliver a message to a particular channel. The message is from the nickname that you specify. For example, this is useful when an integration downloads a file from an FTP server and processes it in some way. An integration flow can send a message to a particular channel to indicate that the process was successful.
To connect to IRC in an integration, create an IRC connection and then add the connection to an integration flow. Details are in the following topics:
10.1. Creating an IRC connection
In an integration, an IRC connection can retrieve messages that are sent to an IRC nickname that you specify or send messages to a nickname on a channel. You can use the same IRC connection in any number of integrations.
Prerequisites
- You know the hostname and port of the IRC server that you want to connect to.
- If the IRC server requires a password, you know the password.
Procedure
- In Fuse Online, in the left panel, click Connections to display any available connections.
- In the upper right, click Create Connection to display Fuse Online connectors.
- Click the IRC connector.
-
In the Hostname field, enter an IRC hostname. You can specify an IP address or a name, for example,
chat.freenode.net
. -
In the Port field, enter the port that the IRC server is listening on, for example,
6665
. - In the Password field, if the IRC server requires a password, enter it here.
- Click Validate. Fuse Online immediately tries to validate the connection and displays a message that indicates whether validation is successful. If validation fails, revise the connection configuration values and try again.
- If validation is successful, click Next.
-
In the Name field, enter your choice of a name that helps you distinguish this connection from any other connections. For example, enter
IRC Freenode
. - In the Description field, optionally enter any information that is helpful to know about this connection.
- Click Save to see the updated list of available connections, including the connection that you just created. If you entered the example name, you would see that IRC Freenode appears as a connection that you can choose to add to an integration. You can add this connection to any number of integrations.
10.2. Adding an IRC connection to trigger integration execution upon receiving messages
An IRC connection that starts an integration triggers execution of the integration when the connection finds private messages that are sent to an IRC nickname that you specify.
Prerequisites
- You created an IRC connection.
- You have an IRC nickname for receiving and sending messages.
- You are creating a simple integration and Fuse Online is prompting you to choose how you want to start the integration.
Procedure
- Click the IRC connection that you want to use to start the integration.
- Select the IRC Receive Private Message action.
- In the Channels field, optionally specify one or more IRC channels separated with commas.
- In the Nickname field, specify the IRC nickname that the integration uses. For any channels that you specify, this nickname joins the channel. During execution, the integration retrieves messages that are sent to this nickname and passes them to the next step in the integration.
- In the NickServ Password field, if the specified nickname has a password, enter it.
- Click Next to specify the action’s output type.
In the Select Type field, if the data type does not need to be known, accept Type specification not required and click Next. You do not need to follow the rest of these instructions.
Otherwise, click in the Select Type field and select one of the following as the schema type:
-
JSON schema is a document that describes the structure of JSON data. The document’s media type is
application/schema+json
. -
JSON instance is a document that contains JSON data. The document’s media type is
application/json
. -
XML schema is a document that describes the structure of XML data. The document’s file extension is
.xsd
. -
XML instance is a document that contains XML data. The document’s file extension is
.xml
.
-
JSON schema is a document that describes the structure of JSON data. The document’s media type is
-
In the Definition input box, paste a definition that conforms to the schema type you selected. For example, if you select JSON schema then you would paste the content of a JSON schema file, which has a media type of
application/schema+json
. In the Data Type Name field, enter a name that you choose for the data type. For example, if you are specifying a JSON schema for vendors then you might specify
Vendor
as the data type name.You will see this data type name when you are creating or editing an integration that uses the connection for which you are specifying this type. Fuse Online displays the type name in the integration visualization and in the data mapper.
- In the Data Type Description field, provide information that helps you distinguish this type. This description appears in the data mapper when you hover over the step that processes this type.
- Click Next to add the connection to the flow.
Result
The connection is a simple integration’s start connection and Fuse Online prompts you to choose the integration’s finish connection.
10.3. Adding an IRC connection to send a message
In an integration, you can send a message to one or more IRC channels in the middle of a flow or to finish a simple integration. To do this, add an IRC connection to the middle of a flow or as a simple integration’s finish connection.
Prerequisites
- You created an IRC connection.
- You have an IRC nickname for receiving and sending messages.
- You are creating or editing a flow and Fuse Online is prompting you to add to the integration. Or, Fuse Online is prompting you to choose a finish connection.
Procedure
- On the Add to Integration page, click the plus sign where you want to add the connection. Skip this step if Fuse Online is prompting you to choose the finish connection.
- Click the IRC connection that you want to add to the flow.
Select IRC Send Message to Channel to send a message to one or more channels.
- In the Channels field, enter one or more IRC channels delimited by commas. During execution, this connection sends messages from the IRC nickname that you specify to these channels.
- In the Nickname field, specify the IRC nickname that sends messages to the specified channels.
- In the NickServ password field, if the nickname that you specified has a password, specify it here.
- Click Next to specify the action’s input type.
In the Select Type field, if the data type does not need to be known, accept Type specification not required and click Next. You do not need to follow the rest of these instructions.
Otherwise, click in the Select Type field and select one of the following as the schema type:
-
JSON schema is a document that describes the structure of JSON data. The document’s media type is
application/schema+json
. -
JSON instance is a document that contains JSON data. The document’s media type is
application/json
. -
XML schema is a document that describes the structure of XML data. The document’s file extension is
.xsd
. -
XML instance is a document that contains XML data. The document’s file extension is
.xml
.
-
JSON schema is a document that describes the structure of JSON data. The document’s media type is
-
In the Definition input box, paste a definition that conforms to the schema type you selected. For example, if you select JSON schema then you would paste the content of a JSON schema file, which has a media type of
application/schema+json
. In the Data Type Name field, enter a name that you choose for the data type. For example, if you are specifying a JSON schema for vendors then you might specify
Vendor
as the data type name.You will see this data type name when you are creating or editing an integration that uses the connection for which you are specifying this type. Fuse Online displays the type name in the integration visualization and in the data mapper.
- In the Data Type Description field, provide information that helps you distinguish this type. This description appears in the data mapper when you hover over the step that processes this type.
- Click Next to add the connection to the flow.
Results
The connection appears in the flow visualization where you added it.