karamokoisrael / directus-extension-flow2pdf

Other
14 stars 3 forks source link

Not working on Directus 10.10 #4

Closed pedrofnts closed 3 months ago

pedrofnts commented 4 months ago

Hello, I've followed all the steps on the README, but I keep getting this on console:

Error: No data found
    at index.js:697:3858
    at async B (index.js:697:3686)

Network shows that a request to flow webhook is being made, but the response is:

{
    "path": "/trigger/9835615d-9f32-4f6a-a0cb-adac7c0a347e",
    "query": {
        "ID": "1"
    },
    "body": {
        "collection": "produtos",
        "keys": [
            "1"
        ]
    },
    "method": "POST"
    +++ headers

And this is being sent to /print:

{collection: "produtos", item: "1",…}
collection
: 
"produtos"
flow_data
: 
{path: "/trigger/9835615d-9f32-4f6a-a0cb-adac7c0a347e", query: {ID: "1"},…}
body
: 
{collection: "produtos", keys: ["1"]}
collection
: 
"produtos"
keys
: 
["1"]
0
: 
"1"
headers
: 
{host: "web.clinibot.io",…}
method
: 
"POST"
path
: 
"/trigger/9835615d-9f32-4f6a-a0cb-adac7c0a347e"
query
: 
{ID: "1"}
item
: 
"1"
template
: 
"flow2pdf-default-template.liquid"

The response is an empty array. Am I missing something?

Abdallah-Awwad commented 4 months ago

You sure you made this?

(Note: the last operation of your Flow should return some JSON data).

pedrofnts commented 4 months ago

You sure you made this?

(Note: the last operation of your Flow should return some JSON data). Captura de Tela 2024-05-09 às 12 14 45

Captura de Tela 2024-05-09 às 12 15 08

Yes, this is what I'm doing.

karamokoisrael commented 3 months ago

Hello, the issue is related to the trigger configurations on latest directus versions.

  1. Make sure that the trigger is not asynchronous.
  2. Make sure that your flow is returning data.