'Can't create a simple webhook fulfillment Good Actions Console

I am trying to do a simple google home integration with my home server. My only goal is to have it say "Hey google, turn on pool lights" and "Hey Google, turn off pool lights". Both should be mapped to https://mywebsite.com/fullfillment. Once it hits my express server which is running actions-on-google (code below) I have sample code that should properly respond.

Right now whenever I try to create a webhook fulfillment, I just get an error. What am I missing here to just have google home interact with my home server? I've watched countless tutorial and read articles but none really work with remote webhooks, most are fulfillment through firebase or through the inline editor. I have setup OAth as well in the activity linking but I still get the same error "We're sorry but something went wrong. Please try again".

I have also made sure my app and activity controls are enabled as well. I'm just trying to get the action to recognize the webhook and not through this error, if the error at least had some information I could move forward. The "Logs in Google Cloud" also show nothing at all. I have also changed the invocation to a long more custom name and still same error.

Below is a video showing me running through creation of a new Smart Home action on a fresh google account with a postman clip hitting my home server with the correct payload. I've tried this with multiple variations of the webhook url, ngrok was just the latest attempt.

https://youtu.be/Txv1HmP0yW4

Code for my express server below.

const express = require('express');
const bodyParser = require('body-parser');

const {
    dialogflow,
    actionssdk,
    Image,
    Table,
    Carousel,
} = require('actions-on-google');

const app = dialogflow({
    debug: true
});

app.intent('Default Welcome Intent', (conv) => {
    conv.ask('How are you?');
});

app.intent('bye', (conv) => {
    conv.close('See you later!');
});

app.catch((conv, error) => {
    console.error(error);
    conv.ask('I encountered a glitch. Can you say that again?');
});

app.fallback((conv) => {
    conv.ask(`I couldn't understand. Can you say that again?`);
});

const expressApp = express().use(bodyParser.json());
expressApp.post('/fulfillment', app);
expressApp.listen(1349, () => {
    console.log("Test on port 1349");
})


Solution 1:[1]

If you have created an Actions on Google Project using dialogflow or Assistant conversational action, it won’t work as a Smart Home integration anymore. Please create a new project in the Actions on Google Console, selecting Smart Home as the project type.

Once you create your action, if you intend to build your own server handling smart home requests, a good way to start could be with the Smart Home Washer codelab. You can replace the fulfillment url to your own server, keeping the firebase database and everything else the same. Once you verify you can handle fulfillment requests, you can carry over the rest of the pieces (OAuth) to your server as well. If you get stuck debugging the smart home fulfillments, you can take a look at the Troubleshooting guide.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Anish Yadav