baptisteArno / typebot.io

💬 Typebot is a powerful chatbot builder that you can self-host.

Home Page:https://typebot.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HTTP request, save in variables

mat-ti opened this issue · comments

commented

I'm using the HTTP Request Integration to run a Job Template in AWX. With the ID of the Job a started I'll do the 2nd request to get the result.

URL: http://awx.domain.net/api/v2/jobs/{{awx_job_id}}/
When I press the button "Test the request" I receive valid data, which looks like this stripped down snippet:

  "statusCode": 200,
  "data": {
    "id": 487,
    "type": "job",
    "url": "/api/v2/jobs/487/",
    "created": "2024-06-12T10:08:00.069585Z",
    "modified": "2024-06-12T10:08:00.513772Z",
    "job_type": "run",
    "project": 27,
    "status": "successful",
    "failed": false,
    "started": "2024-06-12T10:08:00.710642Z",
    "finished": "2024-06-12T10:08:11.602719Z"
    },
    "job_template": 59,
    "webhook_guid": "",
    "host_status_counts": {
      "ok": 1
    },
    "custom_virtualenv": null
  }
}

While im Testing the complete flow, the request is still working, but typebot seems to have an issue to safe the Response in the variables. My Check for printing these variables is here:

data.status: running (should be successful)
data.id 487
data.failed: false
data.started: 2024-06-12T10:08:00.710642Z
data.finished: (should be a timestamp like above)

Thanks you for helping me out.

Can you provide a reproduction? I don't understand the issue.

commented

Sorry for my misleading spelling. The HTTP request shows me all the data and I can also see in my response that valid data is coming back. The same HTTP response is made in the flow. This data is saved in a variable and then output using the text module. The content of the variable is then empty or has a different value.
The background is that I want to query the status of the AWX job and wait for it to be successful, but the variable then says e.g. pending

Can you provide a reproduction? I need to reproduce the bug you are mentioning