This n8n workflow automates document creation using the APITemplate.io API, generating images and PDFs. Key nodes include Webhook (receives POST requests), Input Validation (sets parameters), Get Account Info, Create Image, Create PDF (API interactions), Prepare Template Data (formats data), and Success/Error Response nodes (handle outputs). It streamlines document generation. Set up Requirements and Configuration: Install n8n by downloading from n8n.io for self-hosting or sign up at cloud.n8n.io for cloud setup. Follow installation prompts or create a cloud account. Obtain an APITemplate.io API key from apitemplate.io: sign up, go to 'API Integration' in your dashboard, and copy the API key. In n8n, import the provided JSON to create the workflow. Configure the 'Get Account Info,' 'Create Image,' and 'Create PDF' nodes with your APITemplate.io API key under 'Credentials,' selecting 'APITemplate.io API.' Set the Webhook node’s path to 'api-template-operations' and ensure it accepts POST requests. The Input Validation node checks for valid operations ('generate_documents', 'get_account', 'create_image', 'create_pdf') and template IDs. Testing and Deployment Steps: Test the workflow by sending a POST request to the Webhook URL (from the Webhook node) using Postman. Example JSON body: {'operation': 'generate_documents', 'imageTemplateId': '43c77b2b1a93c324', 'pdfTemplateId': '02777b2b1a99bac8', 'name': 'TestDoc', 'content': 'Test content'}. The 'Success Response' node returns a 200 status with document details, or 'Invalid Input Response' (400 status) for invalid operations. If the API key is invalid, the 'Account Retrieval Error' or 'APITemplate Operations Error' nodes return a 502 status. Activate the workflow in n8n’s interface for deployment. Monitor logs for errors like invalid API keys or template IDs, and verify credentials or input formats if failures occur.
$5.49
Workflow steps: 13
Integrated apps: webhook, set, if