Create Publication

We are looking for publications that demonstrate building dApps or smart contracts!
See the full list of Gitcoin bounties that are eligible for rewards.

Solution Thumbnail

Zapier Integrates Algorand Blockchain With More Than 3000 Apps

Overview

Integration between tools we use in our daily life has become necessary, as it saves time and effort wasted on boring repetitive tasks. Today, I present to you the Algorand application on the famous integrations tool Zapier. After you implement this solution, you can integrate Algorand blockchain with more than 3000 applications such as Slack, Google Sheet or Even Telegram.

Requirements:

● Zapier Account
● Algorand App On Zapier
● Algorand Wallet ID

1. Getting Started:

The first step to get-started is to add Algorand app on your Zapier account by accessing this link .
EditorImages/2021/05/09 14:18/1.png Figure 1-1: Accept Invite and Build a Zap

Click on “Accept Invite” as shown above in Figure 1-1.

2. Setup Your Trigger

-From dashboard, click on “MAKE A ZAP” button
- Search for Algorand, and you will find the app as shown below in Figure 2-1.
EditorImages/2021/05/09 14:21/2.png Figure 2-1: Search for Algorand Zap

- Choose “Watch Transactions” button, and click on Continue like shown in below Figure 2-2
EditorImages/2021/05/09 14:22/3.png Figure 2-2: “Watch Transactions” button

It’s now to add your wallet, click on Sign in to Algorand as shown below in Figure 2-3
EditorImages/2021/05/09 14:23/4.png Figure 2-3: Sign in to Algorand

**- Add your Wallet , and click on “Yes, Continue”

  • Click on Continue
  • Click on Test Your trigger**

You will see this result (Figure 2-4):
EditorImages/2021/05/09 14:25/5.png Figure 2-4: Test your trigger result

3. Setup Your Actions

You can do any actions when a transaction happens on Algorand blockchain, for example you can send yourself a Slack notification, all you need is to choose whatever you want.(Figure 3-1)
EditorImages/2021/05/09 14:26/6.png Figure 3-1: Choose any up and setup your action

4. Use Algorand App as an action

in this step you can use Algorand app as action also
**You have two options:

  • Get Balance
  • Get All Transactions**

In the get balance module you can choose to get balance when something happens. For example you can create this zap:
Every 15 Minutes, Get my balance , Update it in Google Sheet.(Figure 4-1)

EditorImages/2021/05/09 14:28/7.png Figure 4-1: setup actions using Algorand app

5. Explainer Video

6. How to make your own integration

Open this link and click on “Start a zapier integration” as shown below (Figure 6-1)
EditorImages/2021/05/12 13:57/6-1.png Figure 6-1: “Start a zapier integration”
After you fill the required data click on “Create”

A. Setup your Authentication:
EditorImages/2021/05/12 14:03/6-2.png Figure 6-2: Setup your Authentication

Click on “Set Up Authentication” as shown in above Figure 6-2, then select API Key
Click on “Save”

Now you should setup your authentication field, Click on “Add Fields”
EditorImages/2021/05/12 14:06/6-3.png Figure 6-3: fill required fields

Fill the required field as shown in the above Figure 6-3
Label: address
Key: address

Click on “Add” then “Continue”

EditorImages/2021/05/12 14:08/6-4.png Figure 6-4: Switch to code mode

Switch to code mode and paste this code:

 const options = {
  url: `https://algoexplorerapi.io/v2/accounts/${bundle.authData.address}`,
  method: 'GET',
  headers: {
    'accept': 'application/json'
    },
  params: {

  }
}

return z.request(options)
  .then((response) => {
    response.throwForStatus();
    const results = response.json;


    return results;
  });

Then click on “Save & Continue”
EditorImages/2021/05/12 14:11/6-5.png Figure 6-5: Test your trigger.
Test your trigger and click on “Save & Finish”.

B- Setup Your Trigger
Fill the required fields as shown in below (Figure 6-6):
EditorImages/2021/05/12 14:15/6-6.png Figure 6-6: Fill the required fields

Click on “Save and continue”
Click on “API Configuration”, then “Switch to code mode” like shown in below Figure 6-7
EditorImages/2021/05/12 14:19/6-7.png Figure 6-7: Switch to code mode

Paste this code:

const options = {
  url: `https://algoexplorerapi.io/idx2/v2/accounts/${bundle.authData.address}/transactions`,
  method: 'GET',
  headers: {
    'Accept': 'application/json',

  },
  params: {

  }
}

return z.request(options)
  .then((response) => {
    response.throwForStatus();
    const results = response.json;

    return results.transactions;
  });

As shown below Figure 6-8 Test your module and click on “Finish Testing & Continue”
EditorImages/2021/05/12 14:27/6-8.png Figure 6-8: Test your module and click on “Finish Testing & Continue”

C- Setup your actions:
- Get All Transactions
Fill the required fields as shown in this (Figure 6-9):
EditorImages/2021/05/12 14:30/6-9.png Figure 6-9: Fill the required fields

Click on “API Configuration” and paste this code:

const options = {
  url: `https://algoexplorerapi.io/idx2/v2/accounts/${bundle.authData.address}/transactions`,
  method: 'GET',
  headers: {
    'Content-Type': 'application/json',
    'Accept': 'application/json'
  },
  params: {

  }
}

return z.request(options)
  .then((response) => {
    response.throwForStatus();
    const results = response.json;




    return [results.transactions];
  });

- Get Balance
Fill all empty field as show in this (Figure 6-10):
EditorImages/2021/05/12 14:33/6-10.png Figure 6-10: Fill all empty field

Paste this code:

const options = {
  url: `https://algoexplorerapi.io/v2/accounts/${bundle.authData.address}/`,
  method: 'GET',
  headers: {
    'Content-Type': 'application/json',
    'Accept': 'application/json',

  },
  params: {

  }
}

return z.request(options)
  .then((response) => {
    response.throwForStatus();
    const results = response.json;




    return [results];
  });