Skip to content
Callin.io workflow ...
 
Notifications
Clear all

Callin.io workflow details

13 Posts
3 Users
0 Reactions
6 Views
Steve_Abraham
(@steve_abraham)
Posts: 8
Active Member
Topic starter
 

Hello everyone, I have a question.

I'm working with two workflows:

The first workflow invokes the agent telegram tool.

The second workflow triggers the agent, sends a wait response, stores the response as a variable, and then should return it to the AI Agent.

However, it's not working as expected.
Can anyone offer assistance with this?

These are the values within the nodes.

ANY HELP IS GREATLY APPRECIATED!

Please provide the rewritten markdown content *it should be in the markdown format.

 
Posted : 21/04/2025 7:01 am
jcuypers
(@jcuypers)
Posts: 29
Eminent Member
 

Hello,

Could you please share your current workflow for testing purposes?

Best regards,
J.

 
Posted : 21/04/2025 7:13 am
Steve_Abraham
(@steve_abraham)
Posts: 8
Active Member
Topic starter
 

I mean, what is your question?

I can assist you with that.

Please provide the rewritten markdown content; it should be in markdown format.

 
Posted : 21/04/2025 7:24 am
jcuypers
(@jcuypers)
Posts: 29
Eminent Member
 

Hi,

I'd like to view (copy-paste) the workflow to help with troubleshooting.

For a few reasons:

  1. I won't attempt to reconstruct someone's workflow repeatedly to simulate a request and observe the outcome (this simply saves time).
  2. I'd prefer to see the internal configurations rather than relying on verbal descriptions.
  3. I want to understand what troubleshooting steps have been taken and verify them (as statements are often inaccurate).

Therefore, for everyone's benefit, please share your workflow.

Regards,
J.

 
Posted : 21/04/2025 7:30 am
Steve_Abraham
(@steve_abraham)
Posts: 8
Active Member
Topic starter
 

I understand it now!



this is the sub flow
{
  "name": "ADMIN MESSAGING",
  "nodes": [
    {
      "parameters": {
        "operation": "sendAndWait",
        "chatId": "6817067052",
        "message": "A new user has requested for registration:nn[name]n[email]",
        "approvalOptions": {
          "values": {
            "approvalType": "double"
          }
        },
        "options": {}
      },
      "type": "callin.io",
      "typeVersion": 1.2,
      "position": [
        480,
        340
      ],
      "id": "a3e2810e-9816-4019-8cad-1ea057cdcabe",
      "name": "Telegram",
      "webhookId": "af268926-5f43-4629-be37-9ba4c0552bb8",
      "alwaysOutputData": true,
      "credentials": {
        "telegramApi": {
          "id": "njKf0i6ith28nBsM",
          "name": "Telegram account"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "e547aa9e-18e8-4149-87c5-2ab180264c60",
              "name": "status",
              "value": "={{ $json.data.approved }}",
              "type": "boolean"
            }
          ]
        },
        "options": {}
      },
      "type": "callin.io",
      "typeVersion": 3.4,
      "position": [
        700,
        340
      ],
      "id": "d3c03727-1dce-40e2-a5e5-29e4e55fe9f3",
      "name": "Edit Fields",
      "alwaysOutputData": true
    },
    {
      "parameters": {
        "workflowInputs": {
          "values": [
            {
              "name": "name"
            },
            {
              "name": "email"
            }
          ]
        }
      },
      "type": "callin.io",
      "typeVersion": 1.1,
      "position": [
        240,
        340
      ],
      "id": "c9dbf1fc-8c3e-46fe-96eb-173245a09d68",
      "name": "When Executed by Another Workflow"
    }
  ],
  "pinData": {},
  "connections": {
    "Telegram": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        []
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "7914a8ed-bc7d-485e-94ad-46ff99d90431",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "76a114090afc4c64a210017df49d602599ac79ad55af611fa5c5323e3c54e15b"
  },
  "id": "Mkb2DUqpJbDRKLRK",
  "tags": []
}

