Blog

  • LINE Chatbot Blueprint: Student Setup and Testing Guide (Fix LINE Integration Issue in Dialogflow)

    How the scenario works

    The blueprint gives you a finished Make.com scenario: you only connect your own accounts and paste your own token. LINE talks to Make.com, Make.com asks your Dialogflow agent which intent matched, and one of three modules sends the reply.

    Matched intents go down Route A, which sends either the intent’s text or its LINE custom payloads. Messages with no matching intent go down Route B, where Gemini writes the answer.

    Before you import

    This blueprint replaces Dialogflow’s built-in LINE integration, which fails with IamPermissionDeniedException on Google’s side.

    LINE sends messages to Make.com, Make.com asks Dialogflow for the intent, and Make.com sends the reply. Your intents still come from your own Dialogflow agent.

    Collect these values first and keep them in a private note. Never paste them into the group chat or onto slides.

    WhatWhere to find itUsed in module
    Channel access token (long-lived)LINE Developers → your channel → Messaging API tab → Issue7, 23, and the LINE connection in 35
    Your user IDLINE Developers → your channel → Basic settings tabLINE connection in 35
    Google Cloud project ID of your agentDialogflow console → gear icon → General → Google Project3
    OAuth Client ID and Client secretCreated in Step 3Google connection in 3
    Gemini API keyGoogle AI Studio → Get API keyGemini connection in 34
    Make.com account (free plan works)make.comEverything

    Your agent should already have at least 5 intents that answer correctly in Dialogflow’s Try it now panel. If the red IamPermissionDeniedException banner appears in the Dialogflow console, click OK and keep editing. Do not use Integrations → LINE.

    Step 1: Import the blueprint

    1. In Make.com, open Scenarios → Create a new scenario.
    1. Click the ⋯ menu at the bottom of the editor → Import blueprint → choose the file → Import blueprint.
    1. Rename the scenario at the top left, for example LINE bot.

    After import, several modules show a red warning. That is expected: the file carries no webhook, no connections and no tokens, so you add your own in the next steps. Module numbers in this guide match the small grey number under each module.

    ModuleName in the editorWhat you must do
    1LINE webhookCreate a new webhook (Step 2)
    3Detect an IntentCreate a Google connection, pick your project (Step 3)
    7LINE reply: Dialogflow answerPaste your channel access token (Step 4)
    23LINE reply: rich payloadPaste your channel access token (Step 4)
    34Gemini answerCreate a Gemini connection, edit the prompt (Step 5)
    35LINE reply: Gemini answerCreate a LINE connection (Step 5)
    2, 4, 5, 6, 19 to 22Iterator, variables, routers, JSON helpersNothing; leave as they are

    Step 2: Webhook (module 1) and LINE Developers

    Module 1 is where LINE delivers every message. Each group needs its own webhook address.

    1. Click module 1 LINE webhook → next to Webhook click Add → name it LINE <group name> → Save.
    1. Click Copy address to clipboard. It looks like https://hook.us2.make.com/xxxxxxxx.
    1. Open LINE Developers → your provider → your channel → Messaging API tab.
    1. Webhook URL → Edit, paste the Make.com address, click Update. The URL must start with hook. and must not start with dialogflow.cloud.google.com.
    1. Verify Webhook and turn Use webhook on.
    1. Open LINE Official Account Manager → Settings → Response settings: Webhooks on, Auto-response messages off, Greeting message optional.

    Teach Make.com what LINE sends. Right-click module 1 → Run this module only, then send hello to your bot from your phone.

    The bubble should show destination and an events list. Module 2 (Iterator) splits events, so every later module reads from module 2: 2.replyToken, 2.source.userId, 2.message.text.

    You only need to do this once. If you delete the webhook later, you get a new address and must paste it into LINE Developers again.

    The link between module 2 and module 3 carries a filter, Text messages only (2.type = message and 2.message.type = text).

    It stops stickers, photos, new followers and LINE’s Verify ping before they reach Dialogflow.

    Step 3: Dialogflow connection and Detect an Intent (module 3)

    Make.com signs in to your Google Cloud project with an OAuth client that you create. Do Part A once per group, signed in with the Gmail that owns the agent.

    Part A: create the OAuth client in Google Cloud

    1. Open Google Cloud console and select your agent’s project at the top.
    1. APIs & Services → Enabled APIs & services: check that Dialogflow API is listed. If not, open Library, search “Dialogflow API”, click Enable.
    1. Google Auth Platform (older consoles: OAuth consent screen) → Get started. App name Make Dialogflow, support email = your Gmail, Audience External, contact email = your Gmail, accept, Create.
    2. Audience → add every member’s Gmail under Test users.
    1. Clients → Create client: Application type Web application, name Make.com. Under Authorized redirect URIs add exactly:
    https://www.integromat.com/oauth/cb/google-custom
    1. Click Create and copy the Client ID and Client secret. Wait about 5 minutes before using them.

    Part B: connect module 3

    1. Open module 3 → Connection → Add → type Make OAuth Google (custom Google connection).
    2. Paste Client ID and Client secret → Save → sign in with your Gmail.
    1. If Google says the app is not verified, click Advanced → Go to integromat.com (unsafe) → Continue. It is your own app.
    1. Pick your project from the list:

    Check if your bot in https://dialogflow.cloud.google.com/ already exists and matches with your selected Project ID.

    Fill in the fields:

    FieldValueNote
    Project IDpick your project from the listmust match the project shown in Dialogflow settings
    Session ID2.source.userIdalready mapped; gives each LINE user their own conversation and contexts
    Input TypeTextalready set
    Query Input → Text2.message.textalready mapped
    Language Codeen, or th if your agent’s default language is Thaimust match the language your training phrases use

    Click Save. Module 3 now returns Query Result › Intent › Display Name, Fulfillment Text and Fulfillment Messages[] for every LINE message.

    Step 4: LINE reply modules (7 and 23)

    Modules 7 and 23 send replies straight to the LINE Messaging API with an HTTP request. Each one needs your own token.

    1. Open module 7 LINE reply: Dialogflow answer → Headers → the Authorization row.
    2. Replace YOUR_CHANNEL_ACCESS_TOKEN with your long-lived channel access token in LINE Developers → your provider → your channel → Messaging API tab. Keep the word Bearer and one space in front: Bearer eyJh....
    1. Do the same in module 23 LINE reply: rich payload.
    2. Leave URL, method, body type and Request content exactly as imported.

    What the two bodies do, so you can read them in the run log:

    ModuleRequest contentSends
    7{"replyToken":"{{2.replyToken}}","messages":[{"type":"text","text":{{6.json}}}]}the intent’s text answer, made JSON-safe by module 6
    23{"replyToken":"{{2.replyToken}}","messages":[{{21.text}}]}every LINE custom payload of the intent, joined by module 21

    The modules between them are already wired and need no edits:

    • 4 Intent and answer stores intent (display name) and reply (Fulfillment Text).
    • 19 Each response message walks through Fulfillment Messages[].
    • 20 LINE payload to JSON turns each payload.line into JSON; its filter keeps only Platform = LINE.
    • 21 Join LINE payloads joins them with commas; its filter drops anything that came out as null or {}.
    • 22 Text or rich? sends to module 23 when there is at least one payload. Otherwise its fallback route sends to module 7.

    A reply token works once and expires after about one minute, so each message must end in exactly one of modules 7, 23 or 35.

    Step 5: Gemini fallback route (modules 34 and 35)

    When Dialogflow matches no intent, it returns Default Fallback Intent. The link into module 34 carries the filter Route B: fallback to Gemini (4.intent Equal to Default Fallback Intent), so Gemini runs only then.

    If you don’t have an API key, go to https://aistudio.google.com/ and sign in with the account you used to create an agent in Dialogflow as shown in the picture, then click the “Get API key” button.

    Then the screen will appear as shown in the picture, press the “Create API key” button.

    Then, select the project you use, and then press the Create API key in existing project.

    Note: Other Project API keys can be used. It doesn’t have to be the same project as Dialogflow.

    Once you get the API key, copy it. Then go back to Make.com, click “Create a connection” button and paste the API key as shown in image. And click “Save” button.

    Then, select the Model such as Gemini 3.5 Flash Lite, then select (Model) Input as shown in the image, which will assign the role to this module.

    Note: The text can be copied from the content below. You may change this text according to your business information.

    “I am an expert in ICDI (International College of Digital Innovation). International College is established in 2011 to incorporate international and bilingual undergraduate programs in Chiang Mai University (CMU). The main academic mission is to facilitate student mobility in ASEAN and Europe. CMU practices ASEAN University Network Quality Assurance (AUN-QA) and ASEAN Credit Transfer System (ACTS) as well as European Credit Transfer System (ECTS). To facilitate the best practices, International College has support roles to other academic faculties in student mobility with credit transfer, Inbound and Outbound visiting professor exchange, Cross Border Co-Research with ASEAN+3 university partners, Common European Framework Reference in English for General Education and Free Elective courses, student leadership program and, other infrastructure and activities for international students in CMU. In CMU, International College plays as the major mechanism for internationalization. Therefore the college assists CMU academic departments to acquire international funding for student and staff exchange in AUN-ACTS, AIMS (ASEAN International Mobility Students), EU-Share and Erasmus Plus as well as Horizon 2020. Other target international scholarships and funds include New Columbo Plan, China Scholarship Council, Reinventing Japan, Korea Foundation, DAAD, Franco-Thai and Newton fund, etc. International College also helps international students to engage the local funds including CMU Presidential Funding, TICA and other Thai government international funding. In 2017, International College has been enhanced her academic roles to entrepreneurship and digital innovation. The enhanced mission directly responds to the Thailand 20 Years Strategic Plan in digital startup especially Digital Economic Cluster for Chiangmai. This aims at development of TransNation Education with leading entrepreneurship and innovation universities in United Kingdom, Australia, China, Korea, etc. The new International College of Digital Innovation (ICDI) offers bachelor, master, doctoral programs in digital innovation and financial technology. Besides the major courses, ICDI also offers General Education and free elective courses in digital entrepreneurship literacy to any CMU students in other faculties. This helps students to learn disruptive digital technologies for engaging new digital economy and society. Today ICDI has 2+2 dual degree programs in entrepreneurship with University of Strathclyde and East China University of Science and Technology. As well as in data analytic, ICDI collaborates with Curtin University and University of Electronic Science and Technology China. To encourage digital startup, ICDI provides academic and training programs for entrepreneurship and innovation. The digital innovation process for SMEs and startups consists of Discovery, Development, Diffuse and Impact by Big Data, mobile application, social network and financial technology respectively. Fundamentally ICDI is doing research and development in cross border e-commerce, logistics and FinTech to bridge Chinese platforms to western platforms for Thai, Chinese and international students. To conduct policy research in entrepreneurship and innovation by using machine learning, research study is based on Supply Side Structural Reform for improving inputs factors for SMEs and startup in new digital economy and society. The intervention of very high-speed broadband Internet such as 4G is the main consideration. The input factors are categorized into land, labor, capital and entrepreneurship and outputs are measured by United Nation Human Development Index which consists of life expectancy, knowledge and net income. By Schumpeterian Cobb-Douglas approach, the creative destruction theory is employed for study of the 10 new S-curve industries of Thailand. The machine learning techniques are used for developing predictive models of decisions, policies, strategies or projects to improve some input factors for the industrial cluster of SMEs and startups. After word, Big Data technology can be utilized for online monitoring the outcome.”

    Then, press the Add item button, select the (User) details as shown, then press “Save”.

    Module 34 Gemini answer

    1. Connection → Add → paste your Gemini API key → Save.
    2. AI Model: keep the imported Flash Lite model, or pick another Flash model. Flash models answer within LINE’s one-minute reply window; slower Pro models risk an expired reply token.
    3. Messages → item 1 (Role: Model): this is the context Gemini reads before every question. Replace every [BRACKET] with facts about your own platform from Presentation 1. Specific facts (services, hours, prices you are sure of, contact channel) give better answers than general descriptions.
    4. Messages → item 2 (Role: User): leave 3.queryResult.queryText. That is the student’s original question.

    Module 35 LINE reply: Gemini answer

    1. Connection → Add → enter your Channel access token and your User ID (Basic settings tab) → Save.
    2. Reply Token: 2.replyToken (already mapped).
    3. Messages → Text: 34.result (already mapped).

    If you renamed your fallback intent in Dialogflow, type its exact new name in the Route B filter and in the Route A filter (link into module 6), otherwise both routes may run or neither will.

    Modules 7, 23 and 35 each have an Ignore error handler attached. A failed reply then stops quietly instead of turning the scenario off, so always check the run log while testing.

    Step 6: Build Dialogflow responses for this flow

    How you write each intent’s response in Dialogflow decides which module answers in LINE.

    Response you build in DialogflowWhere it appears in module 3Module that repliesWhat LINE shows
    Text response on the Default tabFulfillment Text7plain text
    Text response on the LINE tabFulfillment Text and Fulfillment Messages (Platform LINE, Text)7plain text
    Custom payload on the LINE tab, {"line": {...}}Fulfillment Messages (Platform LINE, Payload)23any LINE message type
    Text and custom payload in the same intentboth23payloads only; the text is dropped
    Card, Image or Quick Replies built-in types on the LINE tabFulfillment Messages, but not as LINE JSONnonenothing; convert them to custom payloads
    No response at allempty7error 400 (text may not be empty)

    Rules that follow from the table:

    • Give every intent at least one response.
    • For rich messages, use LINE tab → Add Responses → Custom payload, one block per message, at most 5 per intent.
    • To send text together with a rich message, add the text as one more custom payload: {"line":{"type":"text","text":"Here is our menu"}}.
    • Inside "line", use any object from the LINE message types reference. Design Flex messages in the Flex Message Simulator and paste the JSON.

    Two custom payload examples:

    {"line":{"type":"text","text":"Contact Points","quickReply":{"items":[
     {"type":"action","action":{"type":"message","label":"Phone","text":"phone number"}},
     {"type":"action","action":{"type":"uri","label":"Website","uri":"https://icdi.cmu.ac.th/"}},
     {"type":"action","action":{"type":"location","label":"Share location"}}]}}}
    {"line":{"type":"sticker","packageId":"446","stickerId":"1988"}}

    Step 7: Test, including the fallback

    Test with Run once first, then switch the scenario on. Every message should light up exactly one of modules 7, 23 or 35.

    Run these tests in order. For each one, click Run once, send the message from your phone, then check the bubbles and the LINE chat.

    TestSend from LINEExpected path (bubbles)Expected in LINEPass when
    T1Click Verify in LINE Developers1 runs, 2 outputs nothingnothingVerify shows Success
    T2A phrase of a Default-tab text intent, e.g. hello1→4, Route A, 19→22, 7the text answer7 status 200
    T3A phrase of a LINE-tab text intentsame as T2the LINE text7 status 200
    T4A phrase of an intent with one custom payloadRoute A, 21 has text, 23rich message (quick reply, sticker, flex)23 status 200
    T5A phrase of an intent with 2 or more payloadssame as T4all payloads in order23 status 200
    T6Off-topic question in English, e.g. any quiet café near CMU?Route B, 34, 35Gemini answer about your platform35 succeeds, 6 and 7 do not run
    T7Off-topic question in ThaiRoute B, 34, 35answer in Thaisame as T6
    T8Nonsense, e.g. asdfgh qweRoute B, 34, 35short polite answersame as T6
    T9Send a sticker or photo1, 2, filter “Text messages only” stopsnothingno error in history
    T10Three different messages within 10 secondsthree separate runsthree answerseach run has one reply

    Fallback in depth. For T6 to T8, open the bubbles and check four places:

    1. Module 3 output → Query Result → Intent: Display Name Default Fallback Intent, Is Fallback true. Note Intent Detection Confidence.
    2. Filter labels on the router: Route A shows ⊘0, Route B shows a tick and 1.
    3. Module 34 output → Result: the text Gemini wrote. Check it uses facts from your prompt, not invented ones.
    4. Module 35: no error. If it fails with an invalid reply token, the run took too long; check the run duration in History and choose a faster model.

    Then tune the boundary between your intents and Gemini:

    You seeMeaningChange
    A real question about your platform goes to Geminithe intent lacks matching training phrasesadd 5 to 10 more phrases to that intent, including Thai if users write Thai
    An off-topic question triggers one of your intentsthe match threshold is too lowDialogflow → gear → ML Settings → Classification threshold: raise it (for example from 0.3 to 0.5), save, retest
    Gemini invents factsthe prompt lacks those factsadd them to module 34’s Model message, or tell Gemini to say it is not sure
    Gemini answers in English to Thai questionsthe prompt rule is missingkeep “Reply in the same language the user writes in” in the prompt

    Troubleshooting

    What you seeWhereCauseFix
    Bot never answers, no new run in historyMake.comScenario off, or LINE webhook still points to DialogflowTurn scheduling on; set the Make.com URL in LINE Developers
    Module 1 output shows queryResult, not events1Make.com URL pasted into Dialogflow Fulfillment instead of LINECreate a new webhook, put it in LINE Developers only
    Iterator (2) outputs nothing2Data structure not learnedRight-click 1 → Redetermine data structure, send a message
    redirect_uri_mismatchGoogle sign-inRedirect URI differsAdd https://www.integromat.com/oauth/cb/google-custom exactly
    “has not completed the Google verification process”Google sign-inGmail not a test userPublish the app, or add the Gmail as a test user
    Status 400 when saving the connection3Wrong secret or client typeCopy the secret again; type must be Web application
    Detect an Intent: 403 or invalid_grant3Sign-in expired, wrong projectReauthorize the connection; check Project ID
    Every message goes to Gemini3, 5Language code differs from agent, or weak training phrasesMatch en/th; add training phrases
    LINE 400 May not be empty, messages23No real payload reached module 21Check the intent has a LINE custom payload in {"line":{...}} form
    LINE 400 text may not be empty7Intent has no text responseAdd a response to the intent
    LINE 400 Invalid reply token7, 23, 35Two routes replied, or reply came after about 1 minuteCheck filters; use a Flash model
    LINE 4017, 23Bearer missing or token wrongHeader = Bearer + space + token
    Gemini answers for intents that should match5Route B filter missingFilter on link into 34: 4.intent Equal to Default Fallback Intent

    Modules with an Ignore handler fail quietly. Open History, click the run, then click the module bubble and read Status code and Data.

  • Stop Waiting for “Perfect.” Start Being Lean.

    Why your dream project needs to fail fast so it can succeed big.

    Imagine this: You have an idea. A big idea. Maybe it’s a new app that helps students swap video games, or a clothing brand with designs that change color in the sun.

    You lock yourself in your room. You spend your entire summer break working on it. You spend your savings on a website. You skip hanging out with friends because you are “in the lab” building the perfect product.

    Finally, launch day comes. You post it on Instagram and TikTok with shaking hands. You wait for the orders to roll in.

    And… silence.

    No one buys. No one downloads. It turns out, nobody actually wanted the thing you spent six months building.

    That feeling? That is the sound of heartbreak. It’s the sound of wasted time.

    But what if I told you there is a “cheat code” to avoid this tragedy? It’s called The Lean Startup, and it changes everything.


    Don’t guess. Test.

    The Old Way vs. The Lean Way

    In the old days, business was taught like building a rocket ship. You plan everything for years, build the rocket, and hope it doesn’t explode when you press “Launch.”

    The Lean Startup is different. It’s like driving a car.
    You don’t just close your eyes and floor the gas pedal (that’s the old way). Instead, you steer. You turn the wheel a little bit, check where you are going, and turn again.

    “Don’t assume you know what people want. Prove it.“


    Step 1: The MVP (The “Rough Draft”)

    This is the coolest part of the Lean Startup. It stands for Minimum Viable Product.

    Most people think they need to launch a finished, polished product (like the iPhone 15). No! You just need something that works enough to test your idea.

    Real World Example: Zappos
    Nick Swinmurn wanted to sell shoes online. But in 1999, everyone said, “No way, people need to try shoes on first!”
    Instead of spending millions buying a warehouse full of Nikes, Nick did something lean.

    1. He went to a local shoe store.
    2. He asked the owner if he could take photos of the shoes.
    3. He posted the photos on a simple website.
    4. When someone bought a pair, Nick ran to the store, bought them at full price, and mailed them to the customer.

    He lost money on every sale, but he proved that strangers would buy shoes online. He built a billion-dollar company starting with zero inventory.

    “Fake it ’til you make it? No. Test it ’til you prove it.”

    Step 2: Build, Measure, Learn (The Loop)

    Treat your business idea like a Science Fair project, not a gamble. You need to go through this loop as fast as possible:

    1. BUILD: Make your MVP (a flyer, a basic website, a sketch).
    2. MEASURE: Show it to real people. Do not ask your mom (she loves you, she will lie). Ask strangers. Do they click “buy”? do they sign up?
    3. LEARN: Look at the data.

    If they didn’t like it, finding out now is a victory. You just saved yourself six months of work!


    Step 3: The Pivot (The Plot Twist)

    So, you launched your MVP and the data says… nobody cares. Is it game over?

    No. You Pivot.

    A pivot is when you keep one foot grounded (your vision) but move the other foot in a new direction.

    Real World Example: Instagram
    Did you know Instagram started as an app called “Burbn”? It let people check in to locations, earn points, and make plans. It was cluttered and confusing.
    The founders looked at the data. They saw that people barely used the check-in features, but they loved posting photos of their dogs and lattes.
    They Pivoted. They deleted everything except the photo feature, added some filters, and renamed it Instagram. The rest is history.

    Change the strategy, keep the vision.

    Why This Matters To You

    You might be thinking, “I’m just a student, I’m not a CEO.”

    But being “Lean” isn’t just for business. It’s for life.

    • Don’t write a 10-page essay before checking with your teacher if the topic is okay. Write an outline (MVP), show the teacher (Measure), and get feedback (Learn).
    • Don’t plan the “perfect” Promposal for months. Drop a hint to see if they are interested first!

    The Takeaway

    “Your ideas are precious, but your time is even more valuable.”

    • Don’t build your product in the dark. Turn the lights on.
    • Don’t hide your idea because you’re afraid it’s not perfect yet.
    • Embed embarrassment into your process. If you aren’t a little embarrassed by your first version, you launched too late.

    “Go out there. Build something small. Fail fast. Learn faster.”

  • Line Chatbot with Dialogflow and Make.com Part 2

    Before you begin, you should initially set up your LINE OA with Dialogflow. You may build and connect them through this tutorial:
    https://www.youtube.com/watch?v=qHKCgCusee4&list=PLyOJN_bAzw3jcOxupqianlvqM9f_rwW1g

    This article will present a guide to integrating LINE Chatbot with Dialogflow and Google Gemini AI, using the Make.com platform as an intermediary to connect workflows. The core principle is to leverage Dialogflow’s conversation management capabilities, Google Gemini AI’s advanced natural language processing power, and Make.com’s automation workflow creation flexibility to create a smarter and more natural conversational experience on LINE.

    You can learn more about Make.com courses from the official website (Make.com Academy) at https://academy.make.com/pages/search

    The content in this article is divided into 5 stages. as follows

    1. Start creating a workflow with Make.com
    2. Implementation of the “Google Cloud Dialogflow ES (Watch for Fulfillment)” module
    3. Manage Responses in Default Fallback Intent and Enable Fulfillment
    4. Using the “Google Gemini AI (Create a completion)” module
    5. Using the “LINE (Send a Reply Message)” Module

    1. Start creating a workflow with Make.com

    Go to the URL: https://www.make.com/ will appear on the screen, as shown in the image.

    Complete the login registration, you will find this screen.

    Press the Create a new scenario button on the top right of the screen, and the screen will appear. There will be Apps or Modules to choose from, as shown in the picture.


    2. Implementation of the “Google Cloud Dialogflow ES (Watch for Fulfillment)” Module

    Search for the Google Cloud Dialogflow ES module by typing in the search box as shown in the image.

    Then, click Show more to display all the results and select “Watch for Fulfillment” as shown in the image.

    Once selected, you will get the module you want, as shown in the picture.

    Then, press the “Create a webhook” button, name the Webhook name, and press the “Create a connection” button as shown in the picture.

    When the button is pressed, a screen will appear to enter the Client ID and Client Secret as shown in the picture.

    We need to find the Client ID and Client Secret from Google Cloud Platform, go to URL: https://console.cloud.google.com/ and select the Project to create the agent in Dialogflow, or go back to Dialogflow and press the gear symbol.

    Once on Google Cloud Platform, search for dialogflow. Select the Dialogflow API as shown in the image.

    Once pressed, the Dialogflow API screen will appear. Then, press the “Manage” button.

    When pressed, a screen will appear as shown in the picture in the “Create credentials” button located in the upper right.

    Once you’re on the Credential creation screen, select “User data” as shown in the image and press Next.

    Once pressed, a screen will appear, as shown in the picture, specify the App name and email and press the Save and continue button.

    For Scopes, press the Save and continue buttons, and the screen will appear as shown in the picture.

    On this screen, select Application type as Web Application and enter a name, then press the “Create” button.

    At this point, we will get the Client ID, press the Done button. Then click “Credentials” menu in navigation in the left side. And then click “Make” app in OAuth 2.0 Client IDs as shown in the picture.

    At this stage we will find the Client ID and Client Secret.

    At this point, there is still one step left: adding Authorized redirect URIs to add https://www.integromat.com/oauth/cb/google-custom

    Then, copy your Client ID and Client Secret into the Make.com as shown in the picture, and don’t forget to click Save in the Credentials section where the Authorized redirect URIs are added.

    Once the Authorized redirect URIs section is saved, go to the Make.com and click the Sign in with Google button and select the email used to create the agent in Dialogflow.

    When you press the Save button, a screen will appear as shown in the picture, which shows the webhook to be copied to be stored in the Dialogflow Fulfillment.


    3. Manage Responses in Default Fallback Intent and Enable Fulfillment

    Once we’ve reached the “Default Fallback Intent“, go to the Responses section to delete all the data used in the response and activate the fulfillment as shown in the image.

    We do this because we don’t want Dialogflow to answer any data back, but instead send the question to the Make.com for processing through fulfillment. Now, if we send any message or question to Dialogflow, there will be no reply.

    Then, take the webhook from the Watch for Fulfillment module and enter it in the URL field in the Fulfillment menu as shown in the image, then press the “Save” button at the bottom.

    Try testing it by pressing the Run button once.

    When pressed, it will be displayed as shown in the picture.

    Try sending any non-intent messages in Dialogflow, which will go to the Fallback Intent and forward it to make.com.


    4. Use of the “Google Gemini AI (Create a completion)” module

    Press the + button to add the module as shown.

    Search for Gemini and choose “Show more”, and then select module “Create a Completion” as shown in the image.

    Once selected, a screen will appear, as shown in the picture.

    If you don’t have an API key, go to https://aistudio.google.com/ and sign in with the account you used to create an agent in Dialogflow as shown in the picture, then click the “Get API key” button.

    Then the screen will appear as shown in the picture, press the “Create API key” button.

    Then, select the project you use, and then press the Create API key in existing project.

    Note: Other Project API keys can be used. It doesn’t have to be the same project as Dialogflow.

    Once you get the API key, copy it. Then go back to Make.com, click “Create a connection” button and paste the API key as shown in image. And click “Save” button.

    Then, select the Model such as Gemini 2.5 Flash (or 3.5 Flash/3.5 Flash Lite), then select (Model) Input as shown in the image, which will assign the role to this module.

    Note: The text can be copied from the content below. You may change this text according to your business information.

    “I am an expert in ICDI (International College of Digital Innovation). International College is established in 2011 to incorporate international and bilingual undergraduate programs in Chiang Mai University (CMU). The main academic mission is to facilitate student mobility in ASEAN and Europe. CMU practices ASEAN University Network Quality Assurance (AUN-QA) and ASEAN Credit Transfer System (ACTS) as well as European Credit Transfer System (ECTS). To facilitate the best practices, International College has support roles to other academic faculties in student mobility with credit transfer, Inbound and Outbound visiting professor exchange, Cross Border Co-Research with ASEAN+3 university partners, Common European Framework Reference in English for General Education and Free Elective courses, student leadership program and, other infrastructure and activities for international students in CMU. In CMU, International College plays as the major mechanism for internationalization. Therefore the college assists CMU academic departments to acquire international funding for student and staff exchange in AUN-ACTS, AIMS (ASEAN International Mobility Students), EU-Share and Erasmus Plus as well as Horizon 2020. Other target international scholarships and funds include New Columbo Plan, China Scholarship Council, Reinventing Japan, Korea Foundation, DAAD, Franco-Thai and Newton fund, etc. International College also helps international students to engage the local funds including CMU Presidential Funding, TICA and other Thai government international funding. In 2017, International College has been enhanced her academic roles to entrepreneurship and digital innovation. The enhanced mission directly responds to the Thailand 20 Years Strategic Plan in digital startup especially Digital Economic Cluster for Chiangmai. This aims at development of TransNation Education with leading entrepreneurship and innovation universities in United Kingdom, Australia, China, Korea, etc. The new International College of Digital Innovation (ICDI) offers bachelor, master, doctoral programs in digital innovation and financial technology. Besides the major courses, ICDI also offers General Education and free elective courses in digital entrepreneurship literacy to any CMU students in other faculties. This helps students to learn disruptive digital technologies for engaging new digital economy and society. Today ICDI has 2+2 dual degree programs in entrepreneurship with University of Strathclyde and East China University of Science and Technology. As well as in data analytic, ICDI collaborates with Curtin University and University of Electronic Science and Technology China. To encourage digital startup, ICDI provides academic and training programs for entrepreneurship and innovation. The digital innovation process for SMEs and startups consists of Discovery, Development, Diffuse and Impact by Big Data, mobile application, social network and financial technology respectively. Fundamentally ICDI is doing research and development in cross border e-commerce, logistics and FinTech to bridge Chinese platforms to western platforms for Thai, Chinese and international students. To conduct policy research in entrepreneurship and innovation by using machine learning, research study is based on Supply Side Structural Reform for improving inputs factors for SMEs and startup in new digital economy and society. The intervention of very high-speed broadband Internet such as 4G is the main consideration. The input factors are categorized into land, labor, capital and entrepreneurship and outputs are measured by United Nation Human Development Index which consists of life expectancy, knowledge and net income. By Schumpeterian Cobb-Douglas approach, the creative destruction theory is employed for study of the 10 new S-curve industries of Thailand. The machine learning techniques are used for developing predictive models of decisions, policies, strategies or projects to improve some input factors for the industrial cluster of SMEs and startups. After word, Big Data technology can be utilized for online monitoring the outcome.”

    Then, press the Add item button, select the (User) details as shown, then press “Save”.


    5. Using the “LINE (Send a Reply Message)” Module

    Press the + button to add a module and search for LINE as shown in the picture.

    Then click Show more to select “Send a Reply Message” as shown in the picture.

    Once selected, a screen will appear, as shown in the picture.

    Press the “Create a connection” button, and a screen will appear to enter the “Channel Access” Token from https://developers.line.biz/.

    When you enter the Channel Access Token and press the “Save” button, the screen will appear.

    Select Reply Token and Reply by example as shown in the show.


    In case you could not see “replyToken” in “data“, try to click the “Run once” button at the bottom.

    Then you will see the component “Google Cloud Dialogflow ES” is running and waiting for the input (in feedback intent) as image below.

    You then can type in your chatbot with any messages that will go to your fallback intent (which is not in your created intents). Once the “Google Cloud Dialogflow ES” is activated, you will be able to see “replyToken” under “Original Detect Intent Request” -> “Payload” -> “data”. Now you can just drag and drop the “replyToken” element to “Reply Token”.


    According to the example, the Reply Token forwarded from Dialogflow will be used in the reply by using the result from Gemini, which when the example is specified, press the “Save” button and then test the chatbot.

    Once Save, a screen will appear as shown in the picture.

    Select the Scenario that you created, and then activate this Scenario, as shown in the image.

    Then type in a sample question, such as “what does ICDI stand for?”. The system will help answer the required information, but if asked, “who is dean?” the system will answer, “The provided text doesn’t name the dean of the …” which is according to the prompt set.



    Error Handling

    To prevent the scenario automatically is stopped after any face problems. We can “Add error handler” module after “LINE” module.

    Choose “Ignore” module

    Finally, the full workflow will be shown as following figure:


    In this article, we explain the process of using the Make.com platform as an intermediary to connect work processes by receiving data from Dialogflow Fulfillment, processing it with Gemini, and replying with a Reply Message.

    References:

    1. https://medium.com/linedevth/integrating-line-chatbot-with-dialogflow-and-gemini-ai-via-make-com-8b30e977fe18
    2. ทำ LINE Chatbot เชื่อมกับ Dialogflow และ Gemini โดยเลือกถามคนหรือถามบอทได้ ตอนที่ 1 (LINE เชื่อมกับ Dialogflow โดยตรง)
      URL: https://shorturl.at/FpIFa
    3. Youtub ทำตาม บทความของคุณตี๋ “สร้าง LINE Chatbot x Gemini” https://www.youtube.com/watch?v=7sGOkYhdEOc

  • LINE Official Account Setup and Enabling Messaging API

    The tutorial covers complete LINE OA setup and enables Messaging API.

    1. Create a LINE OA

    Go to the LINE Official Account Manager (https://manager.line.biz/) page and login of your account. This will be the account your users interact with.

    2. Enable Messaging API

    Navigate to the LINE Developers Console. Create a new “Official Account” (e.g., your company name)

    Filling in all information, including “Account Name,” “Email,” “Country of Company…” and “Business Type” of your account:

    and then enable “Messaging API”.

    Go to LINE Official Account Manager, then click “Settings”

    Click “Messaging API” menu.

    Then click “Enable Messaging API”,

    You can choose the new provider’s name or use the existing one, and click “Agree” button.

    Then click “OK” button.

    Now you will see the Channel info which is “Channel ID” and “Channel secret”

    References:

    1. Get started with the Messaging API https://developers.line.biz/en/docs/messaging-api/getting-started
    2. Creating LINE Official Account EP.1 https://www.youtube.com/watch?v=qHKCgCusee4&list=PLyOJN_bAzw3jcOxupqianlvqM9f_rwW1g until time 2.09.