GithubHelp home page GithubHelp logo

zapier's Introduction

Easy Automation for BTCPay Server using Zapier.com - No Programming Skills Required

BTCPay Server can be automated in an unlimited number of ways by using it in a Zapier workflow. Zapier is a simple tool for non-technical people to set up automations, simply by connecting blocks.

Free to Use

The BTCPay Server Zapier integration is free to use, but you do need a Zapier.com account. A free account lets you process 100 actions a month and have 3 workflows called "Zaps".

What does it do?

The BTCPay Server integration on Zapier defines a number of triggers that can be used to tell other applications what to do. You can chain multiple actions and create an entire workflow. Besides triggers, there is also a list of actions to make BTCPay Server do something you want. This can be creating an invoice, for example. In this case the trigger can be something happening on BTCPay Server or in another app or because you received an email.

A simple automation looks like this: Sample Workflow in Zapier

Who is it for?

Zapier is an easy way for non-technical people to automate their workflow. It is also highly flexible and allows you to experiment.

If you are expecting heavy loads however, hiring a developer and building your own custom integration may be cheaper in the long run.

Some Examples

  • When an invoice is paid in BTCPay Server, automatically send a "Thank You" email.
  • When an invoice is settled, create a payment in your accounting software.
  • When an invoice is paid in BTCPay Server, wait 7 days and then automatically send an email to ask your customer to write a review for your store.
  • At the end of the day, automatically move 75% of your funds from a hot wallet to you cold wallet.
  • When an invoice expires, notify your sales team by sending a message in Slack.
  • Automatically add customer email addresses to your Mailchimp account or other newsletter system.
  • Automatically create a new payment request when a row is inserted in a Google Spreadsheet + send the payment link to your customer via email.

Getting Started

Head over to the integrations documentation to get started. You will see some examples here + a list of all triggers and actions we support.

BTCPay Server - Zapier

Requirements

  • An account at Zapier.com (free or paid)
  • A BTCPay Server instance where you have 1 or more stores
  • An API key that has access to the store and resources you want to automate (BEWARE: Never grant more permissions than is absolutely needed!). See below which permissions you should pick for your API key.

Security Considerations

With great power comes great responsibility. So when you automate your BTCPay Server, you should consider the things that could go wrong or get abused if someone were to get hold of your API Key. Because you will be providing Zapier with your API key, we strongly encourage you to create an API key with as little permissions as possible. If you are only going to automate a single store, make sure the API key only has access to the resources for that specific store. BTCPay Server allows you to configure access per store, so use it.

Which permissions should I choose for my API key?

Choosing permissions depends on what you are going to do with Zapier. This list helps you make some choices.

If you want to use triggers, you will need to have the permission btcpay.store.webhooks.canmodifywebhooks. It is easy to overlook this one, but Zapier gets its triggers from a webhook, so that must be allowed.

For the various actions we have, you will need different permissions, like if you want to create or modify an invoice, you will need the btcpay.store.cancreateinvoice and btcpay.store.canmodifyinvoices permissions.

Viewing stores and invoices is also a good idea to add anyway, so those would be btcpay.store.canviewinvoices and btcpay.store.canviewstoresettings.

A good place to start would be these permissions: Example API Permissions

How does it work technically?

  • Every trigger registers its own webhook in the store it is for. There are no global webhooks in BTCPay Server, only ones per store.
  • The webhook only handles the single event it is created for.
  • When you enable the Zap, the webhook is automatically created in BTCPay Server and when you disable, the webhook is deleted.
  • Each webhook uses its own secret, randomly generated by BTCPay Server.
  • The webhook's request signature BTCPay-Sig is used to verify the identity of the sender.

Troubleshooting

I got a 403 Forbidden error, what happened?

You are most likely using an API key that does not have the required permissions. If you are using any of the triggers in Zapier, always make sure you have the btcpay.store.webhooks.canmodifywebhooks permission.

I deleted the webhook from my BTCPay Server store by mistake.

No worries. Just turn your Zap off and on again and the webhook will automatically be recreated in BTCPay Server.

Source Code, Issues and Feature Requests

The Zapier integration source code is available on GitHub at the BTCPay Server Zapier repository. You can also log issues here and ask for missing features. Issues can also be reported through Zapier as you encounter them.

Credits and Support

The BTCPay Server Zapier integration was developed by Storefront.be in their ongoing effort to support this community.

If you are looking to hire professional support or could use a developer for a custom integration, feel free to reach out at Storefront.be.

This repository contains the Zapier integration for BTCPay Server. The Zapier integration allows you to use triggers from BTCPay Server (like when a new invoice was created, paid or expired) to trigger actions in other systems, like send an email, post a chat message, etc.

