template7
template8
== Examples ==
=== Create a Subaccount from a Google Form ===
1. Create the Google form(https://docs.google.com/forms/u/0/) , you will need to at least “request” on the form
a)Username
b)Email
c)Password
2. Go to Integromat and create a scenario, start with a Google Forms, and set it to “Watch Responses”
[[Image:integromat_subaccount1.png|650px|link=]]
[[Media:integromat_subaccount1.png|view large]]
3. Set the connection ( you will need to Allow Integromat to access your Google account),
a) Choose the “File” this is the same name you gave your “Form” in Google forms.
b) Worksheet, Google forms should create a worksheet in your Google drive, you need to select this here.
c) Maximum number of returned rows, Here, set the maximum number of results that Integromat will work with during one cycle, You can set this to one, we will make this scenario constantly checking for new responses.
[[Image:integromat_subaccount2.png|650px|link=]]
[[Media:integromat_subaccount2.png|view large]]
4. After this, it will ask you to “Select the first row” this means the row you want Integromat to start checking the worksheet, it should normal be set to number”2” because the first row is used for the column names.
5. Now we will need to add another module, add the “Json” module and set it to “Create Json”
6. You will need to add a “Data Structure.
a) Click on “Add”
b) “Name the data structure” and click on “Generator”
c) Leave the “Content Type = Json
d) On the Sample Data insert
{
"authentication": {
"apiKey": "apiKeyAsSetInAccountSettings"
},
"createAccount": [
{
"username": "username",
"password": "password",
"apiKey": "YourKeyToUseForTheNewAccount",
"role": "0",
"systemEmails": "0",
"bookingEmails": "0",
"bookingReplyto": "0"
}
]
}
[[Image:integromat_subaccount3.png|650px|link=]]
[[Media:integromat_subaccount3.png|view large]]
*Click on “Save”, you should now see the original “window” with your data structure and it should have a “Authentication” box where you need to insert the API key,
[[Image:integromat_subaccount4.png|650px|link=]]
[[Media:integromat_subaccount4.png|view large]]
*You need to set the API key you have set under Settings -> Account - > Account Access
*Click on “Add Items” under Create Account in Integromat, here you will need to add the variables into the correct fields.
**Leave the “API” field empty, the fields
***Role
***systemEmails
***bookingEmails
***bookingReplyto
**Can be manually filled by you conform your requirements, for information about this fields please have a look at this page, https://api.beds24.com/json/createAccount
After you have done this, click on “Add” and than click on “Ok”.
Now we are going to create another module.
*Set the module HTTP, and set this to “Make a Request”
**Set the:
***URL: https://api.beds24.com/json/createAccount
***Method:Post
***Header: Leave blank
***Query String: Leave blank
***Body Type: Raw
***Content Type: JSON
***Request Content: JSON String ( Its a variable you need to drag and drop).
[[Image:integromat_subaccount5.png|650px|link=]]
[[Media:integromat_subaccount5.png|view large]]
Click on “OK” and you are ready to test this scenario,
Open you Google form and insert some information, “username / Email and password” this will be added to row 2 on your worksheet, go to Integromat and click on “Run Once” it will insert this user as a sub account into your Beds24 account.
== Common Problems ==