
When the message "Template has been copied!" appears, click "OK" to complete the copy.
Step 2. Set up Gmail Trigger

Next, set up the Gmail trigger.
Click "When an email with a specific label is received".

Next, check the "Account information to integrate with Gmail".
You can freely edit the title, but do not change the trigger action, and click "Next".

Set up the API connection.
The "Trigger interval" can be set to 5 minutes, 10 minutes, 15 minutes, 30 minutes, or 60 minutes.
※ Please note that the shortest trigger interval varies depending on the plan.
For "Label", click the field and select a label from the displayed options.
Once the setup is complete, click "Test" and check if the email details are displayed in the output.
If the email information is displayed correctly, click "Save".
Step 3. Set up Dify Action

Next, set up the Dify action. Click "Send chat message".

Edit the title as desired and check the account information, then click "Next".

Set the message content to be sent to Dify.
For "query", click the field and select 'Body', which is the inquiry content, from the displayed options.
For "user", enter a half-width numeric value (any identifier) as per the annotation.
Once the setup is complete, click "Test" and check if the information is displayed correctly in the output.
If there are no issues, click "Save".
Step 4. Set up Google Chat Action

Next, set up the Google Chat action.
Click "Send message".

Edit the title as desired and check the account information, then click "Next".


For "Space resource name", click the field and select a space from the options, or refer to the annotation and quote the resource name from the Google Chat URL.
The "Message content" can be edited as desired. This time, we set a message that includes the email subject and body, as well as the response content from Dify.
Once the setup is complete, click "Test" to check if the message is sent to Google Chat.
After confirming the message is sent, click "Save".

Click "Turn on trigger" to complete the flow setup.
Now, when an inquiry email is received in Gmail, the response content will be automatically created in Dify, and a notification will be sent to Google Chat.