This topic describes how to create a connection flow from a recommended template in AppFlow and how to customize the flow after it is created.
Prerequisites
An Alibaba Cloud account is required. If you do not have one, complete the account registration.
Procedure
-
Select a public template and configure the connection flow.
-
Log on to the AppFlow console.
-
In the left-side navigation pane, choose Template Center.
This topic uses the Converse with Tongyi Qianwen in a DingTalk group template as an example. For other templates, follow the on-screen instructions.
-
Click the template that you want to use to open the Template Details page.
-
Click Use Now to start configuring the connection flow.
-
On the Account Authorization tab, select an authorization credential and click Next step.
If no authorization credential is available, click Go to Authorize to create a new one.
-
On the Execute Action tab, set the Template ID and click Next step.
-
On the Basic information tab, configure the basic information for the connection flow and click Next step.
Parameter
Description
Example
Connection flow name
The name of the connection flow. This helps you distinguish between different connection flows.
Converse with Qianwen in a DingTalk group
Connection flow description
A description of the connection flow's functionality.
Sends messages from a DingTalk group chat to Qianwen and returns the replies to the group chat through a DingTalk chatbot.
-
After you configure the connection flow, copy and save the webhook URL for the DingTalk chatbot to send messages. On the Finish tab, the Flow configured successfully message appears, and a webhook URL is generated. Click Copy to save the URL. Click Publish to activate the flow. The webhook or scheduled features take effect only after the flow is published. Then, configure the copied webhook URL in your DingTalk chatbot.
-
-
-
Create a DingTalk group chatbot.
You can create a DingTalk chatbot in one of two ways: create an internal chatbot on the DingTalk Development Platform, or create a custom chatbot directly in a group chat and enable the Outgoing feature.
-
Create an internal chatbot
For detailed instructions, see the Operation Guide for Internal Chatbots. The following table describes the key parameters for creating an internal chatbot.
Parameter
Description
Value
Message receiving mode
Specifies the method for receiving POST messages pushed by DingTalk. This can be set to HTTP mode or Stream mode.
For more information about the message types and data formats that the chatbot can receive, see Receiving Chatbot Messages.
HTTP mode
Message receiving URL
Enter a publicly accessible HTTPS service URL for your enterprise to receive POST messages pushed by DingTalk.
NoteThis parameter is required only when Message receiving mode is set to HTTP mode.
Enter the webhook URL obtained from AppFlow.
-
Create a custom chatbot
For detailed instructions on creating a custom chatbot, see the Operation Guide for Custom Chatbots.
Important-
To enable conversations, you must enable the Outgoing feature for your custom chatbot. The following table describes the parameters for the Outgoing feature.
Parameter
Description
Value
POST URL
The URL to which the DingTalk chatbot forwards received messages.
Enter the webhook URL obtained from AppFlow.
Token
The token used to verify the sender's identity.
AppFlow does not impose restrictions on this field. You can enter any value.
-
To mitigate the risk of a leaked webhook URL, DingTalk provides three security settings for custom chatbots. You can configure one of these settings.
-
Custom Keywords: You can set up to 10 keywords. A message can be sent only if its content contains at least one of the specified keywords. If you use this security setting, ensure that the messages sent to the DingTalk chatbot include your configured keywords.
-
Signature: This method uses a signature to verify the request source. If you use this security setting, we recommend that you generate a signature key in DingTalk and add a "signature" parameter to the corresponding flow node.
-
IP Address (or range): You can set up to 10 IP addresses or address ranges. After configuration, only requests from the specified IP address ranges are processed. If you use this security setting, you must add the following IP addresses to the IP address whitelist in DingTalk:
-
121.40.82.220
-
47.97.73.42
-
47.98.226.113
-
47.96.151.112
-
118.178.89.160
-
120.27.202.100
-
-
-
-
-
Converse in a DingTalk group
In the group chat where the DingTalk chatbot is added, you can converse with Qianwen by @-mentioning the chatbot and sending a message.