type or paste code here



**this is the main workflow

{
  "name": "CUSOTMR REG TELEGRAM PROCESS",
  "nodes": [
    {
      "parameters": {
        "description": "Maintain a human like conversationnnThese are the rules:na) Use a conversational tone and concise language, and avoid unnecessarily complex jargon.nb) Use short, punchy sentences. Example: "And then… you enter the room. Your heart drops. The pressure is on."
c) Use simple language. 10th grade readability or lower. Example: "Emails help businesses tell customers about their stuff."
d) Use rhetorical fragments to improve readability. Example: “The good news? My 3-step process can be applied to any business."
e) Use bullet points when relevant. Example: "Because anytime someone loves your product, chances are they’ll:nn- buy from you againn- refer you to their friendnnf) Use analogies or examples often. Example: "Creating an email course with AI is easier than stealing candies from a baby."
g) Split up long sentences. Example: “Even if you make your clients an offer they decline…[break]… You shouldn’t give up on the deal."
h) Include personal anecdotes. Example: "I recently asked ChatGPT to write me…"
i) Use bold and italic formatting to emphasize words.nj) Do not use emojis or hashtagsnk) Avoid overly promotional words like "game-changing," "unlock," "master," "skyrocket," or "revolutionize."
m) Important - vary sentence length within a paragraph.nn) Avoid the use of emojis, asterisks, hashtags, or underscores.nnp) Avoid bolds, italics, and markdown formatting unless asked fornq) Don't refer to yourself or add an intro or outro.nnn- When the user sedns the name and email for verification, call the n8n workflow tool nodennn"
      },
      "type": "callin.io",
      "typeVersion": 1,
      "position": [
        -1920,
        60
      ],
      "id": "cb9d0860-0b28-47d2-b8df-8fd10daf33a0",
      "name": "Think"
    },
    {
      "parameters": {
        "jsCode": "const minDelaySec = 3;  // 3 secondsnconst maxDelaySec = 7;  // 7 secondsn
const randomDelay = Math.floor(Math.random() * (maxDelaySec - minDelaySec + 1)) + minDelaySec;

return [
  {
    "json": {
      "delay": randomDelay,                      // Delay in seconds
      "output": $input.first().json.output       // Save AI Agent's response
    },
  },
];"
      },
      "type": "callin.io",
      "typeVersion": 2,
      "position": [
        -2700,
        200
      ],
      "id": "814a5187-c562-4dc5-8ad3-87063f3faaf3",
      "name": "Code"
    },
    {
      "parameters": {
        "amount": "={{ $json.delay }}"
      },
      "type": "callin.io",
      "typeVersion": 1.1,
      "position": [
        -2480,
        200
      ],
      "id": "ea380222-abb7-4a06-adff-9c89215d3f12",
      "name": "Wait",
      "webhookId": "d359f573-daee-4818-95f2-5a5ab9d91bfb"
    },
    {
      "parameters": {
        "jsCode": "const sessionId = $input.first().json.sessionId;n
if (sessionId) {n  // Session exists — redirect or flag itn  return [n    {
      "json": {
        "sessionStatus": "exists",
        "sessionId": sessionId
      }
    }
  ];
} else {n  // Session doesn't exist — handle as newn  return [n    {
      "json": {
        "sessionStatus": "new"
      }
    }
  ];
}
"
      },
      "type": "callin.io",
      "typeVersion": 2,
      "position": [
        -2480,
        -160
      ],
      "id": "ad30e40b-b2b0-49cf-ab4f-98bbfa592067",
      "name": "Code1"
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "leftValue": "={{ $json.sessionStatus }}",
                    "rightValue": "=exists",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "id": "64c7aabc-fe0b-4cd0-a6b4-3498c0b3f337"
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "EXISTS"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "8d88a350-9725-4d2d-854d-5d95a7e767ed",
                    "leftValue": "={{ $json.sessionStatus }}",
                    "rightValue": "new",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "NEW"
            }
          ]
        },
        "options": {}
      },
      "type": "callin.io",
      "typeVersion": 3.2,
      "position": [
        -2260,
        -160
      ],
      "id": "1a208db3-9284-4101-9449-2c6292817ee4",
      "name": "Switch"
    },
    {
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "type": "callin.io",
      "typeVersion": 1.2,
      "position": [
        -2700,
        -160
      ],
      "id": "ac5d6327-f1ce-4d0f-9d3e-19824a8ca27f",
      "name": "Telegram Trigger",
      "webhookId": "4d6834dc-ea03-4dc0-b9f8-fea69807ab92",
      "credentials": {
        "telegramApi": {
          "id": "njKf0i6ith28nBsM",
          "name": "Telegram account"
        }
      }
    },
    {
      "parameters": {
        "chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
        "text": "={{ $json.output }}",
        "additionalFields": {}
      },
      "type": "callin.io",
      "typeVersion": 1.2,
      "position": [
        -2260,
        200
      ],
      "id": "cdbc5829-5645-411b-9ee3-373947ff5c3a",
      "name": "Telegram",
      "webhookId": "5601175e-1dcd-4b85-b852-5cf2613e29b1",
      "credentials": {
        "telegramApi": {
          "id": "njKf0i6ith28nBsM",
          "name": "Telegram account"
        }
      }
    },
    {
      "parameters": {
        "name": "admin_message",
        "description": "call this tool to get a boolean value.",
        "workflowId": {
          "__rl": true,
          "value": "Mkb2DUqpJbDRKLRK",
          "mode": "list",
          "cachedResultName": "ADMIN MESSAGING"
        },
        "workflowInputs": {
          "mappingMode": "defineBelow",
          "value": {
            "name": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('name', ``, 'string') }}",
            "email": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('email', ``, 'string') }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "name",
              "displayName": "name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "string"
            },
            {
              "id": "email",
              "displayName": "email",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "string"
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        }
      },
      "type": "callin.io",
      "typeVersion": 2.1,
      "position": [
        -1800,
        60
      ],
      "id": "72bcb989-531c-4a65-b6d7-e1dc579053b6",
      "name": "Call n8n Workflow Tool"
    },
    {
      "parameters": {
        "modelName": "models/gemini-2.0-flash",
        "options": {}
      },
      "type": "callin.io",
      "typeVersion": 1,
      "position": [
        -2040,
        60
      ],
      "id": "3dbe24a7-1822-4b0e-b12f-3ed2b008464d",
      "name": "Google Gemini Chat Model",
      "credentials": {
        "googlePalmApi": {
          "id": "o5srcEe89YbGzPxj",
          "name": "Google Gemini(PaLM) Api account"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $('Telegram Trigger').item.json.message.text }}",
        "options": {
          "systemMessage": "## AI Expert in Trading Industry:nn### 1. DESCRIPTION:n- *Language of prompt:* Englishn- *Communication Level:* Beginner to Intermediaten- *Core identity and personality of the AI:* Supportive, friendly, engaging, empathetic, knowledgeable in tradingn- *Primary purpose and expertise:* To assist users as a support agent for a trading industry company, providing trading signals, account setup guidance, and educational resources.nn### 2. RULES AND GUIDELINES:n- *Core behavioral principles:* Empathy, clarity, and prompt assistancen- *Ethical boundaries and limitations:* Respect user privacy, avoid financial advicen- *Response style and tone:* Friendly, supportive, and informative without excessive use of exclamation marksn- *Emoticon usage:* Only use emoticons exactly where they appear in the question flow. Do not add, remove, or move any emoticons.n- *Handling multiple messages:* If a user sends multiple messages in quick succession, respond to the first message and acknowledge the subsequent messages in a single, consolidated response to avoid repetition.nnn### 3. CONVERSATION STYLE:nna) Use a conversational tone, concise language and avoid unnecessarily complex jargon.nb) Use short punchy sentences. Example: "And then… you enter the room. Your heart drops. The pressure is on."
c) Use simple language. 10th grade readability or lower. Example: "Emails help businesses tell customers about their stuff."
d) Use rhetorical fragments to improve readability. Example: “The good news? My 3-step process can be applied to any business"
e) Use bullet points when relevant. Example: "Because anytime someone loves your product, chances are they’ll:nn- buy from you againn- refer you to their friends"nnf) Use analogies or examples often. Example: "Creating an email course with AI is easier than stealing candies from a baby"
g) Split up long sentences. Example: “Even if you make your clients an offer they decline…[break]…you shouldn’t give up on the deal."
h) Include personal anecdotes. Example: "I recently asked ChatGPT to write me…"
i) Use bold and italic formatting to emphasize words.nj) Do not use emojis or hashtagsnk) Avoid overly promotional words like "game-changing," "unlock," "master," "skyrocket," or "revolutionize."
m) Important - vary sentences length within a paragraph.nn) Avoid the use of emojis, asterisks, hashtags, or underscores.nnp) Avoid bolds, italics, and markdown formatting unless asked fornq) Don't refer to yourself or add an intro or outro.nnnn### 4. COMPANY FAQ:n- *Q: How can I gain access to the exclusive signals and premium community?*n  - A: You can unlock the full potential of our premium services by clicking the following link:  https://buy.stripe.com/14k7vldYz5Pw5JS8wwn-  *Q: What payment options are available for non-UK residents?*n  - A: Non-UK residents can use Stripe for payment:  https://buy.stripe.com/14k7vldYz5Pw5JS8wwn-  *Q: What payment options are available for UK residents?*n  - A: UK residents can use PlugandPay for payment:  https://buy.stripe.com/14k7vldYz5Pw5JS8wwn-  *Q: Can I pay using Bitcoin or USDT?*n  - A: Yes, you can use the following addresses for payment:n    - Bitcoin: bc1q3prr5zywvm34dhhsnecfpql8yfvaga4prze6u5n    - USDT ERC-20: 0x612D63dA1aE515d94Bf0E357477451a3A1A3111Dn- *Q: Are there any countries where your services are not available?*n  - A: Yes, residents from the following countries are not able to use our services: Albania, American Samoa, Australia, Belarus, Bermuda, Bosnia and Herzegovina, Burma/Myanmar, Burundi, Canada, Central African Republic, China, Crimea, Cuba, Democratic Republic of the Congo, Eritrea, Former Federal Republic of Yugoslavia, Guam, Iran, Iraq, ISIL (Da’esh) & Al-Qaida & The Taliban, Libya, Mali, Montenegro, North Korea, Northern Mariana Islands, Puerto Rico, Republic of Guinea, Republic of Guinea-Bissau, Russia, Sevastopol, Sierra Leone, Singapore, Somalia, South Sudan, Sudan, Syria, United States of America, United States Virgin Islands, Venezuela, Yemen, and Zimbabwe.n- *Q: What is the registration process for new members?*n  - A: Follow these steps to register:n    1. Use the referral link provided to create an account on Vantage's website.n    2. Fund your account with the equivalent of 300 USD.n    3. Verify your account with your documents and send me the account number.n    4. I will verify the registration from my end.n    5. Once the registration/deposit shows, I’ll send you invite links to my channels.n- *Q: How do I enable the 50% deposit bonus?*n  - A: Follow these steps to enable the bonus:n    1. Visit Vantagemarkets.com and log in.n    2. Navigate to the "Promotion" section.n    3. Opt-in for the "50 deposit bonus."n- *Q: How can I make a deposit with the broker?*n  - A: To make a deposit, follow these steps:n    1. Visit the Vantage website and go to the "funds" option.n    2. Choose "deposit funds" and select your preferred method.n    3. Once your account shows the funds, let us know.nnn##Customer Regsitration verification.n- When the user mentions something about completing the registration process, ask for the name that they have used and the email they have used for registration and save it onnn[name]n[email]nn- Send the admin a message and use the Telegram tool (Admin_message) and display the name and email of the user to the admin and wait for the response.nn##STATUS OF CHECKING IF THE USER IS REGISTEREDnGET the response and:nIf the user is APPROVED, welcome the user. nIf the user is NOT APPROVED, acknowledge to the user that he is not registered and may have to try again. nnIf the admin approves the message, continue the workflow.nnThis is the current prompt"
        }
      },
      "type": "callin.io",
      "typeVersion": 1.8,
      "position": [
        -2008,
        -160
      ],
      "id": "613c6648-4a8e-4d82-b1ea-09cc9758de4e",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
        "text": "={{$json.output}}",
        "additionalFields": {}
      },
      "type": "callin.io",
      "typeVersion": 1.2,
      "position": [
        -1600,
        -160
      ],
      "id": "d72f49a1-52e3-4881-a457-47c23cb2f5f7",
      "name": "Telegram1",
      "webhookId": "9d0eeec1-81e6-43fb-bab9-9492f9fb2462",
      "credentials": {
        "telegramApi": {
          "id": "njKf0i6ith28nBsM",
          "name": "Telegram account"
        }
      }
    }
  ],
  "pinData": {},
  "connections": {
    "Think": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Code": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code1": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Code1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Call n8n Workflow Tool": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Telegram1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "callerPolicy": "workflowsFromSameOwner"
  },
  "versionId": "8f12a06d-fa27-44a6-8520-5228fcc943e8",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "76a114090afc4c64a210017df49d602599ac79ad55af611fa5c5323e3c54e15b"
  },
  "id": "LGIIcXJw6mrz0OuF",
  "tags": []
}

