Webhook error : Configurate cloudconvert API and use it in a webhook

Hi everyone,

I'm currently trying to use cloudconvert API and use their Webpage capture feature to show a PNG image of a looker studio report inside app.

I builted the body  with their free tool (https://cloudconvert.com/api/v2/jobs/builder) .  

There are 2 steps : capture the webpage from the url, then export the file url.

 

 

 

{
    "tasks": {
        "LookerReportCapture": {
            "operation": "capture-website",
            "url": "https://www.googlecloudcommunity.com/",
            "output_format": "png",
            "engine": "chrome",
            "screen_width": 1440,
            "screen_height": 4000,
            "width": 1440,
            "height": 4000,
            "fit": "max",
            "transparent_background": false,
            "wait_until": "load",
            "wait_for_element": "iframe",
            "wait_time": 20000,
            "headers": {
                "Authorization": "privateeyJhdWQiOiIxIiwianRpIjoiMprivatejBmZGM3NTY2ZGY1MmQxMTMzZGZlNjJlMWYwYWQwZWVmNWRkMTk5Njc3OGUyNmNkMDE5NWQ0NTA0MzM4ZGNjNjUxZDA5ZDc1Y2IiLCJpYXQiOjE2OTc3MTgwNDguMzMwOTI1LCJuYmYiOjE2OTc3MTgwNDguMzMwOTI2LCJleHAiOjQ4NTMzOTE2NDguMzIyNDQxLCJzdWIiOiI2NTcxNzYxMyIsInNjb3BlcyI6WyJ0YXNrLndyaXRlprivate19.c70eMsDcb1KQdVld3G5Z5g9nne_1uyWfVyeW2crjDcNN37ZTSW2DctFvyJakdPjV-pyG2leYCWObvZf90ffcdUN2Fc6e5tz4tA1axiB6privatebCNxqiJd9Qh-fl0jXiLYC05tbhxTmcLFAml0H938P1Hc2Ka52lcqayqYHQ2T6qhVsydRBmfcdaEgPK0MRO5m3A6tg_Zo5yzhSEvmx8R_EEx8cf-wWJ-Z-hsfIKA8n5tDo5r0nBjpzBMa3jw1DIe3ZbwJswQ7R0ooKuCo_bB-ImBHdD-fr937SJlfjWPSOzkcPFXn0-91pHZQ71zVoQlWe3XdhOe9nS4HE-gXN7mo8-Bs_LqLkU74rYZgSOjYSkP8lQ7i_lEoN4ibG5zQzi93-RLPWEU3FB1ku3tVnCSk2wv23cq2EeDgKpqX7z8-PWdKz2FH0WtB1ux3GgviH5Br3NeQ6XKml0OdY9ViGUVKMqeVsxyr02gM_2_A5lXGNyytvgP2h_vXk6K4e3uRPqMGkFp0m6UOD1E5j7-0MWurZ8Ae-njZf6_45ejvMbnm_XjhraPdsKTWac-uipVVY-gk87ZEsaf6U6bpsy0kb9SP1IgtoqCxdW0uuYUDHIHVPiz6Mu8K8M5L9iyxgI_6ypQwOqBV7wLt9bXnnUX_Jxd4W50Ob_NHbEkWAjE"
            }
        },
        "exportReportCapture": {
            "operation": "export/url",
            "input": [
                "LookerReportCapture"
            ],
            "inline": true,
            "archive_multiple_files": false
        }
    },
    "tag": "jobbuilder"
}

 

 

 

 

Here's an answer example : 

 

 

 

 

{
    "data": {
        "id": "3b07f6de-16b9-4e4c-ad5d-b209639fca00",
        "tag": "jobbuilder",
        "status": "waiting",
        "created_at": "2023-10-19T14:06:10+00:00",
        "started_at": null,
        "ended_at": null,
        "tasks": [
            {
                "id": "3460d439-921f-44d3-b65c-2c8527424422",
                "name": "LookerReportCapture",
                "job_id": "3b07f6de-16b9-4e4c-ad5d-b209639fca00",
                "status": "waiting",
                "credits": null,
                "code": null,
                "message": null,
                "percent": 100,
                "operation": "capture-website",
                "engine": "chrome",
                "engine_version": "116",
                "result": null,
                "created_at": "2023-10-19T14:06:10+00:00",
                "started_at": null,
                "ended_at": null,
                "retry_of_task_id": null,
                "copy_of_task_id": null,
                "user_id": 65717613,
                "priority": -10,
                "host_name": null,
                "storage": null,
                "region": null,
                "depends_on_task_ids": [],
                "links": {
                    "self": "https://api.cloudconvert.com/v2/tasks/3460d439-921f-44d3-b65c-2c8527424422"
                }
            },
            {
                "id": "72232a78-0452-4604-bb26-6f8dedcb40ce",
                "name": "exportReportCapture",
                "job_id": "3b07f6de-16b9-4e4c-ad5d-b209639fca00",
                "status": "waiting",
                "credits": null,
                "code": null,
                "message": null,
                "percent": 100,
                "operation": "export/url",
                "result": null,
                "created_at": "2023-10-19T14:06:10+00:00",
                "started_at": null,
                "ended_at": null,
                "retry_of_task_id": null,
                "copy_of_task_id": null,
                "user_id": 65717613,
                "priority": -10,
                "host_name": null,
                "storage": null,
                "region": null,
                "depends_on_task_ids": [
                    "3460d439-921f-44d3-b65c-2c8527424422"
                ],
                "links": {
                    "self": "https://api.cloudconvert.com/v2/tasks/72232a78-0452-4604-bb26-6f8dedcb40ce"
                }
            }
        ],
        "links": {
            "self": "https://api.cloudconvert.com/v2/jobs/3b07f6de-16b9-4e4c-ad5d-b209639fca00"
        }
    }
}

 

 

 

 

 

 

 In the webhook, I let the http headers blank as the auth token is in the body.

I toggled on return value , and set specific type field as "result.files" , type Text.

I'm first trying to get the url of the png and show it in app.
Issue is, i'm getting this error on appsheet : 

Error encountered in step with name [Capture d'écran du rapport]: Error: 'Set Column Values' Data action ''Set Column Values' Data action 'Capture d'écran du rapport Action - 1'' failed with exception 'Set Column Values' Data action 'Capture d'écran du rapport Action - 1' failed because field 'CaptureAPI' in table 'Plan de contrôle' could not be computed due to exception Error: Failed Webhook type translation: Webhook HTTP request failed with exception The remote server returned an error: (401) Unauthorized.

While I can open the file in the builder, the url in the request answer also says  'unauthorized'. I don't truly know how to configure this. Also, i'm not sure of the return value name. I'm asking for your help please 👐

0 1 130
1 REPLY 1


@baba_sawane wrote:

the url in the request answer also says  'unauthorized'. I don't truly know how to configure this. Also, i'm not sure of the return value name


Call a webhook from an automation - AppSheet Help
Top Labels in this Space