Custom actions not triggering the endpoint

Hi,

Anybody help me in configuring the custom actions to my board. I am choosing this option since i am unable to verify the origin as Monday.com of my webhook.simillar issue related to this thread - Voted

Verify webhook origin as Monday.com

I have created the custom action and recipe. It is added to the board. When i do any changes to the board, the integration is started executing and It was in progress for an hour and later it got failed as mentioned in the screenshot below. Not sure what is the issue.

For your note, i am able to hit the endpoint from postman.

hi @Venkateshwaran

How is your action endpoint configured?

  • are you sure the run URL (in combination with the base URL) is correct?
  • Which input fields are configured and are you sure the standard trigger provide these fields as output?

Thanks for your response.

Sorry, I missed the base url part. But now i have tried by adding the base url and run url is (baseurl + relative resource path). But still facing the same issue. I have configured any authorization url.

Yes I have configured the itemid as input field. The standard trigger is item created.

Not sure what i am missing. I am new to this.

When you say that you have not configured authorization url is that the url in the OAuth scope. If so, that’s ok, you don’t need to have one. What you have to do is to authenticate the request coming from monday. In NodeJS you would add your endpoint something like this:

router.post("/autoid-column/recipeaction", authenticationMiddleware.authMonday, autoIdColumnController.recipeAction);

The authenticationMiddleware is used to authenticate the request send to you by monday. You authenticate the request with your sigingSecret

  try {
    let { authorization } = req.headers;
    if (!authorization && req.query) {
      authorization = req.query.shortLivedToken;
    }
    const { accountId, userId, backToUrl } = jwt.verify(authorization, envVars.signingSecret);
    req.session = { accountId, userId, backToUrl };
    next();
  } catch (err) {
    res.status(401).json({ error: "not authenticated" });
  }

When monday posts to your endpoint you will receive a encrypted shortLivedToken (to be decrypted with your sigingSecret) that can be used to make the monday API call.

async function recipeAction(req, res) {
  const { payload } = req.body;
  const { inputFields } = payload;
  const { boardId, itemId } = inputFields;
  const { authorization } = req.headers;

  const { accountId, userId, aud, exp, iat, shortLivedToken } = jwt.verify(authorization, envVars.signingSecret);

Hope that helps to get you started.