All good?
 
Posted : 21/04/2025 7:50 am
Steve_Abraham
(@steve_abraham)
Posts: 8
Active Member
Topic starter
 

I'm encountering an issue where the second workflow isn't pasting correctly. Could someone please assist?

 
Posted : 21/04/2025 7:55 am
jcuypers
(@jcuypers)
Posts: 29
Eminent Member
 

Hi,

you need to properly enclose it within a code node for it to be recognized as interactive.

Tip: Import your workflow by selecting the '</>' icon and pasting the workflow's code.

reg,
J.

 
Posted : 21/04/2025 7:59 am
Steve_Abraham
(@steve_abraham)
Posts: 8
Active Member
Topic starter
 

Hey there, it seems my post was hidden. Is it alright if we communicate directly?

WhatsApp or Twitter?

 
Posted : 21/04/2025 8:04 am
BramKn
(@bramkn)
Posts: 19
Active Member
 

Your post has been approved.

:wink:

It was likely flagged due to the rapid pace of replies.

 
Posted : 21/04/2025 8:06 am
Steve_Abraham
(@steve_abraham)
Posts: 8
Active Member
Topic starter
 

Thanks a lot!

 
Posted : 21/04/2025 8:07 am
Steve_Abraham
(@steve_abraham)
Posts: 8
Active Member
Topic starter
 

I've resolved the issue. Please let me know if it's working correctly on your end.

 
Posted : 21/04/2025 8:09 am
Steve_Abraham
(@steve_abraham)
Posts: 8
Active Member
Topic starter
 

Hey there, have you managed to resolve the workflow error?

 
Posted : 21/04/2025 8:35 am
jcuypers
(@jcuypers)
Posts: 29
Eminent Member
 

Hi,

I haven't found a method yet to retrieve the data in the manner you're attempting. It functions correctly without the 'send and wait' feature.

The AI node appears to be waiting for execution within the subworkflow, but it returns data immediately with no content.

Frankly, I believe the workflow should be separated, and you should utilize external storage for the requests.

The AI will receive the request, store it in an external system, and then another process will detect it, send a message to Telegram, and wait. Once the user is approved, an email or similar notification will be sent.

Regards,
J.

 
Posted : 21/04/2025 12:35 pm
Share: