Describe the problem/error/question
My workflow starts with a webhook that processes data and then makes an API call using an HTTP request to initiate a phone call. Once the call concludes, the notes from the call are sent back to my workflow via a second webhook trigger. I then need to combine the data from the initial webhook (Name, email, phone) with the data from the second webhook trigger (the call notes, which arrive approximately 5 minutes after the call is initiated). This consolidated data must then be passed to another API call to update my CRM. The problem is that the execution finishes at the first source of the merge node, and the trigger for the post-call data initiates a second execution that concludes at the second source of the merge node. Consequently, I end up with two separate executions that never merge their data, preventing it from being sent to my CRM. Upon reflection, I believe I understand the issue: having two triggers results in two distinct executions. I need the webhook to receive data to advance the workflow, but I want to disable the "trigger" functionality for the second webhook.
What is the error message (if any)?
None.
Please share your workflow
Share the output returned by the last node
Information on your n8n setup
- n8n version:
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app):
- Operating system:
Please provide the rewritten markdown content *it should be in the markdown format.
That won't work because each Trigger-Node initiates a new workflow execution. This means the data from each Webhook call will end up in a completely separate execution.
You can achieve this using a Wait-Node.
The Webhook-Trigger node will start the execution, and the Wait-Node (configured to “Resume: On Webhook Call”) will then pause until the relevant URL is invoked, after which it will continue. This way, the data from both calls will be consolidated into the same execution.
But how will my application know the webhook to send to if the webhook from the wait node is generated at runtime? I need a static webhook to define in my system after the phone call is made and the data is then sent into callin.io. I’ll need to use the exact match of the phone / email address from the 1st incoming webhook and add the post call data from the second webhook. I don’t see how that will be possible if the webhook isn’t available to setup until run execution.
Wouldn’t it just be easier to remove the “trigger” status of that node? I can do that in callin.io for this very reason. Never really found another way to make that happen in callin.io except to setup two separate workflows which also means that every call that’s made costs me at least 2 executions.
Please provide the rewritten markdown content *it should be in the markdown format.
Unfortunately, I don't see a way to achieve this without a different URL (or a property, if we had that implemented). Alternatively, you could consider "removing the trigger status".
Let's imagine it works as you envision. You'd call one workflow with the first webhook, then initiate another, and then another. This would leave three workflows "waiting". Now, you call the second Webhook URL. What is the intended outcome? You need a mechanism to ensure the correct execution is invoked; otherwise, you'll end up with mismatched data. Some form of routing is necessary to direct the data to the appropriate workflow. In callin.io, this is managed through the URL.
To address your question about how it functions: you are correct that callin.io generates this URL at runtime, and you can also access it via the variable $execution.resumeUrl
. This implies you would need to instruct the system to call that specific URL once the second set of data is available. Based on your workflow, this data would likely be sent to the system within the HTTP Request
node.
If your system doesn't support custom callback URLs, you'd need to implement this functionality yourself. This would involve saving a custom-ID to Callback URL mapping at the end of a workflow run. You could then have a second workflow that reads this custom-ID, locates the Callback URL, and calls it with the relevant data. However, in such a scenario, you could almost as easily save the data from the first call somewhere (like a database) and then retrieve it again when the second call is received.
Ultimately, regardless of the method, it will involve two executions. To be candid, while it might seem like a single "task" for you, the engine processes it twice, so it's not entirely inaccurate. It's akin to having a phone conversation on one topic, hanging up, and then calling the same person back to continue the discussion – you'd typically be billed for two separate calls.
So, in our CRM, we tag a contact record to initiate a call to a person using AI. This is for making a phone call, so I'm finding it a bit confusing when you mention calling this, calling that, and calling a workflow with three webhooks in waiting. These actions are actually sequential. The workflow begins when the webhook trigger receives a request to make a phone call. The necessary information for the call and the contact record details are sent to the webhook. Following that, a code node is used to randomly select one of two voice agents, either a male or a female voice. Once the workflow has this information, it sends an HTTP POST request to the dialing system. The dialing system then provisions the appropriate AI agent and executes the script. After the conversation concludes, the phone calling system sends the call results to the second webhook. However, the data it sends includes call information and may only contain the phone number, which it might have modified as it's a new data output. Consequently, the call results are merged with the contact record that was received by the first webhook (the Trigger Node). We then use this combined data to update the CRM via the final HTTP POST, informing the user about the call's outcome and enabling them to filter leads based on the result.
The reason I require this to be consolidated into a single workflow is that the import of the contact record into the CRM necessitates an exact match on the phone number or email address to identify the correct record for updating. When the phone system sends the post-call data back to the workflow with the call results, the data it provides is modified by the AI and could be unique. For example, if I send the phone number and email address to the phone system, the information I receive back might not include the original phone number or email address if that data isn't part of the phone call itself. Essentially, I'm receiving a transcript. It consistently includes the phone number that was called, but the format might differ since it's generated by the system and undergoes transformation. This means it won't be an exact match.
Therefore, what we're implementing here is akin to a GET request, but due to the human interaction involved, it's handled as a POST. Upon completion of the phone call, there's a POST request from the phone system back to the workflow. This means they are not two separate calls; rather, it's a delayed GET. There should be a mechanism to allow webhooks later in the workflow, as they are the initial step in most cases (9 out of 10 times), but occasionally they are simply a function within the overall workflow. I cannot account for the variables presented by multiple third-party systems. This is why callin.io doesn't mandate having the webhook as the trigger.
I'm seeking suggestions and appreciate all the assistance. This is genuinely the only hurdle I've encountered.
...and I haven't spent any time considering the 'wait on webhook' request because I can't even begin to figure out how to use a dynamic webhook with a third-party system where the webhook is generated uniquely at runtime. It's incredibly perplexing, and I have no idea where to start. I might as well try to learn binary. Now, if the wait node supported a static URL that could be predefined, allowing it to wait until that specific webhook was posted, then yes, that would be precisely what I need. I don't control the phone system's infrastructure, so I have no insight into how we could implement a dynamic URL there. I mean, I looked at it and thought, "What on earth is that?!" LOL
Could you please offer some ideas? This is really the only issue I've faced.
I'm currently facing a challenge and need to get this finished. I appreciate all the assistance provided.
This discussion was automatically closed 90 days following the last response. New replies are no longer permitted.