Skip to main content
Question

Triggering a Github action from my Zap

  • 3 June 2024
  • 3 replies
  • 47 views

I’m trying to trigger a Github action that’s listening to ‘repository_dispatch’ events. How do I create it on the Zapier side? I know it should probably be through Webhooks by Zapier > POST. But I’m unsure how to fill in the other fields, which ones are required, how to auth, etc… 

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

3 replies

Userlevel 7
Badge +11

Hi @GorkEvenUp, welcome to the Community! 🎉

Webhooks are more advanced than standard app triggers and actions as you’d need to reference GitHub's API documentation to determine which fields and parameters are required.

Are you wanting to set up a Zap to trigger when a new repository event happens?

If so, perhaps you could use the existing New Repo Event trigger for GitHub instead of setting up a webhook. Judging by the description the New Repo Event trigger should allow you to “listen” for any event that happens on a repo: 
ae337c2e77c48fd26d133b99a0282ce5.png
Then you could add a filter to the Zap to ensure it only continues for certain types of events. If you’ve not worked with filters in Zaps before you can learn more about them here: Add conditions to Zaps with filters

Do you think that approach could work? If I’ve misunderstood what you’re looking to do with this workflow or you run into any trouble on that please let me know!

Sam, thank you for the answer. To clarify, I was interested in triggering a workflow via Zapier. I managed to do it via a POST event by ‘Webhooks by Zapier’. My only concern now is to store my Github token properly. Currently it’s fed into my action as plaintext, can I use a secret storage of some kind and pull it from there? 

Userlevel 7
Badge +11

Thanks for clarifying that @GorkEvenUp! In that case I’ll move this over to the Code & Webhooks section of this Community.

You could use Storage by Zapier to store the secret. Storage by Zapier has a Get Secret action that could be used to retrieve the secret to be passed to the Webhook action.

Hope that helps. Please do reach back out if you run into any issues on that or have any further questions! 🙂