If you want to publish moments created with GeoBooster on your social media account, you need to set up an integration with Zapier. Let’s say you want to publish your moments to Twitter.
First of all, go to https://zapier.com/ and create an account (if you don’t have one). You will need a Premium account to work with webhooks and looping.
Create a new zap: click on “Create zap.”
Set the name of your zap, then type “Webhook” in the search input below the “App event” and click on the “Webhooks by Zapier” in the search results list.
Select “Catch Raw Hook” in the “Event” dropdown and click the “Continue” button.
Copy the “webhook URL”, then go to GeoBooster web-application, choose your business, proceed to the “Settings” page, paste the URL into the “Zapier webhook” field, and click the “Update” button.
Create a new moment in the GeoBooster for your business and approve it for publishing.
Go back to Zapier and click on the “Test trigger” button.
It may say something like “We couldn't find a request”, which is OK, because GeoBooster sends moments to the webhook every 10 minutes. Please wait for 10 minutes and click the “Test trigger” button again.
You should see the “We found a request!” message. Click the “Continue” button below.
You will see the “Action” form. Type in “Code” in the “App event” field and select “Code by Zapier” in the search results below.
Click in the “Event” field and select “Run Javascript” in the dropdown below.
Click on the “Setup action” button.
Type “body” into the “Input Data” field, click in the “Enter text or insert data…” field, and select “Raw Body” in the dropdown.
Copy the script below and paste it into the “Code” field:
output = JSON.parse(inputData.body).map((moment) => {
return {
description: moment.description,
formattedAddress: moment.from_office ? moment.business.name +' office': moment.formatted_address,
country: moment.country.name,
state: moment.administrative_area.name,
city: moment.city.name,
customerName: moment.customer || 'Anonymous customer',
employeeName: moment.employee?.name || moment.business.name,
mainImage: moment.images.length ? moment.images[0].full_url : 'no image',
secondImage: moment.images.length > 1 ? moment.images[1].full_url : 'no image',
categoryName: moment.category?.title || 'Uncategorized'
}
})
You will get something like this. Click the “Continue” button.
Click the “Test action” button.
You will see something like this. Click the “+” button below.
You will see the “Action” form. Type in “Looping” in the “App event” field and select “Looping by Zapier” in the search results below.
Click in the “Event” field and select “Create Loop From Line Items” in the dropdown below.
Click the “Continue” button.
Type “Media” in the “Values to Loop” field, click in the “Enter text or insert data…” field, select “Run Javascript in Code by Zapier”, and the “Show all options” button.
Select the “Main image” option from the dropdown.
Click the square shaped “+” button to add a new line.
Fill up the “Set up action” form as shown below.
Leave other fields unchanged, scroll down, and click the “Continue” button.
Click the “Test action” button.
You will see “Your loop ran successfully…” message. Click the round “+” button below.
You will see the “Action” form. Type in “Twitter” in the “App event” field and select “Twitter” in the search results below.
Click in the “Event” field and select “Create Tweet” in the dropdown below.
Click the “Continue” button.
Click in the “Twitter account” field and click on the “Connect a new account” in the dropdown below.
A new window will open, asking to provide access to your Twitter account. Click the “Yes, Continue” button.
A new window will open, click the “Authorize app” button.
You will be redirected back to Zapier, your account will be chosen in the “Twitter account field. Click the “Continue” button.
Fill in the “Message” field as shown below:
Click into the “Image, Video or GIF” field and select “Create Loop From Line Items in Looping by Zapier”->”Show all options”->”Media”.
Click the “Continue” button.
Click the “Test Action” button (Warning: your moment will be published in your Twitter account!).
If everything went smoothly you will see “A Tweet was sent to Twitter…” message. Click the “Publish Zap” button below.
Click the “Publish & Turn On” button.
Congratulations! You’ve successfully set up posting from GeoBooster to Twitter. Your tweet will look like this.