Hi @lEmNiCk
For us to have more info, we would need to see how the Zap step 1 Python Code is configured.
The Zap step 1 would run every 10 minutes.
If the Zap step 1 is returning line items, then you can iterate thru each line item using the Looping Zap app: https://zapier.com/apps/looping/help
NOTE: The Looping Zap app has a limit of 500 iterations.
I have an output here.
It shows the line items from the API - It splits the results into different records.
I am trying to make an API call to FileVine because the current app in zapier only works with the old API and I have a new API with a bearer token.
I will have to delete this image after your response.
@lEmNiCk
We would need to see screenshots showing how the python code within Zap step 1 is configured to have more context.
import requests
# Credentials
personal_access_token="PAT",
client_id="CID",
client_secret="CIS",
# Get bearer token
token_url = "BEARER TOKEN URL"
token_data = {
"grant_type": "personal_access_token",
"token": personal_access_token,
"client_id": client_id,
"client_secret": client_secret,
"scope": "THE SCOPES"
}
token_response = requests.post(token_url, data=token_data)
bearer_token = token_response.json()["access_token"]
# Get user/org IDs
org_url = "ORGS TOKEN URL"
org_headers = {"Authorization": f"Bearer {bearer_token}"}
org_response = requests.post(org_url, headers=org_headers)
org_data = org_response.json()
user_id = org_data["user"]["userId"]["native"]
org_id = org_data["orgs"][0]["orgId"]
# Get project list
project_url = "REPORTS URL"
project_headers = {
"Authorization": f"Bearer {bearer_token}",
"x-fv-userid": str(user_id),
"x-fv-orgid": str(org_id)
}
project_params = {
"limit": 500,
"offset": 0,
"excludeArchived": False
}
project_response = requests.get(project_url, headers=project_headers, params=project_params)
output = project_response.json()
Here you go
I am going to move forward with a webhook so I can actually automate this. Can I delete this thread?