zapier's People

Contributors

bas02 avatar dennisreimann avatar woutersamaey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

zapier's Issues

Add “Update payment request” API

I have a use case where I need to update an existing payment request when invoice details have been updated on the accounting platform. I can use Zapier’s webhook to PUT a request to that payment request; however, it would be nice to have the option available natively in Zapier.

Thanks!

Verify security

Security was my primary concern when I was developing this integration and the main reason why this code is open source.

Now that it is working and testing has started, I'm calling upon all to review the code and let me know if you think the code is 100% secure. I think it is, but I invite you to evaluate.

Help us test so we can publish publicly on Zapier

In order to publish the app, we need to complete a validation.

The command zapier validate tells us what we need to do.

Mostly, we need to create Zaps for each and every trigger, action or search. That way Zapier will know that what we've built works and they will let us publish.

A free Zapier account allows you to have 3 Zaps. We have more than 3 actions, so we need multiple people to have multiple accounts so each and every trigger, search and action can be covered.

Please create some Zaps and leave them running in your account!

To get access to the private app, contact me and I'll add you.
Once the Zapier integration is published, everyone will be able to use it.

PS: There are some warnings as well that I haven't pasted here, but these can be ignored. I've already addressed them the best I can and they are not blocking.

1. Get your access to the app

Use this invite link: https://zapier.com/developer/public-invite/138823/2132b7099f6ec87c6474d94b4ba7e066/

2. Things we need to take care of:

Category Method Description Link
Publishing Tasks triggers.InvoiceReceivedPayment needs a successful task but doesn't have a Zap (T001) https://platform.zapier.com/docs/integration-checks-reference#T001
Publishing Tasks triggers.InvoiceReceivedPayment need to compare static sample with latest task but doesn't have a Zap (T004) https://platform.zapier.com/docs/integration-checks-reference#T004
Publishing Tasks triggers.InvoiceReceivedPayment need to compare a live trigger result with output field definition but doesn't have a Zap (T005) https://platform.zapier.com/docs/integration-checks-reference#T005
Publishing Tasks triggers.InvoiceReceivedPayment need to compare polling sample with latest task but doesn't have a Zap (T006) https://platform.zapier.com/docs/integration-checks-reference#T006
Publishing Tasks triggers.InvoiceReceivedPayment need to compare a polling sample with output field definition but doesn't have a Zap (Z001) https://platform.zapier.com/docs/integration-checks-reference#Z001
Publishing Tasks triggers.InvoicePaidInFull needs a successful task but doesn't have a Zap (T001) https://platform.zapier.com/docs/integration-checks-reference#T001
Publishing Tasks triggers.InvoicePaidInFull need to compare static sample with latest task but doesn't have a Zap (T004) https://platform.zapier.com/docs/integration-checks-reference#T004
Publishing Tasks triggers.InvoicePaidInFull need to compare a live trigger result with output field definition but doesn't have a Zap (T005) https://platform.zapier.com/docs/integration-checks-reference#T005
Publishing Tasks triggers.InvoicePaidInFull need to compare polling sample with latest task but doesn't have a Zap (T006) https://platform.zapier.com/docs/integration-checks-reference#T006
Publishing Tasks triggers.InvoicePaidInFull need to compare a polling sample with output field definition but doesn't have a Zap (Z001) https://platform.zapier.com/docs/integration-checks-reference#Z001
Publishing Tasks search.FindInvoice needs a successful task but doesn't have a Zap (T001) https://platform.zapier.com/docs/integration-checks-reference#T001
Publishing Tasks meta.stats must have at least 3 users with live Zaps, currently has 1 (S001) https://platform.zapier.com/docs/integration-checks-reference#S001
Publishing Tasks meta.stats trigger "InvoiceConfirmed" has no live Zaps using it, must have at least one (S002) https://platform.zapier.com/docs/integration-checks-reference#S002
Publishing Tasks meta.stats trigger "InvoicePaidInFull" has no live Zaps using it, must have at least one (S002) https://platform.zapier.com/docs/integration-checks-reference#S002
Publishing Tasks meta.stats trigger "InvoiceReceivedPayment" has no live Zaps using it, must have at least one (S002) https://platform.zapier.com/docs/integration-checks-reference#S002
Publishing Tasks meta.stats search "FindInvoice" has no live Zaps using it, must have at least one (S002) https://platform.zapier.com/docs/integration-checks-reference#S002

Add "Get Payment Request" API

I'm creating a workflow that requires the Zap to get information from an existing payment request to pass that on to other applications. I'm using a Zapier webhook to perform that action now; however, it would be helpful to have that exposed in the Zapier dashboard as a dropdown option. Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.