This workflow automates Medium post creation and publication retrieval using the Medium API. Key nodes include Webhook Trigger (initiates workflow via POST), Input Validation (ensures valid action), Action Router (directs to create_post or get_publications), Create Post Field Validation (checks title/content), Sanitize Post Data (sets defaults for title/content/publishStatus), Create Medium Post (creates post), Get Publications (fetches publications), Success Response Post/Publications (returns results), Validation/Create Post/Medium API Error Response (handles errors), and Send Response (returns output).\n\nSetup Requirements and Configuration: Install n8n from n8n.io for self-hosting or sign up at cloud.n8n.io for cloud setup. Follow prompts or create a cloud account. Obtain a Medium API token from medium.com/me/settings/security: click 'Integration tokens,' generate a token, and copy it. In n8n, import the JSON workflow. Configure Create Medium Post and Get Publications nodes with the token under ‘Credentials’ > ‘Medium API.’ Set up Webhook Trigger: keep path as ‘medium-automation,’ configure for POST requests, and enable header authentication with a secure key (e.g., ‘Authorization: Bearer your-key’). Ensure server resources support API calls. Verify token scopes allow post creation and publication retrieval.\n\nTesting and Deployment Steps: Test with Postman using a POST request to the Webhook URL. Example JSON: {'action': 'create_post', 'title': 'Test Post', 'content': '# Test Content', 'publishStatus': 'draft'} or {'action': 'get_publications', 'limit': 10} with an authentication header. ‘Success Response Post’ returns 200 with post id/url/title/publishStatus; ‘Success Response Publications’ returns publications list/count. Error nodes return 400 for invalid action/title/content or 500 for API failures. Check logs for errors like ‘Invalid token’ or ‘Missing required fields,’ and verify the token or input data. Activate workflow in n8n. Validate output: ensure post ID/URL match for create_post or publication count for get_publications. If errors persist, confirm token validity, scopes, or network connectivity. Use n8n logs to debug issues like rate limits or malformed inputs.
$6.99
Workflow steps: 13
Integrated apps: webhook, if, switch